architecture - High Performance Options for Remote services access -


i have service, foo, running on machine a. need access service machine b. 1 way launch web server on , via http; code running under web server on accesses foo , returns results. write socket server on a; socket server access service foo , returns result.

http connection initiation , handshake expensive; sockets can written, want avoid that. other options available high performance remote calls?

http protocol on socket. if using tcp/ip networks, going using socket. http connection initiation , handshake not expensive bits, it's tcp initiation that's expensive bit.

if use http 1.1, can use persistent connections (keep-alive), drastically reduces cost, closer of keeping persistent socket open.

it depends on whether want/need higher-level protocol. using http means able things consume service lot more clients, while writing less documentation (if write own protocol, have document it). http servers supports things authentication, cookies, logging, out of box. if don't need these sorts of capabilities, http might waste. i've seen few projects don't need @ least of these things.


Comments