I am working on a project that will be working under extreme high loads.
I will like to know which thread model and socket functions should I use to meet the following requirement:
1) a socket client program that connects to a server program. This server program will be sending large number of socket messages to the client per seconds. I am expecting about 20 messages per seconds.
2) this program utilises memory queue and has been implemented in the form of lbrary. I am thinking of using threads to queue the messages into the mem queue as fast as possible.
3) After the message has been inserted into the memory queue, there will be a callback function that retrieves the messages and decode it and then puts it back into another memory queue which will send it to another server program.
As I am new to multi thread programming concets, I am not sure on how I can program it in C language. Will appreciate if some of you can give me some hints or
guide. Do u think that I need to use mutexes? My idea is to have a simple program that just create a thread and sends it into queue, process it and sends it into another queue to send out.
Also is there any special socket libraries that I need to use to achieve such high performance?
Please advise. Thanks.