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

Tobias Mucke commented on THRIFT-5283:
--------------------------------------

[~allengeorge]
 * I updated the rust <-> rust test harnesses and run them manually both with 
Tcp and Unix Domain Sockets. Looks good. (/)
 * I also worked on cross-test harnesses and tested them. There are still 18 
rust related tests that fail. However, they also fail in master branch. So, at 
least my contribution does not introduce new fails. (/)
 * Regarding unit tests: not sure which tests would make sense, as there is no 
logic involved in support Unix Domain sockets. I think, the rust compiler takes 
care of how this additional function is used. (?)

Having said that, I'll bring the PR forward shortly.

 

P.S. The testing code looks cluttered to me. I didn't improve it much but 
followed the existing approach. A refactoring might improve readability of the 
tests. Please let me know, if you would like to see further improvement in this 
area in future.

> Ability to listen over unix socket in thrift Rust crate
> -------------------------------------------------------
>
>                 Key: THRIFT-5283
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5283
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Rust - Library
>    Affects Versions: 0.13.0
>            Reporter: Prateek Kumar Nischal
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The rust crate for [thrift|https://crates.io/crates/thrift] right now has the 
> ability to create a server [but only over a TCP 
> socket|https://github.com/apache/thrift/blob/master/lib/rs/src/server/threaded.rs#L172].
> {code}
> pub fn listen<A: ToSocketAddrs>(&mut self, listen_address: A) -> 
> thrift::Result<()> 
> {code}
> The API requires the trait 
> [ToSocketAddrs|https://doc.rust-lang.org/std/net/trait.ToSocketAddrs.html] to 
> be implemented which is not possible for a Unix Domain Socket. 
> Other libraries, for example, python has an option to serve over unix 
> sockets. eg
> {code:python}
> TSocket.TServerSocket(unix_socket='/tmp/service.sock')
> {code}
> It would be really nice to be able to get a similar API in rust as well 
> unless there is a way to do it already. Please let me know if it already 
> exists.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to