Syndicated Actor Model

0 views
Skip to first unread message

Dante Monson

unread,
Apr 25, 2024, 7:23:19 PMApr 25
to econ...@googlegroups.com, op-...@googlegroups.com


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:

  • Actors: In SAM, actors not only exchange messages but also publish parts of their internal state, known as assertions, to their peers. This is done in a reactive manner, similar to publish/subscribe systems.
  • Assertions: These are selected portions of an actor’s state that are published to other actors. They can be used for pattern-matching and content-based routing.
  • Messages: Derived from assertions, messages in SAM are semi-structured data that allow for communication between actors.
  • Dataspace: This is a special kind of actor that integrates Tuplespace-like shared state with the SAM. It routes and replicates published data according to actors’ interests.

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 reactiverobust 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.



https://synit.org/book/

Synit is a Reactive Operating System

Welcome!

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 systemdNetworkManagerD-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.

Quickstart

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.

Reply all
Reply to author
Forward
0 new messages