tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob DeRemer <>
Subject weird behavior using Tomcat 7 JSR-356 client implementation in standalone multi-threaded test client
Date Sun, 03 Nov 2013 02:29:22 GMT
We've created a test client that spins up multiple websocket clients - each in their own thread.
 While using their own thread isn't very resource efficient, that's ok.  We want each client's
send/receive to be isolated from each other.   Our client logic is using a JSR356 client that
extends Endpoint and implements Whole<byte[]>.  In addition, we have message synchronization,
so each client will not send a new request until it's received the corresponding respone (i.e.
we have our own req/resp messages with unique IDs).

Our client is running the JVM with the following:
java -Dserver -Dd64 -Xms24G -Xmx48g -XX:+UseNUMA -XX:+UseG1GC

We are seeing a problem when running multiple clients.   It appears that we're sending messages
on 1 websocket client, but sometimes receiving the message on a different websocket.   It
can be as little as 1000 or as many as 25000.  It seems to depend on how fast responses are
received whether we see the problem.  We have checked the server logging and have verified
that all messages have been received and sent back on the proper websocket connection.

When using Tomcat's JSR-356 client implementation in a standalone java app, what kind of threading
does it use under the hood when messages are received?  Is there any possibility that there
can be any cross-talk?

NOTE: we're using the following jar(s) in our standalone client:

Skype: bob.deremer.thingworx
O: 610.594.6200 x812
M: 717.881.3986

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message