civkit / orage

17 stars 2 forks source link

Orage Lightning Node Multi-process Architecture #2

Open ariard opened 1 year ago

ariard commented 1 year ago

Basic architecture:

All on-chain monitor process, routing and peer handler process scale in function of node operators computing ressources and needs.


        Process #1

                ------------------
                |                |              RoutingMessageHandler
                | RoutingManager |<-------------------------------------------------------------
                |________________|                                                             |
                                                                                               |
                                                                                               |
                                Process #3                                                     |  Process #2
                                                                                               V
                        ------------------------------------                             -----------------
                        |               |                  |    ChannelMessageHandler    |               |
        NodeSigner / ChannelSigner      |  ChannelManager  |<--------------------------->|  PeerHandler  |
                        |               |__________________|                             |_______________|
                        V                        ^
                VLS secure environmenet          |
                                                 |
                                 --------------------------------------------
                                /                       |                    \
                               / ChannelMonitorUpdate   |                     \
                              /                         |                      \
        Monitor Replica #1   /     Monitor Replica #2   |   Monitor Replica #3  \
                            V                           V                        V
                ------------------       ------------------         ------------------
                |                |       |                |         |                |
                |  ChainMonitor  |       |  ChainMonitor  |         |  ChainMonitor  |
                |________________|       |________________|         |________________|
                        |
    Process #4          |         Process #5                 Process #6
                        V
                  VLS secure environment
nicosey commented 1 year ago

Would their be an RPC layer anywhere?

ariard commented 1 year ago

Would their be an RPC layer anywhere?

Yes I’m thinking and working to have gRPC to communicate across proceess, that way you can also have a HTTPHandler built as it’s own process where web clients of all kinds can be connected. I think gRPC as default multi-process let also to build plugin process to adapt the deployment to enterprise concerns e.g promotheus server for data collection.