PubSub example #187
Replies: 5 comments
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
Yes of course. Sorry for the rather short request. I have a order service that was implemented with SignalR, but the desire is to migrate it to gRPC. So the client creates a connection to the services for Order & OrderNotification Client subscribes to either create and/or update order notifications (via the OrderNotification endpoint)
Here's a couple of usage scenarios:
So I'm thinking a long-lived connection returning a IAsyncEnumerable that on the client side yield the results as it is received from the server. But should the server-side service be Scoped/Singleton (I'm thinking it shouldn't be Transient)? I hope that clarifies what I'm thinking. |
Beta Was this translation helpful? Give feedback.
-
Maybe something in the style of:
Only thing is with this I dont get messages to ALL recipients. Just one. In SignalR it would be: ` public async Task Upsert(OrderDto dto)
` Suggestions? |
Beta Was this translation helpful? Give feedback.
-
There are plenty of examples for a "chat" application that does PubSub. https://github.com/chgc/grpc-dotnetcore-3-chat But those use protobuf which I'd like to avoid. |
Beta Was this translation helpful? Give feedback.
-
I have a solution with Server streaming and a ReactiveX stream. Works flawless. |
Beta Was this translation helpful? Give feedback.
-
Hey
I was wondering if anyone has an example for adding PubSub functionality with Servicemodel?
Running the services isn't much of an issue (great project), but I'm struggling a little with the PubSub modeling.
I hope someone can throw me a bone (example implementation)
Beta Was this translation helpful? Give feedback.
All reactions