[
https://issues.apache.org/jira/browse/THRIFT-4176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15973260#comment-15973260
]
Allen George commented on THRIFT-4176:
--------------------------------------
[~codesf] That's a very fair point. For some reason I assumed it was a
requirement to have different server implementations.
I think most Rust users would really like to see both a server and client based
on async sockets in [Tokio|tokio.rs]. Unfortunately Tokio is fairly new, and, I
need some time getting up to speed on it. It's mostly the "needs to mature a
bit" aspect that keeps me from using it. I have been working a bit on this
ticket
[here|https://github.com/allengeorge/thrift/commit/66198a10a8e243cc73478af89fa3fb137acbfd8c]
(ignore the commit date - I'm rebasing), but most of the changes center around
making components threadsafe and more ergonomic.
With that in mind, how about this as a plan forward:
# Replace the current single-threaded, synchronous {{TSimpleServer}} with a
{{TThreadpoolServer}} based on Rust stdlib synchronous sockets. A
threadpool-based server is probably good enough for most people right now,
because you can configure it to get either simple-server-like behavior or
unbounded-threaded-server behavior.
# As soon as the new threadpool-server is in, work on a Tokio-based
replacement. This is a much longer-term project because I'll have to rework
many IO components to be async.
This means that at any point and time we'll only have a single Rust server type
and avoid the situation in THRIFT-3096. Does that sound like a reasonable
approach?
And, [~jking3] hopefully we don't have the same issue with the Rust codebase :)
> Implement a threaded and threadpool server type for Rust
> --------------------------------------------------------
>
> Key: THRIFT-4176
> URL: https://issues.apache.org/jira/browse/THRIFT-4176
> Project: Thrift
> Issue Type: Improvement
> Components: Rust - Library
> Reporter: Allen George
> Assignee: Allen George
>
> Currently the Rust client library only provides a single-threaded server. Add
> both a multi-threaded server and a threadpool-based server and add the
> relevant options to the cross-test code as well.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)