The Syndicated Actor Model (SAM) is a modern approach to concurrency in distributed systems. It’s based on the Communicating Event-Loop Actor Model and incorporates ideas from Tuplespace and publish/subscribe systems1. Unlike traditional Actor models that focus on message-passing, SAM emphasizes eventually-consistent replication of state among actors.
Here’s a breakdown of the key concepts and components of SAM:
To illustrate how SAM works, let’s consider an example:
Imagine a distributed online marketplace where various services (actors) need to coordinate. Each service publishes its state changes (assertions) to a dataspace. For instance, when a new product is added, the inventory service updates its state and publishes this change. The dataspace then replicates this state change to interested actors, like the recommendation service, which can react by updating its suggestions.
Here’s a simple pseudo-code example to demonstrate this interaction:
class InventoryService(Actor):
def add_product(self, product):
self.state['products'].append(product)
self.publish_state_change('products', self.state['products'])
class RecommendationService(Actor):
def on_state_change(self, changed_state):
if 'products' in changed_state:
self.update_recommendations(changed_state['products'])
# Create actors
inventory = InventoryService()
recommendation = RecommendationService()
# Add a new product and publish the change
inventory.add_product('New Book')
In this example, the InventoryService
actor adds a new product and publishes the change. The RecommendationService
actor is subscribed to these changes and updates its recommendations accordingly.
SAM’s approach is particularly useful for building systems that are reactive, robust to change, and graceful in the face of partial failure2. It’s a powerful model for modern distributed applications where state consistency and efficient communication are crucial.
Synit is an experiment in applying pervasive reactivity and object capabilities to the System Layer of an operating system for personal computers, including laptops, desktops, and mobile phones. Its architecture follows the principles of the Syndicated Actor Model.
Synit builds upon the Linux kernel, but replaces many pieces of familiar Linux software, including systemd
, NetworkManager
, D-Bus
, and so on. It makes use of many concepts that will be familiar to Linux users, but also incorporates many ideas drawn from programming languages and operating systems not closely connected with Linux's Unix heritage.
You can run Synit on an emulated device, or if you have a mobile phone or computer capable of running PostmarketOS, then you can install the software on your device to try it out.
See the installation instructions for a list of supported devices.