Our great sponsors
-
sobjectizer
An implementation of Actor, Publish-Subscribe, and CSP models in one rather small C++ framework. With performance, quality, and stability proved by years in the production.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
so5-dining-philosophers
Several implementations of solutions for "Dining Philosophers" problem built by using Actor and CSP models on top of SObjectizer framework
-
mosquitto_transport
mosquitto_transport is an experiment of writing SObjectizer-based wrapper around mosquitto library.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
BlockingCollection
C++11 thread safe, multi-producer, multi-consumer blocking queue, stack & priority queue class
I was looking at SObjectizer as a message box provider, and it seems well designed and the API is nice, but I'm not sure how to go about retro-fitting it into an existing application, since all my threads already exist and I don't really want to change them all into SO "Agents", and I also don't see how to integrate the Dispatcher. I think it's worth a look though, if anyone with experiecne can confirm it is appropriate.
If low latency / performance is important then something like aeron: https://github.com/real-logic/aeron or the disruptor pattern: https://github.com/Abc-Arbitrage/Disruptor-cpp are good options. Aeron supports network message but requires a driver to be running on the system even for IPC. Disruptor is thread to thread messaging only and doesn't need drivers etc - just a normal library.
If it's of any interest, the MQTT Client I am using is mqtt_cpp which, because it's built on ASIO, is able to handle publications from any thread in a thread-safe manner via an ASIO post. But as far as I can see it doesn't provide any kind of multi-thread-aware subscription/receipt.
I want to note that SObjectizer provides not only agents and dispatchers for them, there is also such a thing as message chains. They were introduced specially for the integration of non-SObjectizer-parts of an application with SObjectizer-part. But since then they grew to a full-fledged mechanism of building multithreading applications even without agents. You can take a look at our dining-philosophers demo (the description, the repository).
PS. Five years ago we used MQTT+SObjectizer in one of our projects, a part of it is available as [mosquitto_transport](https://github.com/Stiffstream/mosquitto_transport). You can take a look at it and get an idea of how MQTT and SObjectizer can be integrated together (maybe it's not a best way, but that approach worked well for us).
rotor actor library (I'm the author) was designed to solve similar problem, which I named "actor intrusiveness", when almost every piece of code should be written in form of actor, and, the working threads, which spin actors, are out of your control.
In the meantime, are you aware of any projects that are similar? Have you come across copper? It looks nicely designed - is this the kind of thing you imagine would be similar?
Also you can check rxcpp with documentation about reactive approach there. It is functional version of observer/publisher-subscriber patterns with ability to be multithreaded. You can send events from one side, subscribe from another and modify events in meanwhile
Also you can check rxcpp with documentation about reactive approach there. It is functional version of observer/publisher-subscriber patterns with ability to be multithreaded. You can send events from one side, subscribe from another and modify events in meanwhile
If low latency / performance is important then something like aeron: https://github.com/real-logic/aeron or the disruptor pattern: https://github.com/Abc-Arbitrage/Disruptor-cpp are good options. Aeron supports network message but requires a driver to be running on the system even for IPC. Disruptor is thread to thread messaging only and doesn't need drivers etc - just a normal library.
https://github.com/real-logic/Aeron/wiki/Performance-Testing https://github.com/real-logic/benchmarks
I wasn't aware of copper; that looks pretty slick if you're able to pivot to that paradigm of thread interaction. I had played around with BlockingCollection at some point in the past.