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

Esteve Fernandez commented on THRIFT-311:
-----------------------------------------

> It appears as of this writing that Boost.Coroutine is still sitting in the 
> Boostpro vault; it is not 
> yet integrated with mainline Boost.
>
> There has been no major list traffic about it since April, and it seems to 
> have some 
> performance and scalability issues on Windows.
> The original author mentions in the documentation that there are issues with 
> GCC's
> implementation of thread-local storage as well.

Coroutines are just a convenience for using futures without having to write 
tons of callback functions (see Twisted's inlineCallbacks).

> Boost.Future is not integrated yet either. Futures look syntactically nice, 
> but tricky to work 
> into an explicitly coroutined I/O model without additional support from 
> something like CoCo or
> Boost.Coroutine; kind of rules them out for shipping product.

Sorry, but I fail to see how you would implement a fully asynchronous version 
of Thrift, without futures or threads. I don't understand why you're dropping 
futures, the Twisted generator uses Deferreds (similar to futures) but doesn't 
use coroutines, and it's fully asynchronous.

> It looks like for my application, I may need to take a similar approach to 
> Erik Bernhardsson's. 
> He posted some patches to the Thrift lists, however, they haven't shown up on 
> JIRA.
>
> What I may do next is: extract that, play with it on my desktop a bit, and 
> open a separate 
> JIRA sub-task for THRIFT-1 in parallel with this one.

As I said in THRIFT-579, I'm not sure about the legal implications of posting 
someone else's code.

In any case, the original intent for this ticket was already to build an 
asynchronous version of the C++ generator. Rush, could you file a new ticket 
(MSVC port, e.g.) and attach your code?

> ASIO client & server
> --------------------
>
>                 Key: THRIFT-311
>                 URL: https://issues.apache.org/jira/browse/THRIFT-311
>             Project: Thrift
>          Issue Type: Sub-task
>          Components: Library (C++)
>            Reporter: Esteve Fernandez
>         Attachments: MsvcPatchSupportScripts.zip, thrift-808166-Patched.zip, 
> thrift_connection.cpp, thrift_connection.hpp, thrift_connection_v2.cpp, 
> thrift_handler.cpp, thrift_handler.hpp, thrift_main.cpp, thrift_server.cpp, 
> thrift_server.hpp, ThriftCalculatorASIOServer.cpp, 
> ThriftMsvcPatchForSvnRev803313.txt, 
> ThriftMsvcPatchForSvnRev803313_Rev1.txt.zip, 
> ThriftMsvcPatchForSvnRev808166.txt.zip
>
>
> Given the recent discussion on a Windows port and moving to ASIO 
> (http://mail-archives.apache.org/mod_mbox/incubator-thrift-dev/200901.mbox/%[email protected]%3e),
>  I decided to hack a little Thrift asynchronous prototype server using ASIO 
> and here's the result. It implements the Calculator service that can be found 
> in the tutorial and, just like TNonblockingServer, it uses a FramedTransport.
> It's just a quick prototype, but I think it's enough for building a more 
> generic server/protocol. I've only tested it in Linux, but I think there's 
> nothing platform-dependent and can be compiled "as is" in Windows.

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