This tag is for questions relating to event streams in HTTP. Event streams are an easy way for a server to have a continuous connection with the client and send data back and forth.
Questions tagged [event-stream]
137 questions
0
votes
1 answer
How to write batches of data in NodeJS stream pipeline?
I have a function in which I read CSV file as a readable stream using the "pipeline" method, splitting it by rows and transforming the data of each row, then I add the data to an array. When the pipeline is finished, I insert all the data to a…

Or S
- 3
- 1
0
votes
0 answers
running multiple django processes concurrently
I am using a package to send request needed to the front end, but I discovered that the package was blocking all other operations taking place in the server even the loading of a new page, so the server does not respond to any request until the…

S Dra
- 147
- 9
0
votes
2 answers
Recommendations to store streaming events
We're evaluating possible approaches to persist streaming events(user click events in a web browser from many different users) so that it allows us to build custom user dashboards to later analyse those click events. We're planning to use Kafka to…

knightcool
- 324
- 1
- 3
- 11
0
votes
0 answers
how to read large text file approximately 10 gb in node js and check if value at each line exists in db
I want to read large text file and check number at each line in my redis database so basically i have to async/await my redis command below given is my code i tried to use event-stream
function readFile()
{
return new Promise(function (resolve,…

Benson OO
- 477
- 5
- 22
0
votes
2 answers
django eventstream / channels return HTML
I have a working application where I use django-eventstream to show info/error messages to users. All works well with send_event():
send_event("mychan", "message", msg)
but what I actually want to do is send some html directly to the frontend…

xtlc
- 1,070
- 1
- 15
- 41
0
votes
0 answers
Read mth row to nth row from a buffer data in node js
I am getting a large file data in chunks from frontend. The format of this data is base64.
As the file is too large I need to read or convert this base64 format to any other format if required and send only 1000 records at a time as a response to…

Rajitha Ganji IN
- 79
- 1
- 9
0
votes
1 answer
How to delete lines of text from file with createWriteStream with Node.js?
I'm trying to update a huge text document by deleting text that is dynamically received from an array. I cannot use readFileSync because the file is way too large so I have to stream it. The problem im encountering is the function deletes everything…

Grogu
- 2,097
- 15
- 36
0
votes
1 answer
More than one Aggregate per Event Stream in Event Sourcing
Assuming that one event stream is a transation boundary and aggregate is a write-model to enforce invariants, can i have two or more aggregates dedicated to one event stream? If one big aggregate is not an option by perfomance or overcomplicated…

AlmostDev
- 85
- 1
- 5
0
votes
0 answers
Capture Streaming data in angular 2+
I wanted to capture streaming data in angular. I know it can be done via Event Source API but for that the mime type has to be text/event-stream. If my mime type is for server API is application/json, then what is the way in angular to fetch stream…

Rimi Gandhi
- 11
- 2
0
votes
1 answer
How do I implement proper Flask server that contains Server-Sent-Event API?
[Flask SSE API doesn't work on production]
Hi, i'm facing an issue in my flask application where I have multiple regular APIs and 1 HTTP API that sends SSE to my React app. In my local development env, the app works just fine as expected. However,…

Vincent K. Deli
- 1
- 1
0
votes
1 answer
js + php : Why did the EventSource can't get any responses?
I have a stream response like following:
I'm using Laravel as backend
public function stream() {
return response()->stream(function() {
while (true) {
if (connection_aborted()) {
Log::debug('aborted');
…

DengSihan
- 2,119
- 1
- 13
- 40
0
votes
1 answer
Node.js: How to process objects of a big JSON file one by one to avoid heap limit errors
im trying to process a few hundreds of json.gz files using worker threads.
at some point im getting js heap limit error due to 3 big files(about 3gb each unzipped).
i tried to find a way to process the objects of each file one by one, but all i've…

lightPT
- 58
- 5
0
votes
1 answer
Reading, parsing files and inserting documents using NestJS and MongoDB causing JavaScript heap out of memory
My NestJS application has a simple purpose to:
Loop through an array of large files ( 29 files where each one have about 12k to 70k lines)
Read a file line by line and parse it
Insert (each line) into my MongoDB collection
The most important part…

PedroSG
- 466
- 2
- 9
- 38
0
votes
1 answer
How to implement exponential retry in kafka properly?
I am a beginner in Kafka.
I have been trying to implement exponential retry for failed records in Kafka consumer. After 4 retries the consumer needs to shut down. Retries should take place after 1 minute then 5 minute then again after 15 minutes and…

Suhaas
- 13
- 2
0
votes
1 answer
Posting JSON request and reading EventStreams in Angular11
Tried following the article below to read eventstreams. Instead of using formData like it is done in the article, I'm using Json to post. It works smoothly with a 200 response. Even tells that some kb of data was sent over the wire, but the…

Shyam
- 114
- 5