# Protobuf.js-related Changes - protobuf.js can already parse and reflect upon service definitions. Can't we just reuse this functionality and pass the `Service` reflection object to the main API?
# Extend server API - Add a method `Server.abortShutdown()` to complement `Server.tryShutdown()` Reason: a server might decide it is overloaded and is not able to process more clients, but that state is transient and might be remedied in the future. `Server.tryShutdown()` should not unbind from the server port. There should be a complementary method `Server.unbind()` to `Server.bind()`. - Per client connect and disconnect hooks The server API should provide per client connection and disconnection hooks, that are called with a server side `Connection` object (naming up for discussion). Reason: A service might want to implement per connection state (authenticated, etc…), or simply keep track of connected clients (eg. for load statistics or connecting to per client backend services). - The server side `Connection` object should provide a method to send `GOAWAY` and `PING` frames (and maybe other advanced functionality). # API layering Since I do not expect the current callback/streams based API to change anytime soon, it should be modified a little bit to enable an easier layering of different call styles on top of it. I am thinking here of promises, generators and rxjs style APIs. For example, the object `ServerWriteableStream` conflates three distinct entities into one: - The `request` object from the client. - Metadata about the call (cancelled state, client metadata, peer info). - A `Writable` stream for sending responses and completing/aborting the call. If these were provided as separate objects to the handler function, different APIs could be layered more cleanly on top of it. For rxjs for example, a `ServerWriteableStream` could be driven from an `Observer` of an `Observable` provided from a higher level API, while the request and metadata objects could be passed up unmodified. Best, André On Tuesday, November 28, 2017 at 12:00:59 AM UTC+1, Michael Lumish wrote: > > I have created a proposal that describes changes that will be made to the > Node.js gRPC API for the major version bump to 2.0: > https://github.com/grpc/proposal/pull/46. If you have any comments or > suggestions, please discuss them in this thread. > -- 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/b2e9c1f3-7403-43c1-8c39-570e802ce909%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
