You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Noam Wolf <no...@gmail.com> on 2009/12/25 06:24:34 UTC

Is a thrift server multi threaded in java?

Can multiple clients access a running instance of a thrift server at the
same time?

Say I have a thrift server (implement in Java) that's listening for any
requests made by clients, now say I have 2 separate clients that make a
simultaneous call to the same service method on the server... what happens?
does one block on the other?

Thanks!

Re: Is a thrift server multi threaded in java?

Posted by Dvir Volk <dv...@gmail.com>.
I can reply generally as I'm familiar with the specifics of the Java
implementation.
if you are using a threaded or threadpool server, then you can handle many
simultaneous requests in separate threads, without one blocking the other.
Of course, you have to handle the internal locking logic between these
threads in your application, and that might block if they are trying to gain
access to the same resource at once.
But that is just a general problem of multi threaded programs.

On Fri, Dec 25, 2009 at 7:24 AM, Noam Wolf <no...@gmail.com> wrote:

> Can multiple clients access a running instance of a thrift server at the
> same time?
>
> Say I have a thrift server (implement in Java) that's listening for any
> requests made by clients, now say I have 2 separate clients that make a
> simultaneous call to the same service method on the server... what happens?
> does one block on the other?
>
> Thanks!
>