thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: questions about javascript client
Date Thu, 09 Sep 2010 22:38:13 GMT
Hi Rafael

please reply next time to the mailing list and not just to my personal  
mail... that's Open Source;-)

The fastcgi thing I mentioned is not available right now, but this  
should be a relatively easy step. Something like a  
transport/TFastcgiServer.cpp very similar to other transport  
It's just on my wishlist... I should create a JIRA Ticket for that.

Your second question:
The THttpServer.cpp fits into the Thrift framework just as other  
transports and it can be used in combination with TSimpleServer,  
TThreadedPoolServer and probably with others as well.

Currently I just use binary protocol with ThreadedPoolServer, but for  
the future, I see many interesting options.



Hi Roger,

Thanks for your very helpful response! I was unaware that there was even a
C++ THttpServer. A couple of more questions about implementation details...

You mention that your favorite setup is a C++ Thrift server using fastcgi as
the transport. What exactly do you mean by this? Which C++
protocol/transport classes do you use?

Also, since you connect via the web server's fastcgi interface, do you still
need to use THttpServer? Since the communication is now happening on the
server side, it seems like you could use TSimpleServer or
TNonblockingServer. Is this what you use?


Quoting Roger Meier <>:

> Hi Rafael
> here's my perspective:
> 1.javascript client in a production environment ?
> I like to do so! As soon as I or some of my co-worker have time to  
> fix at least the map type bug (THRIFT-863) and do additional in deep  
> tests with the current implementation. That's just one of the  
> reasons why I provided additional tests for the JavaScript Testsuite  
> within test.html. Another playground for me is the JavaScript  
> tutorial that I use  
> to demonstrate Thrift's simplicity and its usage across Languages...  
> or to find bugs or neccessary enhancements within the current  
> implementation.
> 2. configuration on the server side to direct requests to Thrift services?
> Apache or Lighttpd proxy module for the Thrift service when using a  
> dedicated Http server like C++ THttpServer(THRIFT-247) or TServlet  
> running in a Java Web Container, etc...
> My favorit configuration is still a C++ Thrift Server using fastcgi  
> as its transport connected via web server's fastcgi interface.
> From my perspective, Thrift and JavaScript is a real hot combination  
> with a large potential.
> One thing to keep in mind is security!
> There is no pluggable security layer available right now, so you  
> need additional parameters with e.g. a SessionId on each function  
> you define within your Thridt IDL.
> OAuth, SPENGO, pluggable custom auth layer, etc. is future.... but  
> SASL Auth Layer for JAVA is already here.
> Regards
> Roger
> Am 08.09.2010 19:37, schrieb Rafael Garcia:
>> The example javascript client in lib/js relies on a barebones http server
>> ( compiled specifically for the ThriftTest service
>> (ThriftTest.thrift). I have a couple of questions:
>> 1. Are people using the javascript client in a production environment?
>> 2. If so, what's a typical configuration on the server side to direct
>> requests to Thrift services? The solution provided in doesn't
>> seem very generic, and it's unclear to me how one would accomplish the same
>> task on a production http server (like apache).
>> Thanks!
>> Rafael

This message was sent using IMP, the Internet Messaging Program.

View raw message