Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [stream-processing]

Stream processing is consuming an input stream or sequence of bytes with some format, processing the data as it arrives, and translating it into another format in a related output stream.

0
votes
0answers
27 views

Handling resumable message stream (queue) pattern

My question is actually quite generic though I'm going to use a particular technology Mongodb Change Streams. Change streams in Mongo allow to get message stream of requested changes in a db ...
0
votes
0answers
14 views

Synchronize Data From Multiple Data Sources

Our team is trying to build a predictive maintenance system whose task is to look at a set of events and predict whether these events depict a set of known anomalies or not. We are at the design ...
0
votes
0answers
55 views

Is the concept of Rx debounce possible in a distributed environment?

The issue I am building a server-side system that handles streams of time-series events from multiple users and I'd like to perform an action after a certain quiet period has elapsed in the event ...
1
vote
1answer
48 views

Aggregating events in event-driven system

Lets say there are two services. One generates event A and the other event B. We need to build a new service that implements the function C = func(A, B) , which produces the result C. But as A and B ...
0
votes
1answer
28 views

Best practices for fixing bugs in event stream processing [closed]

We are working on an event driven system that works a streaming technology (eventhub/kinesis/kafka). Imagine some system is generating events that are sent to the event stream. Then there are ...
1
vote
1answer
109 views

Download file stream as it's being generated

Scenario We are building a UI that allows users to query our data in bulk. The return format is CSV and there is a decent amount of processing that needs to happen, so this processing processing is ...
1
vote
1answer
80 views

What is a good technique to process an event stream to ensure sequential or transactional consistency

I am trying to improve an event-driven processing system, which is having a few problems because the events are not guaranteed to arrive in the correct chronological sequence. This is due to batching ...
2
votes
2answers
242 views

Java 8 - When should I use java.util.Stream instead of java.util.Collection?

I started studying functional programming with JavaScript. After this, I started to study it with Java 8 (streams, lambdas and method reference) and I realised that I tend to use streams as much as ...
0
votes
1answer
101 views

How to signal end of stream?

I am designing an interface for reading and writing video frames to various inputs and outputs. Stream operators seem to me a superb alternative to named functions for the task. This is the gist of it:...
0
votes
1answer
65 views

Why use apache spark instead of just a normal worker?

Why should someone use a stream processing engine like Apache Spark, Flink, Hadoop instead of just a normal backend worker which works on something and returns the results as soon as it's done? ...
6
votes
3answers
461 views

Why do you want to avoid flushing stdout?

I stumbled upon a question in Codereview, and in one answer the feedback was to avoid std::endl because it flushes the stream. The full quote is: I'd advise avoiding std::endl in general. Along ...
1
vote
1answer
31 views

how simulate sequential consumers in Kafka

I have kafka consumer that get data from kafka and do some process if some circumstances meet and send it for another consumer to do it's job. How can i build something like this? One way I think ...
1
vote
1answer
81 views

Backend architecture for a datastore with real-time events?

I need to build a data store for transactions that meets the following requirements: A 'transaction' is effectively a state machine which moves through a number of statuses during its lifecycle and ...
0
votes
2answers
135 views

Ideal Interprocess Communication

So, there is a workflow I feel needs to exist. It may already exist, and I don't know about it. Consider the Linux command line workflow, the "motto" of Linux, more or less. You have a bunch of ...
-2
votes
1answer
440 views

Short-circuiting an infinite Java 8 stream

