On Thu, Jan 4, 2018 at 12:25 AM, Michael Lumish <[email protected]> wrote:

> I like your suggestion of matching the http2session.shutdown API, but I
> don't think it should return a promise, because none of the rest of the API
> uses promises, and I would prefer to be consistent.
>

That makes sense.


> That rxjs API concept is interesting, but I think there are some
> significant issues. Most importantly, because the client methods now return
> the Observable<ResponseType>, they do not return the client call object,
> which includes the response metadata, plus a couple of other methods. I
> don't really see a good way of reintroducing that information into those
> methods without reintroducing those complex returned objects. I am also
> very hesitant to use this "Observable" stream type to represent unary
> responses, because so far we have strictly distinguished between streaming
> and unary calls.
>

The API is just a proof of concept and in a very early state. One could
return a specialised Observable with an extra attributes for example. The
nice thing about having unary calls also return Observables is that they
allow you to model timeouts and retries very easily. Also rxjs tends to be
an all or nothing API, it's a bit cumbersome to mix it with promises.

Please be aware that I do not propose to have any library on top of
grpc-node by default. I only want it to be easier to layer different async
solutions on top of it. Separating call info and IO mechanisms would be
beneficial for this.

Best,
André

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CA%2BFfjcdXxKmrgMNPk9Lzt5CNPgLkyaGAoKSGeD_sH%3DVPLhSCJA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to