The Actor Model and Distributed Systems: nyssr.net Compared to Akka

Comparison with Akka

The Actor Model is a powerful paradigm for developing highly concurrent and distributed systems. It has been adopted by many frameworks and programming languages, including Akka, Erlang, Elixir, Go, Scala, Pony , Microsoft Orleans, Thespian, and Celluloid.

nyssr.net is a framework that also builds on the Actor Model, specializing in the creation of distributed backend solutions and Micro-UIs. While it shares similarities with Akka, it has an independent development history that originated in the automotive sector and was based on OSGi. This background has led to significant architectural differences that make nyssr.net particularly interesting for specific use cases.

Currently, nyssr.net exclusively uses the Java Virtual Machine (JVM) and is implemented in Java. However, its underlying messaging system is designed to be platform-independent, which will make it easy to integrate clients and services in other languages like Go or Python in the future.

Shared Characteristics of nyssr.net and Akka

Although there are key differences, nyssr.net and Akka share many fundamental principles and architectures typical of modern, distributed Actor frameworks:

  • JVM-Based: Both frameworks run on the JVM. nyssr.net uses Java, while Akka supports both Java and Scala.
  • Scalability and Distribution: Both are designed for developing distributed, scalable backend solutions.
  • Actor Model Implementation: They use the Actor Model to manage concurrency and parallelism.
  • Clustering and Scaling: They enable the clustering of nodes and scale by simply adding new nodes.
  • Asynchronous Messaging: Communication between actors occurs via asynchronous messages, making the systems more responsive.
  • Transparent Communication: Both systems provide Location Transparency, where it doesn't matter which node a recipient actor is located on.
  • Automated Error Handling: They include mechanisms for automatic error handling within the system, which increases robustness.
  • Network Protocols: Both use their own TCP-based protocols to manage communication and detect new or failing nodes.
  • Security Features: Both offer TLS encryption to secure message traffic.
  • Encapsulation of Complexity: They encapsulate the complexity of asynchronicity and concurrency, allowing developers to focus on business logic.

Key Differences: nyssr.net in Detail

This is where nyssr.net's specific architecture stands out, making it suited for certain use cases—especially in heterogeneous network environments and when integrating user interfaces.

1. Topology and Routing

  • Network Topology: While Akka primarily uses a star-shaped clustering architecture (with seed nodes), nyssr.net is built on a wide-area mesh network. Each node knows the network as a graph, not just a list of direct connections.
  • Routing: Messages are forwarded dynamically and along the shortest path (based on latency). Akka typically uses direct connections between cluster nodes.
  • No Seed Nodes: New nodes can join the network without the need for fixed seed nodes.
  • Heterogeneous Environments: nyssr.net is designed to function even in environments with firewalls, where nodes are often not directly reachable.

2. Messaging and Services

  • Protocols: nyssr.net forgoes a gossip protocol and instead uses broadcasts that trigger nano-services on the nodes.
  • Message Features: Messages can be assigned priorities and are automatically compressed or encrypted via simple header bits (in addition to TLS).
  • Service Architecture: Instead of Cluster Sharding, nyssr.net uses distributed service registries for load balancing and service resolution.
  • Messaging Features: It supports automatic replies, broadcasts, forwarding, and an Observer pattern.
  • Addressing: Actor addresses are not hierarchical and contain no network information (IP/Port). They serve solely to locate actors.

3. Specific Use Cases

  • Frontend Capabilities: A unique strength of nyssr.net is its ability to act as a server-based, distributed frontend that provides Micro-UIs for web and Swing applications.
  • Code Distribution: Nodes do not need to share the same code base. Plugins make it possible to host different services on different nodes.
  • Distributed Factories: The framework works extensively with distributed factories that can create instances of similar actors.
  • Session and Rights Management: nyssr.net offers deep-level session and user rights management that is granular down to the message level.
  • Error Handling: While similar to Akka, nyssr.net actively involves the sender of messages in error handling through automatic replies.
  • Namespaces: Namespaces enable thousands of identical applications to be hosted on the same node without address conflicts.

4. Additional Architectures

  • Hierarchical State Machines: Actors can use hierarchical state machines, which simplifies the modeling of complex states.
  • Cluster Interconnection: Multiple nyssr.net clusters can be interconnected.
  • Dependencies: nyssr.net has very few external library dependencies, which simplifies integration into existing applications.
  • Platform-Independent Serialization: Messages are always platform-independently serialized to ensure interoperability (unlike Java serialization, which is only suitable for Java-based systems).