Distributed Automation
Managing one automated browser is easy. Managing 50 requires a coordinated architecture. Flowork introduces a P2P Syncing System known as "Master-Follower Synchronization."
Master & Follower Concepts
When operating a "Browser Farm," users can designate one browser instance as the Master and others as Followers.
- Master: The user controls this instance manually (or via a single AI agent).
- Followers: These instances listen for events broadcast by the Master and replicate them in real-time.
Under the Hood
When a user scrolls or clicks on the Master instance:
1. An event listener attached to the Master window captures the exact DOM selector, X/Y coordinates, and action type.
2. The event is shipped over the IPC bridge (app:sync-action) to the Go Engine/Electron Main Process.
3. The Main Process checks its followerSyncStates registry.
4. It broadcasts the action payload into the webContents of all registered Follower BrowserViews.
5. A lightweight script inside each Follower executes the incoming action.
Beyond One Machine
This architecture is not limited to a single PC. Using WebRTC data channels, a Master instance in New York can broadcast sync instructions directly to Follower instances running on cloud servers in London, forming a globally distributed automation farm.