# \[ANN\] Rembus.jl 1.0

**URL:** https://discourse.julialang.org/t/ann-rembus-jl-1-0/130882
**Category:** Package Announcements
**Created:** [July 20, 2025, 5:45pm UTC](https://discourse.julialang.org/t/ann-rembus-jl-1-0/130882 "2025-07-20T17:45:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![attdona](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/attdona/32/15859_2.png) [@attdona](https://discourse.julialang.org/u/attdona)
#### Post date: [July 20, 2025, 5:45pm UTC](https://discourse.julialang.org/t/ann-rembus-jl-1-0/130882/1 "2025-07-20T17:45:37Z")

</div>

The Rembus 1.0.0 version retains much of the original API while taking a **significant step forward** in the spirit of providing a **simple yet powerful** way to build distributed applications.

## What Makes Rembus Unique?

Rembus is a infrastructure-free **middleware** for distributed applications, with a broker  
process that routes between nodes and can be used as a **general-purpose library** for building customs distributed applications.

For example if you don’t need a broker but simply two remote components to communicate with each other you can use Rembus to setup a **direct connection** between them.

See the [docs](https://cardo-org.github.io/Rembus.jl/stable/) for some more details.

## A Client-Server Architecture

Suppose you have to transfer a Julia DataFrame to a remote process that needs to consume it as a Pandas DataFrame.

This is how Rembus can help you to solve this case:

### The julia server

```julia
using Rembus
using DataFrames

function get_julia_dataframe()
    return DataFrame(:name=>["name_$i" for i in 1:10], :x=>1:10, :y=>rand(10))
end

rb = component("julia_server", ws=8000)
expose(rb, get_julia_dataframe)
wait(rb)

```

### The python client

After installing the python `rembus` package:

```shell
pip install rembus

```

Invoke the RPC service implemented in julia and get the pandas dataframe as  
response:

```python
import rembus

rb = rembus.node()
df = rb.rpc("get_julia_dataframe")

```

## A Rembus glimpse: Distributed REPLs

Rembus is designed for **long-running distributed applications** , but let’s start with a simple example: a **distributed REPL system** for exchanging data and computations.

This approach enables **rapid prototyping** of distributed applications.

### Step 1: Start a Broker

A **broker** component routes messages between distributed applications.  
It listens on port `8000` for WebSocket clients.

```julia
# REPL_1
using Rembus

broker = component(ws=8000)

```

### Step 2: Create a Subscriber

A component subscribes to a **topic** and reacts to incoming messages.

```julia
# REPL_2
using Rembus

sub = component("mysubscriber")

function mytopic(msg)
    println("Received message: $msg")
end

subscribe(sub, mytopic)
reactive(sub) # Commands the broker to stream messages to this subscriber

```

### Step 3: Publish Messages

A **publisher** component sends messages to the topic.

```julia
# REPL_3
using Rembus
pub = component("mypublisher")
publish(pub, "mytopic", "Hello World")

```

At this point, we’ve implemented a **basic Pub/Sub system** with:  
🔹 **A broker** (message router)  
🔹 **A subscriber** (listens for messages)  
🔹 **A publisher** (sends messages)

* * *

### Step 4: Expose a Remote Function

Now, let’s make things interesting:  
We’ll extend the **broker** to expose a new function `mysum`, making it accessible from other REPLs.

```julia
# REPL_1
mysum(x, y) = x + y + 0.1

expose(broker, mysum)

```

### Step 5: Call the Remote Function

From any REPL, we can now **invoke the exposed function remotely** :

```julia
# REPL_2
result = rpc(sub, "mysum", 1, 2)

# REPL_3
result = rpc(pub, "mysum", 3, 4)

```

🌟 **Just like that, we’ve built a distributed system that supports both Pub/Sub and Remote Procedure Calls (RPC)!**

* * *

## What’s Next?

I’d love your input on how Rembus can evolve.

👉 **Try it out, report issues, and suggest improvements!**  
👉 **[Star the project ⭐](https://github.com/cardo-org/Rembus.jl) if you find it useful!**
