-
Notifications
You must be signed in to change notification settings - Fork 90
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
What's the status of this proposal? #191
Comments
Just my understanding: This is a stage 1 proposal. In order for it to progress forward either @jhusain or @erights who are currently the champions of this proposal need to push it. In addition @jeffbcross and @robwormald have expressed interest in promoting and advocating this in the past. I think the biggest issue is the fact a proposal about EventTarget and DOM adoption still hasn't been presented anywhere (as far as I know). As far as I know DOM adoption required showing how observables would be used in that capacity but that work hasn't happened yet. In addition - this proposal has had a rocky time people-wise with historical disagreements amongst parties and. The following things contribute to stagnation IMO:
|
Also, unlike async iterators which we have integrated into Node.js core (every readable stream is an async iterator) no one has stepped up to experiment with observables in Node.js core. Mostly because they don't actually address the use cases we've discussed due to the lack of back pressure support. Node.js is many people - so there might be parties interested. |
Okay, fair enough. I do feel a pipeline operator should help eliminate the plague of missing operators, but you would probably agree with me on that. Regarding async iterators, I can see how those could fulfill 99% of use cases, especially with better error handling semantics (not all errors are fatal). It also helps that async iterators have complete native support, whereas observables are still library-only, and Node.js streams are basically observables that happen to permit non-fatal errors, like some Gulp stream errors, and/or errors whose semantics are state- and/or context-dependent, like with FS streams - they represent opening errors before The case of DOM event handlers does appear to have some discussion, although it's stalled on the implementor side thanks to the lack of a JS spec. Not like that's stopped them before, but observables are something it appears they're a little more hesitant to add on their own. |
I had a thought about backpressure: would that be solvable by allowing Of course, this would be a bit more complicated with subjects and multicast observables (you'd need to reimplement part of Alternatively, you could have the observable itself understand the concept of returning a buffer callback and have it buffer the values itself and return an optional buffer callback to the receiver, cached per-observable and with its calls queued for when that entry drains. That would reduce some of the overhead of buffering. In either case, I'd like to see if there's any way to do a lower-memory variant than that, so it doesn't have to be so GC-heavy. |
@isiahmeadows if you haven't - check out what RxJava is doing for backpressure: https://github.com/ReactiveX/RxJava/wiki/Backpressure |
About backpressure: callbags support it. |
@staltz I do not think the observable proposal isn't progressing because of backpressure. I was just discussing why we're not pushing for it from Node.js If you have any reason to believe callbags are the right abstraction for Node.js please do speak up. At the moment we have no plans to incorporate them into Node.js core at any form. |
I didn't say the observable proposal isn't progressing because of backpressure, and I didn't say callbags are the right abstraction for Node.js neither do I want to incorporate them into Node.js (because the truth is there is nothing to be incorporated), I merely mentioned callbags because you mentioned RxJava and I believe a JS approach to backpressure would be more approachable to isiahmeadows who was discussing backpressure ideas. |
Yeah, I was deviating off-topic with backpressure. (It could hinder broader adoption some if not addressed, but it wouldn't prevent adoption.) @staltz With that level of functional purity, it seems pretty interesting to me (I want to see if I can create arrows out of it). Conceptually, it reminds me a lot of pull streams, just pushing instead of pulling. I'll stop now before I derail the thread further. |
One year later... Has this proposal made any progress? |
as you can see here: https://github.com/tc39/proposals/blob/master/stage-1-proposals.md Observables haven't been presented on since May 2017, and aren't on any current or upcoming meeting agenda. |
Has there been any movement on this? |
@alshdavid yes, @Blesh is picking some of it up, hopefully. |
@benjamingr you probably meant to mention @benlesh =) |
Any news on this topic? |
No one is putting any effort into advancing it. AFAIK, no one plans to. |
Also, there's the more recent https://github.com/tc39/proposal-emitter, but AFAICT even that one's stalled out. Personally, I just want something, but I'm not sure what the proper abstraction is yet, and the community doesn't seem to have arrived on a single specific abstraction, either. (Observables work great for object-oriented APIs, but are almost useless for, say, React, and I haven't yet seen any serious use for servers that aren't better-addressed with async/await.) Not a TC39 member, just want to make that clear. |
As @ljharb noted a year ago and what still holds: this proposal hasn't been presented since 2017 and it is not on TC-39 upcoming agendas. My understanding of the main reasons for staleness:
While there are active threads discussing proposal details in this repo issues, currently they seem rather academical/hypothetical to me Would be great if proposal champions and active participants could share their vision/understanding ❤️ I'm not a TC39 member, not actively tracking this proposal, not very educated on the topic 🙂. |
Depending on what you need, async interatables may or may not do what you need. It certainly satisfies some of the needs that Observable or Emitter would. |
I agree with Mark, I think async iterables are super useful and have turned out to model node streams very niftily (with backpressure and graceful termination). That said there are plenty of use cases where an eager push model is required and you want the producer to control emission and to produce as quickly as possible. Currently we have been using We basically need an "async iterable for push" - that might be observables. I think there is a lot of merit in more exploration of this space. |
@benjamingr that's what I've been
That's exactly what I'm doing with AsyncObservable in IxJS, the other side of RxJS, which has support for Iterable, AsyncIterable, and soon AsyncObservable as noted in this Pull Request for AsyncObservable. I think that adds the right abstractions around Observable to make both creation and teardown both async for Zalgo purposes, as well as allow for async projections such as on map, filter, etc. |
@ any interested: I slapped together an alternate proposal: https://github.com/isiahmeadows/proposal-es-streams While it's similar in concept, I found it more helpful to deconstruct the problem even further and compare them to generators more directly. And in doing that, I found an even better way to model them, as a lot like iterators, but with pretty much all arrows flipped. I then worked backwards from there, starting by designing the protocol, then iteration, then syntactic sugar, and it all practically wrote itself, edge cases and all. There are also things about my proposal that make it significantly more powerful, despite being much simpler to spec:
My proposal does have a dependency on the cancellation proposal, but mostly for practical reasons (less to spec and it stays much purer) and the fact I want to maybe help give it a small kick to get some progress going with it again. Also, there is the caveat that manual definition of streams, like manual definition of iterables, is very verbose. This could be addressed with stream helpers similar to the various proposed iterator helpers, but that's beyond the scope of my proposal. I want to keep it conceptually as simple as pragmatically possible. |
I haven't seen a ton of activity here in the past few months mod a few , the last repo commit was back in late October of last year, and it's been sitting at spaceship status over in tc39/proposals for over a year. Given the broad interest on the DOM side and (to a lesser extent) Node as well, I'm just curious what the status is.
The text was updated successfully, but these errors were encountered: