8 ms·
I think I understand the eager confusion. You mean eager because it is a push model and not a pull model like iterator which is lazy. They are eager once Subsc
by agentgt 10y ago
I think I understand the eager confusion. You mean eager because it is a push model and not a pull model like iterator which is lazy.
They are eager once Subscribed. The lazy part that I and the previous poster was alluding to is that most observables do nothing till they are subscribed to unless they are hot where as a Promise and Future are executed/scheduled immediately and the value is pushed/pulled (respectively).
I totally agree that Observables are not that great for backpressure but really there isn't a silver bullet on that one regardless (many smart people have tried to come up with solutions that will work across domains but have failed). As you mentioned you just have to pick the right tool for the job/requirements. I for one prefer a broker ACK model like RabbitMQ but many do not like queues as it just shoves the problem some where else.