Assume You have some POJO Animal like public class Animal { // some fields } You have some enum AnimalType like public enum AnimalType { // some animal types } You have some method that given an ...
0
votes
1answer
43 views

Best practices for reading dynamic byte streams: is line-by-line comparison with a mask the best way?

I receive sensor data as a binary stream of bytes. This stream is not always the same length, and does not include the same data set each time. If the sensor did not send a field, it is simply absent, ...
2
votes
2answers
138 views

Receive data in random order, send in order

I am facing an issue where I have a data stream that sends unordered data. I'm trying to find a way to receive the data in random order, but send it in order. As an example, I'll receive object4 and ...
6
votes
2answers
101 views

Are there any techniques for detecting redundancies a stream of changes to a filesystem?

I'm working on a file-synchronization client that currently produces a stream of changes to the underlying filesystem. That is a stream of create/update/move/delete events is produced for each ...
0
votes
1answer
293 views

Should I produce output with yield or stream.write in Python 3?

I am working on a Python 3 program that will among other things write data to text files in a number of formats. I have one function per format, generating the data to be written. I see two possible ...
-1
votes
1answer
47 views

node server structure and technologies - support continuous and high volume (amount, not size) data transfare

I'm having trouble planning the structure of my server side workflow and the technologies I should use. The basic structure and tasks are: Now, things to consider: 1.the server listens to multiple "...
1
vote
1answer
189 views

Why is the sorted() method on Stream not named sort()?

Why is the sorted() method on Stream not named sort()? list.stream().sort()
1
vote
2answers
1k views

What are reactive streams and what's so special in them?

I browsed Wikipedia and encountered a new feature of Java 1.9: Reactive streams. Unfortunately, the linked Wikipedia page doesn't help much to understand what those reactive streams are and what's so ...
3
votes
2answers
267 views

Are .NET Streams like 'real' streams?

To me a stream implies that I should be able to: Put things in one end and receive it from the other end in the same order. Do these things at the same time. i.e. continuously be adding to the top ...
0
votes
1answer
2k views

Usage of For-each loop vs functional operation vs Java8 streams

What are the gains in actual computing speed (verbosity of code being put aside) and for which case would each be recommended for, as a good design pattern? I would like to know the above in general ...
10
votes
2answers
5k views

Traditional Message Brokers and Streaming Data

According to the Kafka site: "Kakfa is used for building real-time data pipelines and streaming apps." Searching the internet far and wide, I've found the following generally-accepted definition ...
1
vote
4answers
498 views

What is a “streaming app”, exactly?

I'm trying to get past all the hipster, pie-in-the-sky buzzwording and address a very simple, fundamental question: What is a streaming application? According to the Kafka site "Kafka is used for ...
1
vote
1answer
175 views

Moving from Batch to Streaming architecture using a Graph datastructure

The use case I am trying to solve is, assigning millions of users to their groups/segments. I have thousands of different criteria from which buckets of users are created. E.g. bucket criteria: All ...
4
votes
2answers
593 views

Differences between streams and iterators in C++?

I'm working on code which will provide a generic C++ interface to relational datasets. Some of the data will be in tables in memory (e.g. std::set or std::vector), but some of it will be computed - ...
2
votes
5answers
226 views

Algorithm to limit the speed of processing items

I need to process a large number of data items, and I need to restrict the speed at which they are processed. For example, not more than 20 items per minute. I've thought about an algorithm for that, ...
1
vote
0answers
490 views

Streaming architecture (aka Kappa) and different data types

I'm trying to check my understanding of the kappa architecture. The main point I am trying to resolve is how, if at all, one unifies the processing of data under analysis and other pieces of data, ...
1
vote
0answers
539 views

Async stream enrichment with a message queue (e.g. Kafka)

I would like to enrich some streaming data, with one service per enrichment, possibly each service written in a different language and managed/deployed separately. Each service would consume some ...
4
votes
3answers
146 views

Could one swap the direction of >> and << overloads to define them as class members?

Some operators cannot be overloaded as class members. One such example are the bitwise shift operators used for streams see here for example. The reason for that (as far as I understand it) seems to ...
1
vote
2answers
1k views

Video streaming through Ajax calls

These days I have seen couple of sites (including Youtube) that stream videos through Ajax calls (XHR) in few MBs or even less than MB. For an example of what I said see the highlighted lines in the ...
0
votes
1answer
103 views

Where should I store stream wide metadata in stream processing?

I am building a stream processing architecture and was wondering what to do with metadata about the stream. For instance, every message of data coming from a source has the same attribution, as it ...
9
votes
1answer
3k views

How does sorting with java 8 stream work under the hood?

When I call Stream.sort(..) is there a new array of elements created and the stream iterates over the newly created sorted array? In other words, how Java 8 Stream does sort under the hood?
6
votes
1answer
433 views

Why does the C stdio 'ungetc' function exist?

In the C programming language (and many subsequent languages that either directly interfaced with or built a facsimile of the C's Standard IO functions), there exists a function called ungetc: int ...
4
votes
1answer
365 views

Architecture for Real Time data processing

I'm looking at building out the architecture for the following, and wanted to see what others think about it. Assume that the system is running some non-trivial algorithm (so it's not simply a sum ...
0
votes
1answer
6k views

Base64 decoded image file size

I know base64 encoded binary data is equal to 1.37 times the original data according to Wikipedia. What if you decode that string with php function base64_decode($encoded_string); and then make ...
1
vote
1answer
621 views

Handling responses from an outputstream

I have an InputStream and an OutputStream to a server. I can send a bunch of JSON requests over the wire and get a stream of responses back from this server. From this, I'd like to build a wrapper ...
0
votes
1answer
193 views

Understanding streams

I have started learning streaming APIs and I found one of the good documentations here. There was a comparison given by author to demonstrate the effectiveness of the streams. var http = require('...
0
votes
2answers
314 views

How do you deal with a mutable buffer in a functional space?

I have a stream parsing method in C# that reads portions of a protocol frame from the STOMP protocol; the specification isn't the important part for the question though. What is important is that I ...
1
vote
3answers
387 views

Single exit point meets Java streams

We currently have a sensitive discussion going in the company that touches on a couple of old primary opinion based discussions. Nevertheless, I would like to discuss the case in this forum to ...
1
vote
2answers
54 views

Sending Photo from Mobile to Mobile via Chunking Bytes versus Streaming

I need to send a photo from one mobile phone to another. Currently, I'm splitting the image up into bytes before sending and then reassembling the image on the second mobile. This works fine, but if ...
4
votes
1answer
1k views

Is it better not to .close() inside API method body when passed a Reader or InputStream?

There are plenty of similar questions that have been answered. Example here. However, they all have both the Reader and the InputStream within the same scope or method body, and so suggest to close ...
32
votes
3answers
14k views

Is it an antipattern to use peek() to modify a stream element?

Suppose I have a stream of Things and I want to "enrich" them mid stream, I can use peek() to do this, eg: streamOfThings.peek(this::thingMutator).forEach(this::someConsumer); Assume that mutating ...
3
votes
3answers
244 views

Streams: what has happened after instantiation but before reading?

I'm trying to grok streams - my world is C# but I suspect the principles are general. I understand the general principle of reading/writing bytes from/to a store. However, what I don't understand, ...
2
votes
1answer
156 views

Upload, convert, and store multiple different product data feeds into a database

I'm not sure if this right location for this question, but here it is. I currently have about 30 different CSV or TXT product data feeds. I am trying to build a tool to 1) upload each feed 2) ...
2
votes
1answer
1k views

Feeding std::streambuf for Non-Blocking std::istream Read

I want to write small library to guide a child process for a specific needs (not trying to reinvent bicycle here). My needs includes reading from child stdout and stderr. I want to implement this as ...
5
votes
1answer
1k views

How is one supposed to deal with the intermediate buffer of DataReader class?

Summary I am developing a WAV file format reader under WinRT, and for this I need to read random amounts of structs consisting of fundamental types such as int, uint, float and so on. Back in ...
38
votes
3answers
16k views

Why should I use “functional operations” instead of a for loop?

for (Canvas canvas : list) { } NetBeans suggests me to use "functional operations": list.stream().forEach((canvas) -> { }); But why is this preferred? If anything, it is harder to read and ...