TechBuzzPro

Fluid Framework: New Generation Documents Explained

· 8 min read · Apps & Browsers

In this article
  1. What Exactly Is Fluid Framework?
  2. How Fluid Framework Works: Containers and DDS
  3. From Files to Fluid: The Shift in Document Paradigm
  4. Microsoft Loop: The Consumer Face of Fluid
  5. Building with Fluid: The Developer Experience
  6. Common Problems and Misconceptions
  7. Comparing Fluid to Other Collaboration Technologies
  8. Cost and Deployment Options
  9. Frequently Asked Questions

Microsoft Fluid Framework is a platform for building real-time collaborative experiences, often described as the foundation for a new generation of documents that are live, data-connected, and break free from the traditional file-based model. It replaces the older model of saving a file and sending it back and forth with a shared, mutable data structure that multiple people and even multiple applications can interact with simultaneously. This article explains what Fluid Framework is, how it works, what it means for the future of documents, and where it stands today.

What Exactly Is Fluid Framework?

Fluid Framework is an open-source platform developed by Microsoft that provides the underlying technology for collaborative, real-time applications. Instead of treating a document as a static file (like a .docx or .xlsx) that is opened, edited, and saved, Fluid treats it as a live, shared data structure. This structure, called a Fluid container, can be embedded in a web page, an app, or even a chat window. The key idea is that the "document" is not a file you own; it is a shared space that exists in the cloud and can be accessed and edited by many people at once, with changes appearing instantly for everyone.

The technology was first announced at Microsoft Ignite in 2019, and it has since evolved. The most visible consumer product built on Fluid is Microsoft Loop, which launched in 2023. However, Fluid Framework itself is a developer platform, with SDKs for JavaScript and TypeScript, that any developer can use to build their own collaborative features.

How Fluid Framework Works: Containers and DDS

At the core of Fluid are two main concepts: containers and distributed data structures (DDS). A container is a package of data and the code that operates on it. It is the unit of collaboration—think of it as the "document" in the Fluid world. Multiple clients (browsers, apps) connect to the same container, and the Fluid runtime ensures that all clients see a consistent view of the data.

The data inside a container is stored in DDSs. These are data structures (like maps, sequences, or strings) that are synchronized across all clients. When one client changes a DDS, the change is sent to a server (the Fluid Relay), which then broadcasts it to all other connected clients. The system uses a protocol called Fluid's "op" (operation) to apply changes in a consistent order, even when multiple people edit at the same time. This is what enables true real-time co-authoring, as opposed to the lock-and-edit model of older systems.

From Files to Fluid: The Shift in Document Paradigm

The traditional document model is file-centric: you have a file, you open it, you edit it, you save it, and you share it. Collaboration usually involves sending the file back and forth or using a sync service like OneDrive or SharePoint, which still treats the file as the unit of change. Fluid flips this model. The data is the unit, not the file. A Fluid container can be embedded in a Teams chat, a SharePoint page, or a custom app, and it does not have a fixed file location. It is a living entity that can be referenced from multiple places.

This shift has several implications. First, it eliminates the problem of version conflicts—there is only one live version. Second, it allows for granular sharing: you can share a single component (like a table or a chart) rather than an entire document. Third, it enables "data-connected" documents that pull in live data from other sources, such as a database or an API, and update automatically.

Microsoft Loop: The Consumer Face of Fluid

Microsoft Loop is the most prominent application built on Fluid Framework. It is a workspace that allows users to create "Loop components"—portable, live pieces of content like tables, task lists, or paragraphs—that can be pasted into Teams chats, Outlook emails, or Word documents. When you paste a Loop component into a chat, it remains live. If you edit it in the chat, the change appears in the original document and everywhere else it is embedded. This is a direct demonstration of the Fluid concept: the component is not a copy; it is a view into the same underlying container.

Loop also includes a "Loop page" which is a flexible canvas where you can assemble these components. It is designed to be a more dynamic alternative to a traditional document, where you can add tables, lists, people mentions, and even live data from other Microsoft 365 services. For developers, Loop is built on Fluid, and the components you see in Loop are essentially Fluid containers with a specific schema.

Building with Fluid: The Developer Experience

For developers, Fluid Framework provides a set of libraries that handle the complex parts of real-time collaboration—connection management, conflict resolution, and data sync. The main packages include @fluidframework/container-definitions, @fluidframework/runtime-definitions, and the DDS libraries like @fluidframework/map and @fluidframework/sequence. You create a container with a schema that defines the DDSs it contains, then you load that container in a client application.

A simple example: you could create a container with a SharedMap DDS to store a set of key-value pairs. Each client that loads the container gets a reference to that map, and when one client sets a value, the change propagates to all others. The framework handles the networking and the ordering of operations, so you do not have to write any server-side code for the real-time part. However, you do need to provide a "relay" service that stores the container state and relays ops. Microsoft offers Azure Fluid Relay as a managed service, but you can also host your own using the open-source routerlicious server.

Common Problems and Misconceptions

One common misconception is that Fluid Framework is only for Microsoft 365 apps. In reality, it is a general-purpose platform that can be used in any web application. Another is that Fluid replaces databases—it does not. Fluid is for shared, ephemeral state, not for durable, queryable data. You still need a database for long-term storage and for data that does not need to be live.

A frequent problem developers face is understanding the difference between a container and a document. A container is not a file; it is a runtime object. If you close the browser, the container still exists on the relay, but you need to know its ID to reconnect. There is no file path or URL like you would have with a traditional document. This can be confusing for users who expect to "save" a Fluid document. In practice, applications built on Fluid usually provide a way to share a link that contains the container ID, so the user does not need to worry about it.

Another issue is performance. Because every keystroke is sent to the relay and broadcast to all clients, Fluid can be heavy on network traffic. For large documents with many collaborators, this can lead to latency. Microsoft has optimized the protocol, but it is still not ideal for very large, media-heavy documents. For text and structured data, it works well.

Comparing Fluid to Other Collaboration Technologies

Fluid is often compared to other real-time collaboration tools like Google Docs' operational transform (OT) or CRDT-based libraries like Yjs. Google Docs uses OT, which requires a central server to coordinate changes. Fluid also uses a server (the relay), but it is designed to be more flexible and to support a wider range of data structures than just text. Yjs, on the other hand, is a CRDT library that works peer-to-peer or with a server, and it is often used in offline-first apps. Fluid is more opinionated: it requires a relay, but it provides a complete package with a defined protocol and a managed service option.

The main advantage of Fluid over these alternatives is its integration with the Microsoft ecosystem. If you are building on Microsoft 365, Fluid gives you native support for Loop components, Teams, and other services. For non-Microsoft developers, the choice depends on your needs: if you want a fully managed solution with a clear path to production, Fluid (with Azure Fluid Relay) is a strong choice. If you want a lighter, open-source, peer-to-peer option, Yjs might be better.

Cost and Deployment Options

Fluid Framework itself is open source and free to use. The cost comes from the relay service. Azure Fluid Relay is a paid service, with pricing based on the number of connections and the amount of data transferred. You can also self-host the open-source routerlicious server, but that requires you to manage the infrastructure, including scaling and security. For small projects, self-hosting is possible, but for production, Azure Fluid Relay is the recommended route because it handles scaling and provides a global network.

There is also a local testing mode in the Fluid SDK, which runs the relay in-process, so you can develop without any cost. This is useful for getting started. When you are ready to deploy, you can set up an Azure Fluid Relay resource and connect your app to it.

Frequently Asked Questions

Is Fluid Framework the same as Microsoft Loop?
No. Loop is an application built on Fluid Framework. Fluid is the underlying technology; Loop is a user-facing product that uses it. You can build your own apps with Fluid that do not use Loop at all.

Can I use Fluid Framework with non-Microsoft technologies?
Yes. Fluid Framework is a JavaScript/TypeScript library that works in any web application. You do not need to use Microsoft 365 or Azure. However, for a production deployment, you need a relay service, and Azure Fluid Relay is the most straightforward option, but you can also host your own.

Does Fluid Framework work offline?
No. Fluid requires a constant connection to the relay server to synchronize changes. If you lose connectivity, you cannot edit a Fluid container. This is a limitation compared to some CRDT libraries that support offline editing with later sync.

How is Fluid different from Google Docs' real-time collaboration?
Google Docs uses operational transformation, which is optimized for text documents. Fluid is more general—it supports any kind of data structure, not just text. Fluid also allows you to embed the same component in multiple places (like a Loop component), which is not possible with Google Docs.

Is Fluid Framework production-ready?
Yes, Microsoft uses it in Loop and other products, and the SDK is in a stable release. However, the API has evolved over time, so you should check the latest documentation for the version you are using.

What are the main limitations of Fluid?
The main limitations are the need for a relay server (no true peer-to-peer), the network traffic overhead, and the learning curve for developers who are new to real-time systems. Also, it is not designed for large binary files; it is best for structured data and text.