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

Alexander Shigin commented on THRIFT-67:
----------------------------------------

I've fixed most of your question, you can see the patches at 
http://gitweb.thrift-rpc.org/?p=thrift.git;a=shortlog;h=refs/heads/pri/shigin/py-nonblock

>108: What would you think about making this an "if" instead of an elif.

I think it causes some extra troubles and doesn't make big benefit. 

> 181: Why not implement the standard server interface?

Standard server interface includes transportFactory which hasn't got any sense 
in non-blocking server. I've separated input and output protocol factory and i 
don't think I can make an interface any closer to standard one.

> 227: Why are prepare, select, and handle public?

I've converted select to protected field. 

In my app (from which I get the server) I had to do some logic in main thread, 
so I do serve loop in my code. I think in some cases this can have some sense.

> 270: What would you think about deleting the function decorators at the end 
> of the file so that they don't pollute the module namespace?

I've introduced __all__ which contains only TNonblockinServer. It solves 
problem with "from TNonblockingServer import *"

> python non-blocking server
> --------------------------
>
>                 Key: THRIFT-67
>                 URL: https://issues.apache.org/jira/browse/THRIFT-67
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Library (Python)
>            Reporter: Alexander Shigin
>         Attachments: thrift-python-non-blocking.patch, 
> thrift-python-nonblocking-test.patch
>
>
> Implementation TNonblockingServer for python library.
> There is a couple of question to discuss:
>   * it has a slightly different interface for the rest of python servers. I 
> think, it's okay: for example TransportFactory hasn't got any sense for 
> non-blocking servers;
>   * it seems to have a huge ammount of bad grammar in doc strings;
>   * finally, I need a review.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to