[jira] [Commented] (THRIFT-4176) Implement a threaded and threadpool server type for Rust

2017-04-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4176:


Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1255
  
Based on Jira comments it looks like @RandyAbernethy might be using it. :)


> 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
> Fix For: 0.11.0
>
>
> 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)


[jira] [Commented] (THRIFT-4176) Implement a threaded and threadpool server type for Rust

2017-04-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4176:


Github user allengeorge commented on the issue:

https://github.com/apache/thrift/pull/1255
  
@jeking3 That's a very fair point - I didn't realize the cross-tests 
weren't running. I try to be disciplined in my testing and ensure nothing 
breaks, but I'm only human; automating things is the right way to go. I'll look 
at the c_glib example and update the docker images to run the cross tests.

And, I agree that it would be nice to have a second person knowledgeable in 
the language. I'm not sure how best to make that happen. Any ideas?


> 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
> Fix For: 0.11.0
>
>
> 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)


[jira] [Commented] (THRIFT-4176) Implement a threaded and threadpool server type for Rust

2017-04-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4176:


Github user asfgit closed the pull request at:

https://github.com/apache/thrift/pull/1255


> 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
> Fix For: 0.11.0
>
>
> 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)


[jira] [Commented] (THRIFT-4176) Implement a threaded and threadpool server type for Rust

2017-04-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4176:


Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1255
  
My only hesitation on these changes is that there are no cross tests for 
rust right now, so we don't have a good indicator on their stability in 
general.  We need to update the docker files for Ubuntu to include rust, and 
get rust into the crosstest (Travis build jobs 1, 2).  You can even follow the 
java-c_glib multiplexed test example if you want to make it complete.

I'm not very useful reviewing the code because I don't know the language.  
As for the appveyor build error, I will fix that.  Some path strings have to be 
unix-style with later releases of cmake or FindBoost gets "confused" and 
reports invalid escape sequences.


> 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)


[jira] [Commented] (THRIFT-4176) Implement a threaded and threadpool server type for Rust

2017-04-27 Thread Allen George (JIRA)

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

Allen George commented on THRIFT-4176:
--

I'd love to see this get in. This is a solid improvement over the current 
library code in terms of types and ease of use.

> 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)


[jira] [Commented] (THRIFT-4176) Implement a threaded and threadpool server type for Rust

2017-04-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4176:


Github user allengeorge commented on the issue:

https://github.com/apache/thrift/pull/1255
  
Updated the PR description with an example. This PR now contains the final 
state of all types, etc and should make the runtime code a lot cleaner and 
easier to use!


> 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)


[jira] [Commented] (THRIFT-4176) Implement a threaded and threadpool server type for Rust

2017-04-22 Thread James E. King, III (JIRA)

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

James E. King, III commented on THRIFT-4176:


[~codesf] any chance you could do a code review on this, given your comments 
above?

> 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)


[jira] [Commented] (THRIFT-4176) Implement a threaded and threadpool server type for Rust

2017-04-22 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4176:


Github user allengeorge commented on the issue:

https://github.com/apache/thrift/pull/1255
  
@jeking3 @Jens-G Any chance this could be merged in?


> 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)


[jira] [Commented] (THRIFT-4176) Implement a threaded and threadpool server type for Rust

2017-04-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-4176:


GitHub user allengeorge opened a pull request:

https://github.com/apache/thrift/pull/1255

THRIFT-4176: Implement threaded server for Rust

Client: rs

* Separate TTransport into two constructs: TIoChannel and TTransport
* Make TIoChannel and TTransport Send-able types
* Remove refcounting where possible
* Replace TSimpleServer with a thread-pool based TServer

The removal of refcounting was driven by the need to make constructs 
threadsafe. I'd always known the ref-counting was hacky; this approach pushes 
the counting/locking into a separate `TIoChannel` concept that can be cloned to 
simplify the ownership story for all the concepts above. Also, as requested, I 
didn't *add* a new server type: I replaced the existing one with this 
threadpool-based version.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/allengeorge/thrift thrift-4176

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/1255.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1255


commit 0a0592f333ea4c9be64dd83fa7ce6e78c7307567
Author: Allen George 
Date:   2017-01-30T12:15:00Z

THRIFT-4176: Implement threaded server for Rust
Client: rs

* Separate TTransport into two constructs: TIoChannel and TTransport
* Make TIoChannel and TTransport Send-able types
* Remove refcounting where possible
* Replace TSimpleServer with a thread-pool based TServer




> 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)


[jira] [Commented] (THRIFT-4176) Implement a threaded and threadpool server type for Rust

2017-04-18 Thread Allen George (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)


[jira] [Commented] (THRIFT-4176) Implement a threaded and threadpool server type for Rust

2017-04-18 Thread James E. King, III (JIRA)

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

James E. King, III commented on THRIFT-4176:


Sounds like THRIFT-3096. :)

> 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)


[jira] [Commented] (THRIFT-4176) Implement a threaded and threadpool server type for Rust

2017-04-18 Thread Randy Abernethy (JIRA)

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

Randy Abernethy commented on THRIFT-4176:
-

I would argue for a single great rust server. Multiple servers confuse users, 
they don't want to have to figure out which server to use and in most cases 
there is one server model that performs best or close enough in the vast 
majority of cases. If users need hyper performance or special cases they will 
probably write their own anyway. One server will reduce testing burden and 
focus all improvements iin one place. Some of our languages (Java/c++) look 
like a server science project and have caused users to waste huge sums of time 
trying to compare performance and features (often without the necessary 
context).. just my 2 cents



> 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)