node-ipc/params.json

1 line
18 KiB
JSON
Raw Normal View History

2014-02-28 11:04:14 +11:00
{"name":"Node-ipc","tagline":"Inter Process Communication Module for node using Unix sockets and servers. Giving lightning speed by bypassing the network card for local sockets and ipc.","body":"#node-ipc\r\n*a nodejs module for local and remote Inter Process Communication* for Linux, Mac and Windows.\r\n\r\n**npm install node-ipc** \r\n[![alt node-ipc npm details](https://nodei.co/npm/node-ipc.png?stars=true \"node-ipc npm module details \")](https://npmjs.org/package/event-pubsub \"node-ipc details from npm\")\r\n\r\nPackage details websites :\r\n* [GitHub.io site](http://riaevangelist.github.io/node-ipc/ \"node-ipc documentation\"). A prettier version of this site.\r\n* [NPM Module](https://www.npmjs.org/package/node-ipc \"node-ipc npm module\"). The npm page for the node-ipc module.\r\n\r\n\r\n\r\n----\r\n#### Types of IPC Sockets\r\n\r\n| Type | Stability |Definition |\r\n|-----------|-----------|-----------|\r\n|Unix Socket| Stable | Gives Linux and Mac lightning fast communication and avoids the network card to reduce overhead and latency. [Local Unix Socket examples ](https://github.com/RIAEvangelist/node-ipc/tree/master/example/unixSocket/ \"Unix Socket Node IPC examples\") |\r\n|TCP Socket | Stable | Gives the most reliable communication across the network. Can be used for local IPC as well, but is slower than #1's Unix Socket Implementation because TCP sockets go through the network card while Unix Sockets do not. [Local or remote network TCP Socket examples ](https://github.com/RIAEvangelist/node-ipc/tree/master/example/TCPSocket/ \"TCP Socket Node IPC examples\") |\r\n|TLS Socket | Alpha | ***coming soon...*** |\r\n|UDP Sockets| Stable | Gives the **fastest network communication**. UDP is less reliable but much faster than TCP. It is best used for streaming non critical data like sound, video, or multiplayer game data as it can drop packets depending on network connectivity and other factors. UDP can be used for local IPC as well, but is slower than #1's Unix Socket Implementation because UDP sockets go through the network card while Unix Sockets do not. [Local or remote network UDP Socket examples ](https://github.com/RIAEvangelist/node-ipc/tree/master/example/UDPSocket/ \"UDP Socket Node IPC examples\") | \r\n\r\n| OS | Supported Sockets |\r\n|-----|--------------------|\r\n|Linux| Unix, TCP, TLS, UDP|\r\n|Mac | Unix, TCP, TLS, UDP|\r\n|Win | TCP, TLS, UDP | \r\n\r\n**Windows** users may want to use UDP servers for the fastest local IPC. Unix Servers are the fastest oprion on Linux and Mac, but not available for windows. \r\n\r\n----\r\n\r\n#### IPC Methods \r\nThese methods are available in the IPC Scope. \r\n\r\n----\r\n##### log\r\n\r\n``ipc.log(a,b,c,d,e...);`` \r\n\r\nipc.log will accept any number of arguments and if ``ipc.config.silent`` is not set, it will concat them all with a sincle space ' ' between them and then log them to the console. This is fast because it prevents any concation from happening if the ipc is set to silent. That way if you leave your logging in place it should not effect performance.\r\n\r\nthe log also supports [colors](https://github.com/Marak/colors.js) implementation. All of the available styles are supported and the theme styles are as follows :\r\n\r\n {\r\n good : 'green',\r\n notice : 'yellow',\r\n warn : 'red',\r\n error : 'redBG',\r\n debug : 'magenta',\r\n variable: 'cyan',\r\n data : 'blue'\r\n } \r\n\r\nYou can override any of these settings by requireing colors and setting the theme as follows :\r\n\r\n var colors=require('colors');\r\n \r\n colors.setTheme(\r\n {\r\n good : 'zebra',\r\n notice : 'redBG',\r\n ...\r\n } \r\n );\r\n----\r\n##### connectTo\r\n\r\n``ipc.connectTo(id,path,callback);`` \r\n\r\nUsed for connecting as a client to local Unix Sockets. ***This is the fastst way for processes on the same machine to communicate*** because it bypasses the network card which TCP and UDP