Hi All,

In my effort to add Bi-Directional RPC to Thrift (see previous emails
to this list) I came up against a potential performance problem with
the way TSocket currently works. At present when you call Read it
blocks until there is data to read or the connection throws an
Exception. The problem is to implement the Bi-Dirctional RPC that
requires lots of extra threads. In my current implementation (see
below for the download URL) it causes at least 2 threads per
connection on top of what the Server class uses per connection. I
would like to get this down to all use the single thread used by the
server class.

http://www.cpsoftware.com/MultiplexedThriftTest.zip

How does everyone feel about modifying the TSocket interface to
provide an int Get Property which returns the number of bytes
currently available. This data is easily obtained from the .Net socket
implementation. Any TSocket that can provide that data could always
buffer it using its own thread. This would only provide a worse case
which is currently what happens, so in that case we would be no worse
off.

What does everyone think ?

Charlie M

Reply via email to