This is very cool. When you are measuring a savings what are you
saving? time, cpu, bites on the wire...
-dain
On Oct 26, 2006, at 8:47 PM, Mark DeLaFranier wrote:
Hey guys,
I am sorta informally looking at the performance of OpenEJB. Now I
am certainly not trying to open a can of worms here. :-) An idea
that I am currently playing with is to modify the client so that it
can re-use an existing open socket connection to the server rather
then doing open-write-read-close and at the same time, the server
will loop and keep reading requests from the same socket.
My first thought was to enhance the OEJP to support "headers" like
HTTP does and then use the "keepalive" idea. I bumped up the OEJP
version to 2.1 so that the client/server would know to check for
the existance of headers in the request/response. The marshalled
headers would be in the format of:
Existing structure: [OEJP/2.0][request-id][request-data]
New structure: [OEJP/2.1][#-of-headers][headers][request-id]
[request-data] where headers is [len][name-data][len][value-data]
This saved, combined with socket pooling, approx. 34%
My second thought was to avoid the NVP headers and use a byte array
of bit flags, the new format is:
[OEJP/2.1][byte-of-flags][request-id][request-data]
This is 27% faster then my first thought.
I like to carry this forward a little more, but I would like to
peoples thoughts on this first.
Thanks
Mark