简体   繁体   中英

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

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 messages (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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM