Architecture / Modularization
Architecture / Modularization
Posted Jan 28, 2026 10:55 UTC (Wed) by farnz (subscriber, #17727)In reply to: Architecture / Modularization by taladar
Parent article: Xfwl4: the roadmap for a Xfce Wayland compositor
If you look at how Arcan has solved it, and how KDE is gradually improving in this area, the tricks are the same: have a state store component that's highly reliable, because all it does is accept state from the compositor and send state back to the compositor. The compositor sends over the bare minimum state to the state store to allow it to recover (client FDs so that they don't need to reconnect, DMABUFs for client buffer contents so that the client doesn't need to re-render to be visible again, locations and other renderer parameters), and on startup, pulls that state back out of the state store.
The result is that it can recover from a crash, because the state store doesn't crash (it doesn't communicate with clients, nor does it access hardware) when the compositor crashes. The hard part (and the bit KDE is working on now) is making sure that there's just enough state in the state store to let you recover, without getting tempted to make it do too much.
