[ 
https://issues.apache.org/jira/browse/THRIFT-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16763080#comment-16763080
 ] 

Allen George edited comment on THRIFT-4777 at 2/7/19 9:13 PM:
--------------------------------------------------------------

Yeah. It also reminds me a lot of 
[tower-grpc|https://github.com/tower-rs/tower-grpc]. I assume an approach like 
the one in [thrift-async|https://github.com/flavray/rust-thrift-async] wouldn't 
work for you?

I'm still a little unclear about which parts you'll make async and which ones 
you won't, especially if you don't touch generated code. If you don't want to 
change the gen'd code you'd still have to have a threadpool to which to 
delegate {{process()}} calls to on a socket readiness event, right? I assume 
the (rough) thing you're going to build is:

{noformat}
select(connected_clients) {
  case has_bytes(socket):
    thread.spawn() { processor.process(socket) }
  case ...
}
{noformat}


was (Author: allengeorge):
Yeah. It also reminds me a lot of 
[tower-grpc](https://github.com/tower-rs/tower-grpc). I assume an approach like 
the one in [thrift-async](https://github.com/flavray/rust-thrift-async) 
wouldn't work for you?

I'm still a little unclear about which parts you'll make async and which ones 
you won't, especially if you don't touch generated code. If you don't want to 
change the gen'd code you'd still have to have a threadpool to which to 
delegate {{process()}} calls to on a socket readiness event, right? I assume 
the (rough) thing you're going to build is:

{noformat}
select(connected_clients) {
  case has_bytes(socket):
    thread.spawn() { processor.process(socket) }
  case ...
}
{noformat}

> Non Blocking Server implementation for Rust
> -------------------------------------------
>
>                 Key: THRIFT-4777
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4777
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Rust - Library
>            Reporter: Satyender Yadav
>            Assignee: Allen George
>            Priority: Minor
>
> Implement Non blocking server in Thrift rust library.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to