I am considering integrating Disruptor-Net lib into a project which processes binary messages from multiple clients received by a TCP server implemented on top of .net's async socket operations. I am thinking using disruptor lib in order to address this kind of pipeline:
- framing of the network bytes stream (split the network received bytes stream into packet bytes)
- transforming a bytes buffer representing a single message into a C# object representation
- apply business logic to the object preparing a reply to the TCP client
- prepare a binary message encoding the reply into bytes ready to be sent over TCP connect
- send the reply back to the TCP client.
This sequence of actions takes place for each connected client (and can be many of them).
How would you recommend to use disruptor in this scenario:
1. a single instance for all the clients?
2. multiple instances - one for each connected socket?
Generally, does it make sense to use multiple disruptor instances in one application?
Thanks,
Robert
PS Putting these kind of questions shows my novice level regarding disruptor pattern, right? :-)