1.0.6 • Published 7 years ago

shimo-messenger v1.0.6

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

shimo-messenger

Insanely Fast Communication Library For Node.js Services Using Redis

Installation

npm install shimo-messenger

What is shimo-messenger

shimo-messenger is a library that makes network communication via Redis dead simple and insanely fast! It support multi responses and easy to use:

client.send(data).then(returnArray => console.log(returnArray))

Example:

var messenger = require('shimo-messenger');

var client = new messenger.Speaker({
  autoConnect: true
});
var server = new messenger.Listener();
var server2 = new messenger.Listener();

server.on('give it to me', function(message, response){
  response({you: 'get 1'});
});

server2.on('give it to me', function(message, response){
  response({you: 'get 2'});
});

// Wait for redis initialize
setTimeout(function(){
  client.send('give it to me', {hello:'world'}).then(result => {
    console.log(result);
  });
}, 100);

Output:

> [{'you':'got 1'}, {'you':'got 2'}]
1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago