Strange grizzly behaviour...

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Strange grizzly behaviour...

Erik Svensson-2
Howdy all,

I'm now running tests with Grizzly as a server using our own ProtocolParser.
Right now I have a client that connects to Grizzly, sends 10k messages,
waits about 10 seconds and then disconnects.
Problem is that my protocol parser only gets about 120 (the number varies
between runs) messages. If I fire up the client again the protocol parser
only receives a handful of messages.
I have no idea where the rest of the data is going. Using the yourkit
profiler I can't see anything strange at all.

I'm running java 1.5.0-13 on a MacBookPro with 3 GB ram and Mac OS X
10.4.11. RUnning both client and server on the same machine.

cheers
Erik Svensson, SIX AB


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Strange grizzly behaviour...

Jeanfrancois Arcand-2
Hi Erick,

Erik Svensson wrote:

> Howdy all,
>
> I'm now running tests with Grizzly as a server using our own ProtocolParser.
> Right now I have a client that connects to Grizzly, sends 10k messages,
> waits about 10 seconds and then disconnects.
> Problem is that my protocol parser only gets about 120 (the number varies
> between runs) messages. If I fire up the client again the protocol parser
> only receives a handful of messages.
> I have no idea where the rest of the data is going. Using the yourkit
> profiler I can't see anything strange at all.

Do you have any test case we can take a look at? Are you sure your are
registering back the SelectionKey after reading bytes (stupid question,
but guessing).


>
> I'm running java 1.5.0-13 on a MacBookPro with 3 GB ram and Mac OS X
> 10.4.11. RUnning both client and server on the same machine.

Same setup :-)

Thanks!

-- Jeanfrancois


>
> cheers
> Erik Svensson, SIX AB
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Strange grizzly behaviour...

Erik Svensson-2
On 2/12/08 11:19 PM, "Jeanfrancois Arcand" <[hidden email]>
wrote:

> Hi Erick,
>
> Erik Svensson wrote:
>> Howdy all,
>>
>> I'm now running tests with Grizzly as a server using our own ProtocolParser.
>> Right now I have a client that connects to Grizzly, sends 10k messages,
>> waits about 10 seconds and then disconnects.
>> Problem is that my protocol parser only gets about 120 (the number varies
>> between runs) messages. If I fire up the client again the protocol parser
>> only receives a handful of messages.
>> I have no idea where the rest of the data is going. Using the yourkit
>> profiler I can't see anything strange at all.
>
> Do you have any test case we can take a look at?

I'll try to extract the server part from the other code.

> Are you sure your are
> registering back the SelectionKey after reading bytes (stupid question,
> but guessing).

Eh? I've written a protocol parser as outlined on Scotts blog (now updated I
notice). There is no registering of SelectionKeys there.
 
cheers
Erik Svensson, SIX AB


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Strange grizzly behaviour...

Erik Svensson-2
Howdy all,

I've managed to overcome the problems I had. The problems seems to have
stemmed from having less than perfect understanding of the
semantics/contract of the ProtocolParser interface.
Lot's of trial and error and finally it worked.

So, the problem was with CBtK (Crap Behind the Keyboard) rather than
grizzly.

I'll do an update of the javadocs for ProtocolParser and post it here to
check for accuracy.

cheers
Erik Svensson, SIX AB

>> Hi Erick,
>>
>> Erik Svensson wrote:
>>> Howdy all,
>>>
>>> I'm now running tests with Grizzly as a server using our own ProtocolParser.
>>> Right now I have a client that connects to Grizzly, sends 10k messages,
>>> waits about 10 seconds and then disconnects.
>>> Problem is that my protocol parser only gets about 120 (the number varies
>>> between runs) messages. If I fire up the client again the protocol parser
>>> only receives a handful of messages.
>>> I have no idea where the rest of the data is going. Using the yourkit
>>> profiler I can't see anything strange at all.
>>
>> Do you have any test case we can take a look at?
>
> I'll try to extract the server part from the other code.
>
>> Are you sure your are
>> registering back the SelectionKey after reading bytes (stupid question,
>> but guessing).
>
> Eh? I've written a protocol parser as outlined on Scotts blog (now updated I
> notice). There is no registering of SelectionKeys there.
>  
> cheers
> Erik Svensson, SIX AB
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Strange grizzly behaviour...

Jeanfrancois Arcand-2
Hi Erick,

Erik Svensson wrote:

> Howdy all,
>
> I've managed to overcome the problems I had. The problems seems to have
> stemmed from having less than perfect understanding of the
> semantics/contract of the ProtocolParser interface.
> Lot's of trial and error and finally it worked.
>
> So, the problem was with CBtK (Crap Behind the Keyboard) rather than
> grizzly.
>
> I'll do an update of the javadocs for ProtocolParser and post it here to
> check for accuracy.

That will be great. Also if you can blog about your experience (the good
and the bad), I would link your stuff from the main page. If you can't,
just drop an email here and I will link to it. Your experience will help
next grizzlier I'm sure :-)

Thanks!

-- Jeanfrancois


>
> cheers
> Erik Svensson, SIX AB
>
>>> Hi Erick,
>>>
>>> Erik Svensson wrote:
>>>> Howdy all,
>>>>
>>>> I'm now running tests with Grizzly as a server using our own ProtocolParser.
>>>> Right now I have a client that connects to Grizzly, sends 10k messages,
>>>> waits about 10 seconds and then disconnects.
>>>> Problem is that my protocol parser only gets about 120 (the number varies
>>>> between runs) messages. If I fire up the client again the protocol parser
>>>> only receives a handful of messages.
>>>> I have no idea where the rest of the data is going. Using the yourkit
>>>> profiler I can't see anything strange at all.
>>> Do you have any test case we can take a look at?
>> I'll try to extract the server part from the other code.
>>
>>> Are you sure your are
>>> registering back the SelectionKey after reading bytes (stupid question,
>>> but guessing).
>> Eh? I've written a protocol parser as outlined on Scotts blog (now updated I
>> notice). There is no registering of SelectionKeys there.
>>  
>> cheers
>> Erik Svensson, SIX AB
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]