AppFlowy Docs
Search…
Event Driven System

​
🎯
Goals of the System

The AppFlowy project is an attempt to build a high performance application. Here are the top-level requirements for our system.
  1. 1.
    High Performance.
  2. 2.
    Cross-platform.
  3. 3.
    Reliability.
  4. 4.
    Safety.

​
πŸ€”
Some Design Considerations

​
πŸ“œ
High Level Design

πŸ“š Component Design

πŸ“™ Event Dispatch

file : event_dispatch.wsd
Here is the event flow:
  1. 1.
    User clicks on a Widget(The user interface) that invokes the Bloc actions.
  2. 2.
    Bloc calls the repositories to perform additional operations to handle the actions.
  3. 3.
    Repository offers the functionalities by combining the event, defined in the FlowySDK.
  4. 4.
    Events are be passed in the FlowySDK through the FFI interface.
  5. 5.
    Dispatcher parses the event and generates the specific action scheduled in the FlowySDK runtime.
  6. 6.
    Dispatcher finds the event Handler declared by the Modules.
  7. 7.
    Handler consumes the event and generates the response. The response will be returned to the widget through the FFI.
The event flow will be discussed in two parts: the frontend implemented in flutter and the FlowySDK implemented in Rust.

​
πŸ§‘πŸ’»
FlowySDK

Frontend

The Frontend follows the DDD design pattern, you can recap from Domain Driven Design​
file : eventdispatchfrontend.wsd
Last modified 5mo ago