Threading Model
Applications that connect to the platform will receive data on the ks thread created by the KeySession. Applications may perform business logic on the ks thread if they are able to keep up with the rate of incoming data. In addition, the ks thread may also be used to publish data back to the platform.
Applications can be passed messages in a number of formats, e.g. SBE, DTOs, Java Objects, Java Maps, etc.
It is important to note that when a SBE is passed through to the application layer that the SBE is backed by a transport buffer. Therefore the SBE should only be used for the duration of that method call - if it is needed beyond the method call, then it should be cloned.
This only applies to SBEs. All other data types can be used beyond the duration of the method call and will be garbage collected as appropriate.
The ks thread can be core pinned to an isolated cpu for low latency applications. Ask your KeySquare representative for more information on performance tuning.