Weird-stream have two methods - read and write. Means that the entire implementation could fit into 100 lines,Ĭorrection 200 lines now that there is full error checking, and close More normal streams and using simple message oriented streams write ( 'open - write to stream' ) weird streams Var packets = require ( 'packet-stream' ) var A = packets ( stream. To how the user thinks - like muxrpc Example This is a low level module that implements the core logic necessary for an rpcĪnd multiplexing module - it is intended to be wrapped in something closer So therefore packet-stream provides messages as the fundamental building block,Īnd implements request/response (async+callback) and streams (a sequence of messages) Shouldn't tcp be implemented on top of packets?Īny useful node api needs streams, but also needs callbacks and maybe events too. Is tcp implemented on top of tcp, but is this really the right approach? Modules are implemented, rpc or multiplexer, you'll see one thing:įramed messages are sent over a stream. Which had better support for binary, as was later wrapped to a moreīut something still wasn't right. This worked pretty well, although it felt like a messy glue job. Which used mux-demux and rpc-stream to create remote access to a leveldb instance. When leveldb came around, juliangruber wrote multilevel Unfortunately, mux-demux used json encoding, and so did not support binary very well. You could now stream many different things through one connection. Which supported streams but not callbacks. Than dnode, but could be piped over any node stream - this soon came to dnode. Was first - which supported async callbacks, but not streams. Many approaches to rpc and to multiplexing. Over the course of streams and so on with node, there have been A simpler approach to rpc/multiplexing proir work
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |