Skip to content
@Devisjs

Devis Microservices Framework

Pattern-matching microservices for Node.js

Devis

Pattern-matching microservices for Node.js. Register handlers under plain-object patterns, then call them in the same process or over TCP, Unix sockets, named pipes or RabbitMQ, with the same calling code.

// math.js
const devis = require("devis");
devis.push({ role: "math", cmd: "sum" }, async ({ left, right }) => left + right);
devis.listen({ host: "127.0.0.1", port: 3030 });
// client.js
const devis = require("devis");
devis.connect({ id: "math", host: "127.0.0.1", port: 3030 }, async () => {
    console.log(await devis.call({ role: "math", cmd: "sum" }, { left: 1, right: 2 })); // 3
    devis.close();
});

The client needs no service name: each service announces its patterns, and Devis routes every call to the one that matches best, in turn when several instances run. Since Devis 4.1: partial matching, automatic reconnection, load balancing and OpenTelemetry traces across services, on top of async handlers, timeouts, graceful shutdown and TypeScript types.

npm install devis   # Node.js 22 or later

Packages

Package What it does
devis The framework: patterns, local calls, TCP, Unix sockets, named pipes npm
devisPattern The pattern matcher behind Devis npm
devis-mongo-client MongoDB plugin npm
devis-pub_sub-redis Redis pub/sub plugin npm
devis_rabbitmq RabbitMQ transport with per-call RPC replies npm
generator-devis yo devis: scaffold a gateway and a microservice npm

Get started

  • Read the devis README for the API and recipes.
  • Run the examples: local calls, TCP, MongoDB, Redis, RabbitMQ.
  • Scaffold a project: npm install -g yo generator-devis && yo devis.

All packages are MIT licensed and tested on Node.js 22 and 24.

Pinned Loading

  1. devis devis Public

    Pattern-matching microservices for Node.js: async calls routed over TCP or Unix sockets, load balancing, reconnection, OpenTelemetry traces

    JavaScript 79 12

  2. generator-devis generator-devis Public

    Yeoman generator for Devis microservices projects

    JavaScript 10 3

  3. devisPattern devisPattern Public

    Exact and partial pattern matcher on JavaScript object properties, used by Devis

    JavaScript 10 2

  4. devis-mongo-client devis-mongo-client Public

    MongoDB plugin for the Devis microservices framework

    JavaScript 2

  5. devis-pub_sub-redis devis-pub_sub-redis Public

    Redis pub/sub plugin for the Devis microservices framework

    JavaScript 4

  6. devis_rabbitmq devis_rabbitmq Public

    RabbitMQ transport plugin for Devis, with per-call RPC replies

    JavaScript 3

Repositories

Showing 10 of 10 repositories

Top languages

Loading…

Most used topics

Loading…