Похожие чаты

Is it a constant stream of data or a fixed

set of data ?

6 ответов

14 просмотров

There is a large csv file - First stage of the pipeline reads data line by line and pushes them into a channel - second stage of the pipeline reads data from the previous channel and filters invalid data, then pushes the valid data into another channel - third stage, reads data from the previous channel and calculates some stuff based on them, then writes the results into an output file

AYUB
There is a large csv file - First stage of the pip...

If you need to have an order if I understand correctly, if the order is the lines you are reading in your scan, using goroutines will not help you because the problem needs to be resolved synchronously 😔😔

AYUB
There is a large csv file - First stage of the pip...

I'm not sure I have completely understood your problem but if the order is the line of the csv file you can pass to the go routine the line and the index. The go routine will return the result and the index. Who receive the result will put it in a map (index<->result). This is valid for both second and third stage.

jeffotoni
If you need to have an order if I understand corre...

Yeah that's what I came up with. I added some buffered channels for the pipeline stage communication so I can have a little bit of concurrency.

AYUB
Yeah that's what I came up with. I added some buff...

But if the whole process is synchronous, there is no need to use simultaneity. But if it is possible to use everything asynchronously, the conversation is different.

jeffotoni
But if the whole process is synchronous, there is ...

There might be some way to tranform the business logic into something more independent, to keep it async. For example, batching each set of records with the same ID. This way it could be more async

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта