The following are short, sometimes superficial, answers to some of the most commonly asked questions about the FluidFramework.
Fluid lets you create a Real Mac App (or 'Fluid App') out of any website or web application, effectively turning your favorite web apps into OS X desktop apps.Creating a Fluid App out of your favorite website is simple. Enter the website's URL, provide a name, and optionally choose an icon.Click 'Create', and within seconds your chosen website has a permanent home on your.
- Fluid Browser floats on top of open applications and can easily be resized. Fluid Browser gives the user full control over transparency by a simple touch of a keystroke to easily see and work behind content. Finally, Fluid Browser is beyond media. Upload or drag PDFs, images or movies (.mp4 for now,.mov coming soon) into the browser to increase productivity or reference work. Use Fluid Browser.
- Fluid is a WebKit2-based site-specific browser (SSB) for Mac OS X created by Todd Ditchendorf. 2 3 Its original WebKit -based version was compared to Mozilla Prism and mentioned in Lifehacker, 4 TechCrunch, 5 6 7 43 Folders, 8 the 37 Signals blog, 9 and on InfoWorld 10 as a way to make web applications more like native desktop applications.
What is the Fluid Framework?
The Fluid Framework is a collection of client libraries for building applications with distributed state. These librariesallow multiple clients to create and operate on shared, synchronized distributed data structures (DDSes) using codingpatterns similar to those used to work with local data. The Fluid Framework manages connections to services and keeps allclients in sync so that developers can focus on the client experience.
The Fluid Framework was designed with performance and ease of development as top priorities.
Distributed Data Structures
What is a DDS?
DDS is short for distributed data structure. DDSes are the foundation of the Fluid Framework. They are designed suchthat the Fluid runtime is able to keep them in sync across clients while each client operates on the DDSes in largelythe same way they would operate on local data. The data source for a Fluid solution can represent numerous DDSes.
There are many types of DDSes including a SharedMap that is a distributed version of a JavaScript Map and a SharedStringthat is designed to enable real-time editing of text data by multiple clients simultaneously. Developers can use theDDSes included with the Fluid Framework or develop new ones.
Any practical limits on the types of data and size of a DDS will be specific to the implementation of that DDS. Swift 4 2019. DDSescan contain text, images, and other binary data and can effectively be any size. However, managing scale on the clientrequires thought, just as it does when working with local data.
Where is the data stored?
There are two classes of data storage to discuss when answering this question: session storage andpersistent storage.
Session storage is managed by the Fluid service and is, essentially, a central record of all the operations (ops)performed on the DDSes. This record is used by the Fluid clients to produce identical local instances of the DDSes.Session storage also includes ops that summarize all past operations to improve performance for clients that joinsessions later and for efficiencies when saving to persistent storage.
Persistent storage is a record of ops (and summary ops) saved outside of the Fluid service. This could be adatabase, blob storage, or a file. Using persistent storage allows a Fluid solution to persist across sessions.For example, current Microsoft 365 Fluid experiences save ops in .fluid files in SharePoint and OneDrive.It is important to note that these files share many of the properties of a normal file such as permissions and alocation in a file structure, but because these experiences rely on the Fluid service, downloading the files andworking locally is not supported.
How is data sync’d?
In order to keep all clients in sync, they must be connected to a Fluid service. This service’s coreresponsibility is sequencing all the incoming Fluid operations and then broadcasting them to all clients. Becausethe ops are ordered, and because each client is running the same code, the DDSes in each client eventually end up in anidentical state.
Note, there isn’t a centralized Fluid service for all Fluid experiences. But for each Fluid experience, there is onlyone Fluid service.
Fluid clients connect to the Fluid service using the WebSocket protocol. However, the Fluid runtime managesall of the connections so that Fluid client developers can focus on local experiences.
Scale
How many concurrent users does this support?
It depends. Because the Fluid service is extremely lightweight, even a simple implementation of the service cansupport 100s of concurrent users. A more sophisticated implementation can distribute the work and support 1000s. Theexperience on the client will vary depending on the Fluid data store and local device. When considering scale forFluid solutions, consider how well the client can handle and render changes, not whether the service is able todistribute them efficiently.
![Fluid Browser 1 6 8 Fluid Browser 1 6 8](https://img.magimg.com/uploads/fluid.jpg)
Also, there is a significant difference in capacity depending on whether users are purely viewers vs. editors.Adding viewers scales far more than adding editors because each editor increases the volume of changes and viewersdo not.
How do you design Fluid Framework solutions to scale?
When thinking about scale there are two key factors: service scale and client scale. The Fluid service is designedfrom the ground up to be extremely scalable. While there is the potential to refine the service to the point whereit is staggeringly scalable, for most Fluid developers the larger concern will be client scale.
When tackling client scale, developers need to consider how they will manage inbound changes, especially when thevolume of changes is high. The specific strategies developers should consider start when considering which DDS typesto use and how the data is structured. From there developers can look at using virtualization to limit updates toparts of the view that are currently in scope. Another strategy could be to throttle inbound changes to limit thenumber of updates that are required. Of course, the right strategies will depend enormously on the specific scenario.
Fluid Technology
What’s the difference between Fluid Framework and SignalR?
Where SignalR is a technology principally aimed at simplifying real-time communication between servers and clients,the Fluid Framework further abstracts that communication and, more significantly, focuses on distributing state betweenmultiple clients. So, while you might use Fluid to solve some of the same problems you solve with SignalR today,the two are not interchangeable. Notably, the server component of a Fluid solution is lightweight and general-purposewhile a SignalR solution designed to distribute state would require additional server development.
Does Fluid use operational transforms?
Fluid does not use Operational Transforms (OT), but we learned a tremendous amount from the literature on OT. WhileOT uses operations that can be applied out of order by transforming operations to account for recent changes, Fluidrelies on a Total Order Broadcast to guarantee that all operations are applied in a specific order.
Does Fluid use CRDT?
Fluid does not use Conflict-Free Replicated Data Types (CRDTs), but our model is more similar to CRDT than OT.The Fluid Framework relies on update-based operations that are ordered using our Total Order Broadcast to preventconflicts. This allows us to have non-commutative operations because there is an explicit ordering.
Use Cases
What kind of support is there for real-time editing of text?
This is the scenario that Fluid was first designed to support. Consequently, the Fluid Framework is an ideal foundationfor rich text editors that support simultaneous editing by multiple clients. The SharedString DDS istailor-made for this scenario.
Turn-based games?
DDSes can be used to distribute state for games, including whose turn it is. It’s up to the client to enforce the rulesof a game so there may be some interesting problems to solve around preventing cheating but the Fluid team has alreadyprototyped several games.
Presence, including mouse cursor?
Keeping track of and sharing each user’s position in a grid, a document, or some other virtual space is an idealtask for the Fluid Framework because it is designed to enable extraordinary performance.
Fluid Service
What needs to be running on the server?
The Fluid Framework requires a Fluid service to sync data between clients. The role of the server is very simple:it orders operations and broadcasts them to all clients. It’s also responsible for saving operations topersistent data storage.
The Fluid service is general-purpose and, as a rule, Fluid solutions will work with any Fluid service. Developers ofFluid solutions can use a local server or a “test quality” server for development and trust that their solutionwill work against whatever production server their solution is pointed at.
The Fluid Framework includes a reference implementation of the Fluid service called Routerlicious that you can use fordevelopment or as the basis for a production quality server.
Where is the shared data stored?
The specifics of data storage (both session data and persistent data) will depend on the implementation ofthe Fluid service. There is a great deal of flexibility here and developers of Fluid services may choose to offeroptions around where and how data is stored.
Is there a dedicated cloud service for syncing the clients?
Microsoft has developed an M365-specific Fluid service designed to enable solutions powered by Fluid within thatecosystem. There will be ways for Fluid Framework developers to operate in M365 but those integration points arenot available yet.
Microsoft has alsoannounced AzureFluid Relay, a fully managed Fluid service, at Build 2021.
Besides SharePoint, where else can we store .fluid files?
.fluid files are a specific file format understood by Fluid solutions integrated with M365. They are designed to operateexclusively in the cloud (never locally) and currently are only supported by OneDrive and SharePoint.
Can we use Fluid Framework standalone with no dependencies on other services?
Yes. The Fluid Framework is designed to stand alone. It has no dependencies on other services.
Can the Fluid Framework be used in a situation without access to the internet?
There are two angles to this question. One is whether the client must be connected to the internet. The other iswhether an organization could run the Fluid service on-site to support an intranet.
Clients do have to be connected to the Fluid service. Fluid can tolerate brief network outages and continue operatingbut eventually the promise of being able to merge local changes weakens. We are investigating ways to improve this usingother merging techniques designed to reason over large deltas but no final solution is in place today.
In principle there is nothing preventing an organization from hosting a Fluid service on an intranet. However, Microsofthas no plans to support that scenario directly.
Is the Fluid reference server implementation production-ready?
No. Routerlicious on its own is not production-ready. Using it would require more thought about storage, scale,security, and other typical considerations when building out a service on the internet. It is our expectation that mostFluid developers will be able to leverage existing Fluid services that will emerge as we approach version 1.0.
How are Fluid solutions deployed?
Fluid solutions are, at the end of the day, simple JavaScript. At Microsoft, Fluid solutions are deployed to CDNs likeany other static resource. Because Fluid is very client-centric, deployment is very simple.
Conflicts and History
How does Fluid Framework deal with conflict resolution?
This depends a great deal on the specific DDS. But, regardless of the final state of the data, operations are storedin the Fluid ops stream. So, in cases where a client is unhappy with the final state, there are approaches forachieving consensus that can be built into the DDS or handled by the client.
Can we create custom strategies to handle update collisions to the distributed data structure?
Yes. You can design your own DDSes with your own strategies for handling merge. You also have access to alloperations and can write client code to reason over state in whatever way best suits your scenario.
Can we have history of the changes?
Yes. Fluid inherently keeps all changes and these are accessible through the framework. The only caveat is that forperformance and storage efficiency, operations need to be summarized from time to time. This may cause a loss ofgranularity.
Is there any way to know which user caused each change?
Yes. Operations can be attributed to users. This is an implementation choice and not something built directly intothe Fluid Framework.
UX Frameworks
Can I use React, Angular, VUE, Svelte, or some other UX framework?
Yes. You can use any UX framework designed for the web.
What is the relationship with Fluent UI?
Both Fluent and Fluid Framework come from Microsoft. And inside Microsoft many Fluid projects also use Fluent.But there is no relationship other than the names are similar.
Is Fluid trying to be a competitor to UX frameworks?
Not at all. The Fluid Framework is unopinionated about UX.
Coding Frameworks
Can I use ASP.NET, ASP.NET Core, and C#?
The Fluid Framework is written in TypeScript but we don’t want it to be limited to the web. You can use the Fluid Frameworkwith non-web technologies by leveraging a JavaScript runtime to host the Fluid code. Ultimately it is critical that the samecode be running in all clients to ensure eventual consistency of data so it is impractical to port Fluid to other codingframeworks.
This also applies to Blazor, Xamarin, MAUI, and other mobile frameworks.
Browsers
What browsers are supported?
There is a lot of nuance in browser support, but in general, the Fluid Framework supports modern browsers, and we recommendthat you use the most up-to-date browser that's compatible with your operating system. The following browsers aresupported.
- The new Microsoft Edge
- Safari (latest version, Mac only)
- Mozilla Firefox (latest version)
- Google Chrome (latest version)
However, using transpilers and other tools in the JavaScript ecosystem, it is possible to create Fluid Framework-basedapps that support additional browsers.
Web applications like Gmail, Facebook, Campfire and Pandora are becoming more and more like desktop applications every day. Running each of these web apps in a separate tab in your browser can be a real pain.
Fluid lets you create a Real Mac App (or 'Fluid App') out of any website or web application, effectively turning your favorite web apps into OS X desktop apps.
Creating a Fluid App out of your favorite website is simple. Enter the website's URL, provide a name, and optionally choose an icon. Click 'Create', and within seconds your chosen website has a permanent home on your Mac as a real Mac application that appears in your Dock.
Fluid is free. You can download Fluid for free and create as many Fluid Apps as you like.
However, for $4.99, you can purchase a Fluid License which unlocks a few extra features:
1.Create Fluid Apps with Separate Cookie Storage. (Preferences → Security → Cookie Storage)
2.Pin Fluid Apps to the Mac OS X Status Bar. (Fluid App Menu → Pin to Status Bar…)
3.Use Userscripts or Userstyles in your Fluid Apps. (Window → Userscripts)
4.Use Lion Full Screen mode in your Fluid Apps. (View → Enter Full Screen)
1.Create Fluid Apps with Separate Cookie Storage. (Preferences → Security → Cookie Storage)
2.Pin Fluid Apps to the Mac OS X Status Bar. (Fluid App Menu → Pin to Status Bar…)
3.Use Userscripts or Userstyles in your Fluid Apps. (Window → Userscripts)
4.Use Lion Full Screen mode in your Fluid Apps. (View → Enter Full Screen)
Verdict:
Fluid Browser 1 6 8 Niv
A highly flexible tool that blurs the boundaries between working online and offline.