Questions tagged [streams]

8 questions
5
votes
3 answers

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 FileOutputStream object that writes to the file…
johnny92
  • 251
  • 2
  • 5
4
votes
3 answers

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 the metrics and conditions to intelligently…
user0000001
  • 263
  • 3
  • 7
2
votes
3 answers

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 8, I assumed that it would be good to treat…
Matthias Ronge
  • 507
  • 3
  • 11
1
vote
2 answers

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

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 (SRP) - Liskov-Substitution Principle (LSP) -…
L m
  • 133
  • 3
1
vote
2 answers

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(roomSchedule ->…
Archimedes Trajano
  • 685
  • 1
  • 6
  • 14
0
votes
1 answer

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 nicer than manual callback in code that are hard…
NoSenseEtAl
  • 253
  • 1
  • 6
0
votes
1 answer

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 comparable, but I would like to understand the…
-1
votes
1 answer

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. The way Kinesis works (to my understanding) is it…
Osman
  • 107