Похожие чаты

Is it a constant stream of data or a fixed

set of data ?

6 ответов

12 просмотров

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

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

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

Всем привет! Имеется функция: function IsValidChar(ch: UTF8Char): Boolean; var i: Integer; ValidChars: AnsiString; begin ValidChars := 'abcdefghijklmnopqrstuvwxyzABCDE...
Евгений
44
Ну вот просто даже давайте вот как. Какой нибудь конкретный кейс, можете в пример привести, где бч работает и приносит прикладную пользу, а не просто что бы было? Не крипту.
Alexander Andreev
22
For all those that keep asking why no pump? why this ? and why that...? Please close ur ewt chart and open 2 others - TOTAL (total mc) and BTC.D (btc dominance). Maybe BTC a...
Inn3r_G
19
"Since pnut can flip FTM easily, I'm swapping my FTM to pnut and hoping for a easy x5-x10" Perfect recipe for disaster. NFA but chances are, you'll end up as exit liquidity ...
C. A.
7
объясните пожалуйста, почему функция не работает должным образом? вроде должно брать активное окно сравнивать его размер с размером экрана, и если есть совпадение = true прове...
JF
9
AMD status update? No longer in the plan but something might be around the corner later on Chinese partner? No longer in the plan. This market does not seem to be the top ...
Ben
6
Ready for some fun AND a chance to win TKO Tokens? Join us for exciting minigames in our Telegram group! 🕒 Don’t miss out—games start on today 25 October 2024, at 8 PM! Ge...
Milkyway | Tokocrypto
255
да кстати заметил всюда почему то всех сюда прёт, ни в одном чате столько ботов не прёт как сюда.. Может чота надо доработать?
REDis
15
Мне вот любопытно. Уже сколько времени имею соблазн купить макбук, ибо подозреваю что очень уж удобен будет в связке с другой техникой от эпл которая у меня есть, да и сам по ...
Not Yeromin
14
I get confused when people talk about the ‘bull market’ and the ‘next bull market’ as if anyone really has a clue what’s really going on in the world. First of all - there i...
Shah
1
Карта сайта