Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Stream API #23

Closed
vesense opened this issue Mar 19, 2018 · 6 comments
Closed

Introduce Stream API #23

vesense opened this issue Mar 19, 2018 · 6 comments
Labels
Milestone

Comments

@vesense
Copy link

vesense commented Mar 19, 2018

Currently, there are Producer API, Consumer API for basic IO operations on message queues.
For many scenes, users like to process messages in Streams.

The Stream API is lightweight, not as same as the distributed streaming systems like Apache Storm, Flink, Spark-Streaming. And its implementation can be embeded in any java applications.

It provides the most common stream operations like filter,flatMap,map,reduce,groupBy,join,count,max,min,window, etc.

It's different from the existing StreamingConsumer, which is a low level Consumer API for processing consumer positions, etc. (IMHO, the class name of StreamingConsumer should be renamed to a more reasonable one, the current might be confused for users.)

@bsideup
Copy link

bsideup commented Mar 19, 2018

@vesense I created #20 for it. If OpenMessaging provides Reactive API then such operations can be plugged in by using RxJava, Akka Streams, Reactor or any other reactive framework

@vesense
Copy link
Author

vesense commented Mar 20, 2018

@bsideup Thanks for your comment.

The Stream API here is non-reactive, not as same as Reactive Streams.

The reactive-streams provides Publisher, Subscriber, Subscription, Processor APIs. I think we might consider providing reactive APIs in an individual module. These APIs can be used as a high level abstraction to process messages in the message queues.

@bsideup
Copy link

bsideup commented Mar 20, 2018

@vesense but why not Reactive? Does it make sense to provide reactive and non-reactive streams?

@vesense
Copy link
Author

vesense commented Mar 22, 2018

@bsideup
The Stream API here, like Spark's DStream, Flink's DataStream or Kafka's KStream, is just stream abstraction including basic stream operations(filter,flatMap,map,reduce,groupBy,join,count,max,min,window, etc.). This is the different point from reactive-streams's common reactive APIs(Publisher, Subscriber, Subscription, Processor). reactive-streams provides these operations depending on 'RxJava, Akka Streams, Reactor or any other reactive framework'. And another point is that it's easy and convenient to translate sql to Stream related operations when we consider supporting sql(e.g. flink-sql, kafka-ksql).

@vongosling
Copy link
Collaborator

vongosling commented May 17, 2018

@vesense how do you think about if we want to support the Stream API base on the existing atomic APIs :-)

@vesense
Copy link
Author

vesense commented May 19, 2018

@vongosling Sorry for the delay because of my busy work. I will write a google doc for the Stream API design after completing the RocketMQ-Beam integration. Thanks for your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants