Comments (22)
I think we should also be sensitive to what's already being used in JDK 8 and if any of those types might potentially be re-used in a future JDK 9 implementation; the most important of those being:
public interface Consumer<T> {
void accept(T t);
}
public interface Supplier<T> {
T get();
}
public interface Function<T,V> {
V apply(T t);
}
public interface Predicate<T> {
boolean test(T t);
}
Some of the other names like Observable
and Stream
have different meanings already in different contexts (plain JDK, RxJava, etc...).
IMHO the only ones that we've talked about so far that don't seem pre-loaded based on previous associations seem to be Publisher
and Subscriber
.
from reactive-streams-jvm.
I like the current master (with request()) so I would vote -1 as I haven't seen appealing alternatives for now. My bias is I have started using these names too.
from reactive-streams-jvm.
I like Producer/Consumer, but Subscription doesn't fit in there, and they are already taken by JDK 8.
I vote on Publisher/Subscriber/Subscription.
from reactive-streams-jvm.
I also like Publisher/Subscriber/Subscription
Same reasons as Patrik + interfaces like Listener have a very concrete feel in Java land already - doesn't feel very right for our streams stuff (though I see / hear why it's tempting to call listen on a stream)
from reactive-streams-jvm.
I'm okay with Publisher/Subscriber/Subscription
but am open to whatever the names need to be so as to achieve the goal of being very generic.
I imagine however that if the ultimate goal is to become part of the JDK, the relationship with the current Stream
API is going to be tricky.
@DougLea What are your thoughts on this?
from reactive-streams-jvm.
About naming: if they were in a new package when standardized (say javax.reactive), then the names wouldn't be as constrained. But if incorporated in an existing package, they will need longer names to avoid clashes. For example, ReactiveSource, ReactiveSink, and ReactiveChannel.
(Also, apologies for being too swamped with other things lately to contribute much about other semantics issues.)
from reactive-streams-jvm.
Thanks @DougLea for the quick response, and no problem on being busy, many of us have similar problems. I need to spend some time on other things for a bit myself!
Do you think it's likely to use a separate package like javax.reactive
or would you rather incorporate it into something like java.util.*
similar to java.util.stream
was?
What do you think the relationship with java.util.stream.Stream
will be? Would the JDK be better having them related such as ReactiveStream
or AsyncStream
(even though I don't like that name)?
from reactive-streams-jvm.
Using an enclosing package seems like the best move. How about for now calling package org.reactiveStreams, and then migrating to either javax.reactiveStreams or java.util.concurrent.reactiveStreams, depending on how these things go.
With either of these, we could use the simplest termst: Source, SInk, Channel
from reactive-streams-jvm.
Generally in Java don't we avoid capitals or camel-case in package names?
from reactive-streams-jvm.
Maybe java.util.reactive
or java.util.reactive.stream
(or both)?
from reactive-streams-jvm.
I like either of those options from @jbrisbin
from reactive-streams-jvm.
Iβm also open to alternatives, but so far I have not seen anything which is better than Publisher/Subscription/Subscriber (since it is a metaphor from real life that just works so well).
Wrt. Java 8 Streams I would say that the only worry I would have is if we reused the Stream terminology, since I see those streams more on a DSL and end-user API level than what we are trying to achieve here. If Java 9 introduces streams that support lazy evolution, then we might just use those as one more language binding on the JVM for our underlying implementation of asynchronous boundariesβthe focus of the java.util.stream package lies more on synchronous staged composition which is an orthogonal concern.
from reactive-streams-jvm.
Are we done here? (the bikeshed isn't even primed yet!)
from reactive-streams-jvm.
Moving to close?
Ping @benjchristensen @jbrisbin @smaldini @mariusaeriksen @DougLea @jrudolph @normanmaurer @purplefox
from reactive-streams-jvm.
I am fine with the current naming π
Is that where we leaned to ?
from reactive-streams-jvm.
@smaldini I'm also π for current naming
from reactive-streams-jvm.
π
from reactive-streams-jvm.
@mariusaeriksen & @tmontgomery, wdys?
from reactive-streams-jvm.
I'm good. π
from reactive-streams-jvm.
LGTM
from reactive-streams-jvm.
I'm good with leaving the names as they currently are and closing this.
from reactive-streams-jvm.
Great! Decided.
from reactive-streams-jvm.
Related Issues (20)
- Error handling is just wrong? HOT 8
- Is there a way to block/wait? HOT 1
- org.reactivestreams.Subscription add cancelOnError(Throwable) method
- Upgrade testng in reactive-streams-tck HOT 1
- Release a new version? HOT 14
- Consider adding a full Java module descriptor HOT 1
- Subscription.cancel MUST BE thread-safe HOT 4
- issue with the License HOT 4
- Example code in java.util.concurrent.
- 1.0.4 javadoc on reactive-streams.org missing HOT 1
- Bundle-SymbolicName changed from 1.0.3 to 1.0.4 HOT 2
- Subscriber payload or contextualize request HOT 4
- Bounded publisher onComplete signal timing (related to rule 1.5) HOT 4
- F
- Please include license text into the release jars, and add Bundle-License to MANIFEST.MF
- DEFAULT_POLL_TIMEOUT_MILLIS is not read by the no-args TestEnvironment xtor HOT 1
- Empty TCKVerificationSupport.java in the repo HOT 3
- RangePublisher - Possible example improvement? HOT 5
- add MonoPublisher and Closeable interface , developer duplication define Closeable interface HOT 2
- Can onNext may be signalled before onSubscribe returns? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reactive-streams-jvm.