Skip to content

Commit

Permalink
docs: describe GSB (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
dopiera authored Nov 5, 2024
1 parent 6a4c187 commit 89f6c22
Showing 1 changed file with 40 additions and 2 deletions.
42 changes: 40 additions & 2 deletions arch-snapshot/arch.md
Original file line number Diff line number Diff line change
Expand Up @@ -645,8 +645,46 @@ to be more of a chore than a useful security mechanism, so Accounts became
equivalent to Identities.

### GSB
* what it is, how it works and how it imposes a code structure and how
addressing works

Golem Network is built using a custom distributed component model known as
the **Golem Service Bus** (GSB). Functionally, it is similar to technologies
like [Windows
DCOM](https://en.wikipedia.org/wiki/Distributed_Component_Object_Model),
[CORBA](https://en.wikipedia.org/wiki/CORBA), and
[UNO](https://en.wikipedia.org/wiki/Universal_Network_Objects). In a nutshell,
this model mans that:
* Applications are built by composing these self-contained components, which
encapsulate specific functionality.
* Each component exposes a well-defined interface, enabling interaction with
other components without exposing internal details.
* Components can be accessed and invoked using a consistent method, whether they
are local or remote.
* The caller doesn’t need to know where the component resides (e.g., in the same
process, on another machine) or manage its lifecycle directly.

Key characteristics of GSB include:
* **Language specificity**: GSB is not language-independent. While it is
theoretically possible to create compatible implementations in other
languages, only a Rust implementation currently exists. No formal effort has
been made to specify or develop implementations beyond Rust.

* **Prefix-based component responsibility**: In GSB, components are addressed
by paths. Components can be responsible not just for a single path but for all
paths that share a certain prefix. This design allows the path itself to carry
additional payload information, enabling flexible and dynamic routing. Users
provide GSB with a path, and the process forwards the entire path to the
component mapped to the matching prefix.

* **Absence of remote service concepts**: GSB does not distinguish between
local and remote services. Instead, a dedicated component, called
[Net](#networking), is responsible for forwarding traffic to remote targets.
The target’s address is specified within the path, and the Net component
[uses this address](#gsb-prefix-mappings) to direct the payload to the
appropriate remote destination. It then removes the address prefix from the
path before forwarding the remaining path (and payload) to the destination.

Except for the above, most intuitions from the listed similar technologies
should apply.

### Networking

Expand Down

0 comments on commit 89f6c22

Please sign in to comment.