tarpc icon indicating copy to clipboard operation
tarpc copied to clipboard

QUESTION: how to get tcp server features for custom transport?

Open cguentherTUChemnitz opened this issue 2 years ago • 1 comments

One example: https://github.com/google/tarpc/pull/398/files#diff-ab7dfcbf41b879bf0b90f96552153640d5f8d9268cde12f3c20faa97cb97f6c7 tarpc/examples/tls_over_tcp.rs

When using tls over tcp, i have to rely on tarpc with custom transport layer. At least i was not able to find how to combine it with the tarpc integrated tpc server. Nevertheless the custom transport example lacks a lot of server functionality, since the server is only one thread serving answers. So how can we at least ensure here to:

  • handle multiple connections from different clients
  • ensure not to loose any requests from clients, when the server is busy
  • potentially configure an amount of threads to serve for the server

As far as i understand this should be handled by providing tokio style server implementation over the tarpc-custom transport here. But i wonder if this might be already implemented in tarpc or if there is a good example from tokio that integrates well here. Does anyone know something about this?

best, Christian

cguentherTUChemnitz avatar Mar 17 '23 14:03 cguentherTUChemnitz

Hi! Sorry for not responding last year. Did you still want help with this? Essentially, tarpc doesn't have any built-in transport, so everything is "custom" in a sense. You should be able to use all tarpc features with any transport.

tikue avatar Feb 04 '24 07:02 tikue