On Oct 22, 12:16 am, Samuel Stauffer <
sam...@lefora.com> wrote:
> It seems that currently ernie closes the connection after serving an
> RPC request, and looking at the ruby BERT-RPC library it seems it does
> the same. Is this behavior part of the spec or an implementation
> issue? For my use-case I would have a good number of RPC calls per web
> request, and being able to service multiple calls over a single
> connection would certainly be more efficient.
I originally had something in the spec about persistent connections,
but I removed it since I wanted BERT-RPC to be as transport-agnostic
as possible. But I agree that persistent connection are important.
Ideally BERT-RPC clients and servers would automatically detect
connection closes from either end and handle them properly. For
example, a smart client would detect if the server left the connection
open after the final BERTP or stream 0-header and attempt to send the
next request on the same connection. In this manner, both persistent
and single-connection clients and servers could live together
harmoniously. A simple timeout on the server side would be wise to
prevent socket starvation, but otherwise I don't see any problems.
What are your thoughts on that approach?
Tom