开发者

how can we tell if the remote server is multi-threaded?

开发者 https://www.devze.com 2023-02-07 02:24 出处:网络
My customer did not gave me details regarding the nature of it\'s application. It might be multithreaded it might be not. His server serves SOAP mess开发者_高级运维ages (http requests)

My customer did not gave me details regarding the nature of it's application. It might be multithreaded it might be not. His server serves SOAP mess开发者_高级运维ages (http requests)

Is there any special trick in order to understand if the peer is single or multi threaded?

I don't want to ask the customer and I don't have access to his server/machine. I want to find it myself.


It's irrelevant. Why do you feel it matters to you?

A more useful question would be:

Can the server accept multiple simultaneous sessions?

The answer is likely to be 'yes, of course' but it's certainly possible to implement a server that's incapable of supporting multiple sessions.

Just because a server supports multiple sessions, it doesn't mean that it's multi-threaded. And, just because it's multi-threaded doesn't mean it will have good performance. When servers need to support many hundreds or thousands of sessions, multi-threading may be a very poor choice for performance.

Are you asking this question because you want to 'overlap' SOAP messages on the same connection - in other words, have three threads send requests, and then all three wait for a response? That won't work, because (like HTTP) request and response messages are paired together on each connection. You would need to open three connections in order to have three overlapped messages.


Unfortunately, no, at least not without accessing the computer directly. Multiple connections can even be managed by a single thread, however the good news is that this is highly unlikely. Most servers use thread pooling and assign a thread to a connection upon a handshake. Is there a particular reason why you need to know? If you're presumably going to work on this server, you'll know first-hand how it works.


It doesn't matter if the server is multithreaded or not. There are good and efficient ways to implement I/O multiplexing without threads [like select(2) and suchlike], if that's what worries you.

0

精彩评论

暂无评论...
验证码 换一张
取 消