JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q9483F
  • License MIT

Fastest IPC communication module

Package Exports

  • zero-ipc

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (zero-ipc) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Zero IPC

Fastest IPC communication module

Greenkeeper badge NPM Version Build Status

Fastest IPC communication module

Motivation

When creating multiple processes on the machine there is the need for the these processes to comunicate.

High level communication can be established using http for example. The problem with such protocol is the they add another layer of parsing and overheads.

Zero IPC enables low level commiucation with almost no overheads using unix sockets files. IPC - internal process communication.

Over that low level communication there is also a simple async rpc helpers with promises as a response.

Bonus it allow more than one client for each socket created by server.

Example

More examples can be found in the integration tests. Also in the integration you will find an integration with RX observables.

    const {IPCClient , IPCServer} = require('zero-ipc');
    const unixPathPrefix = './test-ipc';

    const server = new IPCServer((connection)=>{
    })
    server.on('request' , function(message){
        message.replay('hi');
    })
    server.listen({
        removeOpenFiles : true,
        in : unixPathPrefix+".in.sock",
        out : unixPathPrefix+".out.sock"
    })
    const client = new IPCClient({
        out : unixPathPrefix+".in.sock",
        in : unixPathPrefix+".out.sock"
    } , ()=>{

    })

    IPCClient.promiseSendWithReplay(client , 'test1' , 100)
    .then((message)=>{
        console.log(message.toString());
        //hi
    })

License

MIT