Skip to main content
VRPC · Remote objects over MQTT

Stop writing API boilerplate.

Call C++, Node.js, Python, and Arduino classes across any network as if they were local objects. Perfect for microservices, IoT edge devices, and directly driving React frontends without REST, GraphQL, or WebSocket boilerplate.

VRPC
One call, end to end

A remote call that reads like a local one

A browser asks a Raspberry Pi in the kitchen for the temperature, then listens to every new reading. In between: your MQTT broker, and no API layer.

client.jsin the browser
const client = new VrpcClient({ domain: 'home' })
await client.connect()
const sensor = await client.getInstance('kitchen')

const celsius = await sensor.read()  // 21.4
await sensor.onReading(c => chart.add(c))
over MQTT
agent.json the Raspberry Pi
class Sensor {
  read () {
    return this._adc.celsius()
  }

  onReading (handler) {
    this._adc.on('reading', handler)
    const off = () => this._adc.off('reading', handler)
    return { [Symbol.dispose]: off }
  }
}

VrpcAdapter.register(Sensor)
new VrpcAgent({ domain: 'home', agent: 'pi-kitchen' })
  .serve()
On the wire
home/pi-kitchen/Sensor/kitchen/read{"c":"kitchen","f":"read","a":[],"i":"Xa3kP9qz-1"}
home/web-7f3a/k9x2{"r":21.4,"i":"Xa3kP9qz-1"}
Compared

Why not just use…

REST or gRPC?

Both need a contract you maintain (routes, schemas, .proto files) and a server others can reach. VRPC needs neither: your class is the contract, and agents only connect out.

Your own MQTT topics?

Then you write the RPC layer: matching answers to requests, timeouts, errors, discovery, knowing who still listens. VRPC is that layer, finished, tested and specified in 93 rules.

WAMP?

WAMP calls functions through its own router. VRPC calls objects: you create, call and delete them through the MQTT broker you already run, down to an ESP32.

Zenoh or NATS?

Excellent transports. VRPC works a layer higher: objects with a lifecycle, and events that live as long as someone listens.

Building a public HTTP API for strangers? Use REST. VRPC is for programs that belong together.

0 lines of IDL

Your classes are the interface: no schemas, routes or code generators.

0 open ports

on your devices: agents and clients only connect out, to the broker.

1 broker

The MQTT broker you already run, such as Mosquitto or HiveMQ.

5 platforms

Node.js, React, Python, C++ and Arduino, speaking one protocol.

93 rules

A written protocol, and tests that name the rules they check.

In production

VRPC runs the Heisenware platform.

Live

Ever talked directly to a website?

Start an agent on your machine, and this page finds it within a second - through your firewall, over a public broker - and can call it.

1

Run this on your machine

Set up and run
# 1. Prepare
npm init -y && npm install vrpc

# 2. Start the agent
node agent.js
agent.js
const { VrpcAgent, VrpcAdapter } = require('vrpc')

class SystemInfo {
static greet(sender, message) {
console.log(`[INCOMING MESSAGE] from ${sender}: "${message}"`)
return 'Greetings from Node.js Edge Device! I got your message.'
}
}

VrpcAdapter.register(SystemInfo)

async function main() {
const agent = new VrpcAgent({
domain: 'vrpc-live-demo',
agent: `visitor-js-${Math.floor(Math.random() * 10000)}`,
broker: 'mqtts://broker.hivemq.com:8883'
})

await agent.serve()
console.log('Waiting for messages...\n')
}

main().catch(console.error)
2

Watch it appear

Connecting to the radar…