Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
romac committed Dec 18, 2024
1 parent b5f15ba commit f84e3bd
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,27 +95,20 @@ There are currently three ways to decentralize an application using Malachite:

#### Channel-based interface
The first one is to make us of the high-level channel-based interface to the consensus engine that is provided by the `malachite-app-channel` crate.
Using the high-level interface will provide the application with all the features built into Malachite, such as synchronization,
crash recovery and networking. The downside is that the application cannot choose a different networking layer or define its
own synchronization protocol.
Using the high-level interface will provide the application with all the features built into Malachite, such as synchronization, crash recovery and networking. The downside is that the application cannot choose a different networking layer or define its own synchronization protocol.

[See the corresponding tutorial](/docs/tutorials/channels.md) for a detailed walkthrough.

#### Actor-based interface
The other way is to make use of the slightly lower level actor-based interface, which allows application developers to switch one actor
implementation for another, in order to for instance use a different networking layer than the libp2p-based one.
It will then be up to the application to spawn and wire the actors together, which is more complex than using the channel-based interface,
but allows for more flexibility.
The other way is to make use of the slightly lower level actor-based interface, which allows application developers to switch one actor implementation for another, in order to for instance use a different networking layer than the libp2p-based one.
It will then be up to the application to spawn and wire the actors together, which is more complex than using the channel-based interface, but allows for more flexibility.

There is not tutorial for doing this at the moment.
Please [open a discussion](https://github.com/informalsystems/malachite/discussions) on GitHub
if you want to discuss this approach or get help for swapping parts of the engine in and out.
Please [open a discussion](https://github.com/informalsystems/malachite/discussions) on GitHub if you want to discuss this approach or get help for swapping parts of the engine in and out.

#### Low-level interface
If none of these approaches are flexible enough for your application, another way to leverage Malachite is to
use its low-level core consensus library, which is fully agnostic with regard to all aspects outside of core consensus.
It therefore allows an application to define its own networking layer, synchronization protocol, execution environment
(eg. in a browser when compiled to WASM or using system threads for concurrency instead of actors or Tokio).
If none of these approaches are flexible enough for your application, another way to leverage Malachite is to use its low-level core consensus library, which is fully agnostic with regard to all aspects outside of core consensus.
It therefore allows an application to define its own networking layer, synchronization protocol, execution environment (eg. in a browser when compiled to WASM or using system threads for concurrency instead of actors or Tokio).

Keep on reading for more information about this library provided by Malachite.

Expand Down

0 comments on commit f84e3bd

Please sign in to comment.