Skip to content

nhorro/remo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Remo

logo

Remo is a modular C++ library for building modern backend components that offer:

  • Remote Procedure Calls (RPC) over HTTP using the JSON-RPC 2.0 protocol.
  • Real-time data and event publishing over WebSockets.

Designed for backend applications written in modern C++, Remo provides clear interfaces and is built on top of Boost.Beast for robust HTTP and WebSocket communication.

Started as a "Vibe Coding" experiment 🙂.


✨ Features

  • 📡 JSON-RPC 2.0 over HTTP with support for primitive and structured types.
  • 📤 Generic WebSocket broadcasting for JSON-serializable data.
  • 🔧 Easy-to-use APIs with std::function-based handler registration.
  • 🚦 Robust error handling and compliant JSON-RPC 2.0 responses.
  • 💻 Clean example applications for both RPC and WebSocket components.

📦 Dependencies


🧪 Examples

RPC server

BeastRPCServer server(8080);

server.register_method("hello", [](const json& params) {
    std::string name = params.at(0);
    return "Hello " + name + "!";
});

server.start();

WebSocket publisher

BeastWebSocketPublisher publisher(8081);
publisher.start();

// In a separate thread or periodic task
publisher.publish({{"status", "ok"}, {"temperature", 42.5}});

📁 Project structure

lib/
 ├── rpc/             # JSON-RPC over HTTP server (remorpc target)
 └── websocket/       # WebSocket publisher (remowebsockets target)

examples/
 ├── rpc_application/       # Working RPC example
 └── publisher_application/ # Working WebSocket publishing example


🛠️ Build & Install

Detailed steps for building the library and creating a distributable package are provided in docs/build_and_install.md.


🚀 Roadmap

  • ✅ WebSocket broadcasting for generic JSON data
  • ⏳ Topic-based subscription mechanism
  • ⏳ Catch2 integration for testing
  • ✅ Packaging and installation support

⚖️ License

MIT


🙌 Acknowledgments

This project uses:

About

Lightweight library for HTTP JSON-RPC and Websockets for C++ backend applications.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published