# betta-rpc

> a lightweight RPC build on top of redis queues

Latest version **0.1.0** (published 2013-07-03) · 0 weekly downloads

## Install

```sh
npm install betta-rpc
pnpm add betta-rpc
yarn add betta-rpc
bun add betta-rpc
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2013-07-03 |
| First published | 2013-07-03 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | levin |
| Maintainers | syklevin |
| Keywords | redis, rpc |

## Links

- npm: https://www.npmjs.com/package/betta-rpc
- Repository: https://github.com/syklevin/betta-rpc
- Issues: https://github.com/syklevin/betta-rpc/issues
- npm.io page: https://npm.io/package/betta-rpc

## Dependencies (1)

- [redis](https://npm.io/package/redis.md) latest

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2013-07-03

## README

#betta-rpc - lightweight redis rpc on nodejs

a lightweight RPC build on top of redis queues.

+ Tags: node.js

##Installation
```
npm install betta-rpc
```

##Usage
###Server
``` javascript
var bettarpc = require('betta-rpc');

var server = new bettarpc.Server({
  host: 'localhost',
  port: 6379,
  namespace: 'chat_server',
})

server.serve({
  halo: function(say, reply){
    reply(null, say + ' wow');
  },

  bye: function(reply){
    reply(null, 'bye');
  }
});
```

###Client
``` javascript
var bettarpc = require('betta-rpc');

var client = new bettarpc.Client({
    host: 'localhost',
    port: 6379,
    namespace: 'chat_server',
    timeout: 10
  });

  client.connect(function(err, c){

    c.invoke('halo', 'hi1', function(err, res){
      if(err){
        console.error(err);
      }
      else{
        console.log('resp:', res);
      }
    });

    c.invoke('bye');
  });

```

---
_Source: https://npm.io/package/betta-rpc · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
