Menu

#2 Comm :: ClientSideMessages are different from those sent by Server

1.0
closed
nobody
defect (2)
2016-11-18
2016-11-18
No

Symptoms:
Based on the log information provided by tests, we've seen that the messages sent by the server are not the same that are being recevied by clients.

Messages sent by server:
Buy order has been fulfilled.
ServerComm >> Sending ClientSideMessage: [Type: ORDER] [Order: buy ES, 0 units at 1.0 EUR/unit (nickname: jppires, serverID: 4)]

ServerComm >> Sending ClientSideMessage: [Type: ORDER] [Order: sell ES, 0 units at 1.0 EUR/unit (nickname: ampg, serverID: 2)]

Messages received by clients:
ClientComm >> Processing ClientSideMessage: [Type: ORDER] [Order: buy ES, 1 units at 1.0 EUR/unit (nickname: jppires, serverID: 4)]

ClientComm >> Processing ClientSideMessage: [Type: ORDER] [Order: sell ES, 1 units at 1.0 EUR/unit (nickname: ampg, serverID: 2)]

Cause
Socket cache (http://stackoverflow.com/questions/13369788/java-object-serialization-deserialization-caching-over-socket)

Discussion

  • João Paulo Ferreira Pires

    The solution is to reset the OutputStream either for client and for server in order to avoid cache.

     
  • João Paulo Ferreira Pires

    The correction is available in the version ES1-2016-IPLC-84-mt-comm-0.0.4.zip.

     
  • João Paulo Ferreira Pires

    • status: open --> closed
     

Log in to post a comment.