Hello, HN!<p>I've recently been getting deeper into node.js for things other than your typical web app, and have encountered a topic I'm not familiar with: network programming. I am completely ignorant on the topic and seek some guidance.<p>Can anyone recommend any high-level books (or other resources) on network programming? For example, something that covers patterns like PUB/SUB, REQ/RES, Router/Dealer, etc.<p>Thanks in advanced!
The classics for learning about network programming is the TCP/IP Illustrated series by W. Richard Stevens:<p>TCP/IP Illustrated, Volume 1: The Protocols
<a href="http://www.amazon.com/TCP-Illustrated-Volume-Addison-Wesley-Professional/dp/0321336313" rel="nofollow">http://www.amazon.com/TCP-Illustrated-Volume-Addison-Wesley-...</a><p>TCP/IP Illustrated, Volume 2: The Implementation
<a href="http://www.amazon.com/TCP-IP-Illustrated-Implementation-Vol/dp/020163354X" rel="nofollow">http://www.amazon.com/TCP-IP-Illustrated-Implementation-Vol/...</a><p>TCP/IP Illustrated, Volume 3: TCP for Transactions, HTTP, NNTP, and the UNIX Domain Protocols
<a href="http://www.amazon.com/TCP-Illustrated-Vol-Transactions-Protocols/dp/0201634953" rel="nofollow">http://www.amazon.com/TCP-Illustrated-Vol-Transactions-Proto...</a><p>While they start at much lower level than generic patterns, they build the basis to understand the core of networking, and the the later books go into details about effective usage of the protocols.
Since your example patterns seem to be informed by ZeroMQ, I recommend checking out the online 'zguide' book at <a href="http://zguide.zeromq.org/page:all" rel="nofollow">http://zguide.zeromq.org/page:all</a>.
If you are learning about networking, and not just using somebody else's library, Beej's guide is an excellent starting point:<p><a href="http://beej.us/guide/bgnet/" rel="nofollow">http://beej.us/guide/bgnet/</a>
You might find the books "C++ Network Programming, Volume I: Mastering Complexity with ACE and Patterns"[0] and "C++ Network Programming, Volume 2: Systematic Reuse with ACE and Frameworks"[1] useful.
They talk about implementation of the "Adaptive Communication Environment" [2] which is an open-source project for network programming.
Also, as nextos mentioned below, the "Pattern-Oriented Software Architecture" series.<p>[0] <a href="http://www.amazon.com/Network-Programming-Volume-Mastering-Complexity/dp/0201604647/" rel="nofollow">http://www.amazon.com/Network-Programming-Volume-Mastering-C...</a><p>[1] <a href="http://www.amazon.com/Network-Programming-Volume-Systematic-Frameworks/dp/0201795256" rel="nofollow">http://www.amazon.com/Network-Programming-Volume-Systematic-...</a><p>[2] <a href="http://en.wikipedia.org/wiki/Adaptive_Communication_Environment" rel="nofollow">http://en.wikipedia.org/wiki/Adaptive_Communication_Environm...</a>
Just Open a Socket - Connecting Applications to Distributed Systems is a great talk to watch:<p><a href="https://www.youtube.com/watch?v=jytJXjI0oQU" rel="nofollow">https://www.youtube.com/watch?v=jytJXjI0oQU</a>
<a href="https://speakerdeck.com/seancribbs/just-open-a-socket-connecting-applications-to-distributed-systems" rel="nofollow">https://speakerdeck.com/seancribbs/just-open-a-socket-connec...</a><p>Other talks from ricon.io and the various Erlang conferences are great too, but those are more about distributed systems and not primarily network programming. But since you mentioned the ZeroMQ patterns that should be just what you want.<p><a href="http://thinkdistributed.io/" rel="nofollow">http://thinkdistributed.io/</a>
<a href="http://ricon.io/" rel="nofollow">http://ricon.io/</a>
<a href="https://www.youtube.com/user/ErlangSolutions/videos" rel="nofollow">https://www.youtube.com/user/ErlangSolutions/videos</a>
Not directly answering your question, but: ZeroMQ is a network programming library that uses and encourages the use of "patterns". Take a look at the (excellent) ZeroMQ manual.