-2

I have read up and watch some videos on Kinesis Stream and I kind of understand that it allows for data streaming from applications and real time analytics.

But how does it relates to the Java Stream because I think with API connection or TCP connection, it is possible to recreate Kinesis Stream by using Java Stream right?

What are some of the pros and cons of Kinesis Stream vs Java Stream?

Benjamin
  • 293
  • 1
  • 2
  • 9
  • I think it would be easier to answer your question if you explained what problem you are trying to solve? Or gave an example case where you would use Java Stream? I have never used them so I cannot comment, but I might be able to help since I've used Kinesis – Robo Nov 18 '17 at 11:22
  • 4
    They are two completely different things. Java streams are a way to perform computations on sequences of data _within a single process_. Kinesis is a way for multiple processes/machines to _publish and consume_ data. – kdgregory Nov 18 '17 at 11:31
  • Ahh cool! So Kinesis is like a upgraded version of Java Stream with more functionality? Would it be the same if I wrap a several Streams inside a pool? (i.e. A pool do several tasks and each of these task have a Java Stream, will this make this pool of Java Stream more similar to the functionality of KInesis) @kdgregory – Benjamin Nov 18 '17 at 14:11
  • You should ask "how does AWS Kinesis compare to Apache Kafka".. – JonyD Nov 18 '17 at 18:39
  • No, as I said above, _they are completely different things_. The _only_ way in which they're alike is that they deal with discrete data elements as a sequence. Which means that they're alike as a `for-each` loop. – kdgregory Nov 20 '17 at 18:50

1 Answers1

2

Despite the fact that "Java Streams" and "Kinesis Stream" both use the word "stream", one is not related to the other.

A "Java Stream" is a data structure (class) in the Java programming language representing a single "stream" of data. That could be a file stream, a network stream, a string stream, etc.

"Kinesis Streams" is a product name. "Stream" in this case represents an abstract concept of multiple streams of data flowing in from multiple data sources.

You cannot mimic one of these with the other.

The closest these two ideas can come is simply that both are "streams of data". Aside from that, don't try to think of one as being related to the other.

Matt Houser
  • 28,384
  • 5
  • 53
  • 70