How do i design a socket server, which accept various trades ( stock symbol, its value ) Trades are coming in the form of continuous stream. I need to process those trades based on the subscription client list.
A:
I think your question is very vague and does not really provide much background info, so you need to do your homework and learn how to ask a question, before posting it here.
I am assuming that you are asking what the main libraries should be / what the main design methodology should be.
Have you considered using libevent (C http://monkey.org/~provos/libevent/) or EventMachine (Ruby - http://rubyeventmachine.com/ )?
Basically, using evented I/O is great if you want to design a scalable server that might possibly have many clients talking over a network... (i.e., many simultaneous connections).
This is as opposed to using select() on sockets that you open up and poll for activity.
rmk
2010-03-24 18:08:23