Critically Efficient Server

I am developing an application based on a client server for financial alerts, where the client can set the value as an alert for the selected financial instrument, and when this value is reached, the monitoring server will somehow alert the client (email, sms ... not important) . The server will monitor updates coming from the data generator program. Now the server should be very efficient, since it should handle a lot of clients (perhaps more than 50-100 000 warnings, with updates coming in 1.2 seconds). I already wrote servers, but never with such imposed actions, I just fear that the basic approach (as before) simply will not do this. So how do I design a server? Which data structures are best suited? .. how about multithreading? ... in general,What should I do (and what should I not do) to squeeze every drop of performance out of this?

Thanks.

+3
source share
9 answers

I have already worked on such servers. All of them were written in C (or rather simple C ++). But they were even higher - processing 20 thousand updates per second (all updates from most major stock exchanges).

We will focus on not copying memory. We were very careful in the STL classes that we used. As for updates, each financial instrument will be an object, and any customers who want to hear about this instrument will subscribe to it (i.e. are added to the list).

, - , , , / ( - , , ).

EDIT: , , , . 20K/sec , , . , .

+3

, , , , , .

, Apache ActiveMQ RabbitMQ , , .

+3

, - , , , , , .

, .

0

- , .

, ( ), , .

50 000 ? : ?

- . : " ", .

0

, , . , Tandem .Net.

Java .Net - C ++. , .

- (.. (), select() Windows), , . C10K .

++-, ACE ( ), . - concurrency . , , , , .

0

, , , - , ; , . , .

, . DougN , . , , , . .

, , ( ..) .

0

, BlockingQueue.

, BlockingQueue , , . , - .

(Thread) , . , .

, , ( ..).

, 100 000 .

0

, .

, , . 0, n. , . , ( ), , , .

0
source

Perhaps the infrastructure of the Apache Mina network application , as well as Apache Camel for message routing, is a good starting point. Also Kilim messaging frameworks look very promising.

0
source

Source: https://habr.com/ru/post/1708815/


All Articles