Tuesday, 2 April 2019

EventEmitter to Stream data back to client via gRPC

This is what I'm trying to achieve:On DB change, I emit an event using the Node EventEmitter().emit API.Then for my gRPC handler I listen for that event and stream the data back to client:myEmitter.on('changeEvent', (arg) => {}) But I need to pipe these changes back as JSON to client.Am I thinking about this correctly? My goal is to return the client db changes using the Server Streaming RPC.

Submitted April 02, 2019 at 09:56PM by MitaSan1

No comments:

Post a Comment