Reputation: 71
I am completely starting over with my robots brain. All is developed in Python.
I want to keep everything as modular as possible and allow the use of multiple CPU cores (Raspberry PI 2).
I thought of using multiple processes. One for serial communication, one for every sensor, one for every higher function. All connected by a steering "brain" function.
I want to connect processes by message busses. E.g. Should each sensor dart it's own bus. Higher functions and the brain can then sign in to the bus. In optimal case I would like to send whole objects too.
Upvotes: 2
Views: 290
Reputation: 22571
Try nanomsg (follow-up project to ZeroMQ):
nanomsg is a socket library that provides several common communication patterns. It aims to make the networking layer fast, scalable, and easy to use. Implemented in C, it works on a wide range of operating systems with no further dependencies.
The communication patterns, also called "scalability protocols", are basic blocks for building distributed systems. By combining them you can create a vast array of distributed applications. The following scalability protocols are currently available:
- PAIR - simple one-to-one communication
- BUS - simple many-to-many communication
- REQREP - allows to build clusters of stateless services to process user requests
- PUBSUB - distributes messages to large sets of interested subscribers
- PIPELINE - aggregates messages from multiple sources and load balances them among many destinations
- SURVEY - allows to query state of multiple applications in a single go
Upvotes: 1