Using gRPC - appropriate for stateful architectures at all?

1,849 views
Skip to first unread message

Rob Cecil

unread,
Aug 2, 2015, 10:20:06 PM8/2/15
to grpc.io
Hello,

I've been toying with gRPC for a few days but I'm not clear whether I'm in the right ballpark as far as identifying gRPC as an appropriate part of the architecture. I have a need to architect a solution that entails Objective-C/Protobufs on the client, and on the backend, some legacy code that the client needs to invoke that produces during a users "session" some computationally expensive units of work (including potentially expensive database connections, multi-dimensional data construction, etc.). Modelling both the services and the messages as protobufs seems very elegant. But, I'm not sure I'm even looking at the right type of architecture when in comes to long-running, stateful server sessions. Does it make sense at all in the world of gRPC?

Thanks

Abhishek Parmar

unread,
Aug 2, 2015, 10:26:40 PM8/2/15
to Rob Cecil, grpc.io
On Sun, Aug 2, 2015 at 7:20 PM, Rob Cecil <rob....@gmail.com> wrote:
Hello,

I've been toying with gRPC for a few days but I'm not clear whether I'm in the right ballpark as far as identifying gRPC as an appropriate part of the architecture. I have a need to architect a solution that entails Objective-C/Protobufs on the client, and on the backend, some legacy code that the client needs to invoke that produces during a users "session" some computationally expensive units of work (including potentially expensive database connections, multi-dimensional data construction, etc.). Modelling both the services and the messages as protobufs seems very elegant. But, I'm not sure I'm even looking at the right type of architecture when in comes to long-running, stateful server sessions. Does it make sense at all in the world of gRPC?

I am assuming what you are really asking is if grpc works well for long running streaming rpcs. If so the answer is yes. We use it like that.  


Thanks

--
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 grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/f758afbe-e9fa-4e79-bd63-b1d995ef892e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
-Abhishek

Rob Cecil

unread,
Aug 2, 2015, 10:47:16 PM8/2/15
to grpc.io, rob....@gmail.com
I'm not sure I equate stateful == streaming. If I maintain some state on the server that transcends a single method call then it wouldn't into the tidy streaming model, now would it?

Abhishek Parmar

unread,
Aug 2, 2015, 11:08:40 PM8/2/15
to Rob Cecil, grpc.io
On Sun, Aug 2, 2015 at 7:47 PM, Rob Cecil <rob....@gmail.com> wrote:
I'm not sure I equate stateful == streaming. If I maintain some state on the server that transcends a single method call then it wouldn't into the tidy streaming model, now would it?

Sure you can do that too. grpc does not get in the way of whatever explicit state you want to maintain on the server side. That is why I am not sure what you are trying to ask and/or accomplish.

If you give more details perhaps you can get amore concrete answer.



On Sunday, August 2, 2015 at 10:26:40 PM UTC-4, Abhishek Parmar wrote:
On Sun, Aug 2, 2015 at 7:20 PM, Rob Cecil <rob....@gmail.com> wrote:
Hello,

I've been toying with gRPC for a few days but I'm not clear whether I'm in the right ballpark as far as identifying gRPC as an appropriate part of the architecture. I have a need to architect a solution that entails Objective-C/Protobufs on the client, and on the backend, some legacy code that the client needs to invoke that produces during a users "session" some computationally expensive units of work (including potentially expensive database connections, multi-dimensional data construction, etc.). Modelling both the services and the messages as protobufs seems very elegant. But, I'm not sure I'm even looking at the right type of architecture when in comes to long-running, stateful server sessions. Does it make sense at all in the world of gRPC?

I am assuming what you are really asking is if grpc works well for long running streaming rpcs. If so the answer is yes. We use it like that.  


Thanks

--
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 grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/f758afbe-e9fa-4e79-bd63-b1d995ef892e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
-Abhishek

--
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 grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
-Abhishek

Reply all
Reply to author
Forward
0 new messages