Skip to main content

Questions tagged [streams]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
6 votes
4 answers
3k views

How do you honour the principle to only do "one thing" in a method in reactive streams?

Uncle Bob mentions in his book "Clean Code" that "[f]unctions should do one thing [...] only" and advocates that a method should stick to one abstraction level (I'd call it flight ...
Christian's user avatar
  • 171
2 votes
2 answers
149 views

How to protect class invariants when using the extraction operator?

The C++ "standard" method for serializing and deserializing a data type is to use streams with the insertion (<<) and extraction (>>) operators. This has some flaws, but it does ...
Patrick Wright's user avatar
0 votes
1 answer
409 views

Are RabbitMQ Streams overkill for 1 machine event-driven architecture aplication?

If developing event-driven application(more precisely event sourcing application) that will run solely on 1 machine are RabbitMQ Streams an overkill, or maybe a misfit? In theory RabbitMQ Streams seem ...
NoSenseEtAl's user avatar
5 votes
3 answers
561 views

How to visualize a Stream object (and some other data types)?

I want to make a small programming tutorial which will have a number of images visualizing various data types, but I am not sure how to draw these images of the data types. Assume that I have a ...
johnny92's user avatar
  • 251
1 vote
2 answers
557 views

How do the SOLID principles apply in the context of Lambdas and Streams? [duplicate]

How are these principles applied in the context of streams and lambda expressions? In particular, the applicability with respect to the following three principles: - Single Responsibility Principle (...
L m's user avatar
  • 133
2 votes
4 answers
1k views

Is the Java Stream API intended to replace loops?

I mean the question in the sense of: Should the occurrence of simple loops on collections in code in Java 8 and higher be regarded as code smell (except in justified exceptions)? When it came to Java ...
Matthias Ronge's user avatar
-1 votes
1 answer
48 views

Event Processing a Lack of Events

I am facing an issue that I don't believe is novel but none the less am having trouble finding a solution that fits well with our system. We have a constant stream of events going into AWS Kinesis. ...
Osman's user avatar
  • 107
1 vote
1 answer
710 views

What is the relationship between reactive programming and stream processing engines?

When would I use reactive programming libraries like RX Java and Project Reactor compared to stream processing engines such as Storm and Flink? I am aware that these concepts might not be directly ...
Hyggenbodden's user avatar
4 votes
3 answers
1k views

Alternating between Java streams and parallel streams at runtime

This is a question I constantly ask myself when designing a data intensive application: When is it appropriate to use stream() over parallelStream()? Would it make sense to use both? How do I quantify ...
user0000001's user avatar
1 vote
2 answers
1k views

How to refactor function chains for Java 8 Streams

I have a stream of data recordStream that I am collecting into a Map. Using a chain like this. recordStream .filter(Objects::nonNull) .map(RoomSchedule::new) .map(...
Archimedes Trajano's user avatar