Skip to main content

Multiplayer

Learn about collaborative app building for real-time development.

Multiplayer editing is available on Retool Cloud. Self-hosted organizations interested in multiplayer can sign up to the beta.

Multiplayer is a feature of the IDE that enables multiple users to make changes to the same app simultaneously. Similar to collaborative editing tools like Google Docs, users can see what others are working on and changes are reflected in real-time.

Multiplayer is best suited for development teams who work on features independently. For example, a user works on queries while another makes changes to the UI. It is not designed for collaborative prototyping where users are making frequent changes in close proximity.

How it works

Apps have internal state. Retool uses the concept of plugins to represent each aspect of an app, such as queries and components. Whenever a user makes a change, such as the position of a component, the app state changes. Retool syncs these changes automatically across all users by keeping the app state current.

Multiplayer leverages conflict-free replicated data types (CRDTs) to ensure consistent app state across users. Retool uses WebSockets to continuously stream app state between users. This approach allows the app state to sync across all users in a matter of milliseconds, providing a real-time collaborative experience.

Conflict handling

CRDTs help reduce the number of conflicts due to the speed at which app state syncs. If a conflict does occur, Retool uses the Last Write Wins (LWW) principle and uses the change with the most recent timestamp. This approach provides a consistent conflict resolution method and avoids the need for users to manually manage conflicts.

Indicators

There are a number of indicators within the IDE to visualize multiplayer users and edits.

Avatars

The avatar for each user appears the IDE toolbar. Avatars are also displayed when editing queries or code in the Code pane.

Cursors

Retool displays a cursor for users when making edits on the canvas (e.g., moving a component).

Change history

Retool also keeps track of only the changes you make. You can safely undo or redo your own changes as these do not apply to other users' changes.