Microsoft's Fluid Framework is now open source on GitHub

Distributed state in the browser made easy but there are snags for real-world use

Microsoft has published the code for its Fluid Framework on Github – a Typescript library for real-time collaborative web applications.

Fluid Framework has been in the works for some time. It was previewed at Build in May 2019, then shown in more detail at Build 2020 earlier this year. Microsoft said at the time it would be open source within a month, but it has taken four.

A 'hello world' Fluid example running locally on a Mac

A 'hello world' Fluid example running locally on a Mac

What is Fluid Framework for? It does not help that at the time of writing the documentation site is borked, returning variously either a corrupt home page, or an error message declaring that the site, which appears to be running as an Azure Static Web App, has been throttled “due to unusually high usage.” Since static web apps are meant to scale well, this is disappointing not only for Fluid Framework developers, but also as an example of one of Azure’s newer features. No doubt it will be fixed soon.

“We're looking at it now. Many regions are back up, but we'll update here once we're confident,” said Sam Broner, a Microsoft Fluid Framework software engineer.

Broner explained Fluid in a promotional video as an easy way to build “native multi-user apps” and as a way of embedding and sharing “live web experiences.” The essence of it is a TypeScript client framework that manages what are called “Distributed Data Structures”, custom objects defined by the developer, and a server that broadcasts and stores operations, or ops, that modify the data. Communication with the clients is via WebSockets, quicker and more lightweight than HTTP. Microsoft has said it is both low latency and undemanding on the server, so it scales well (better, we hope, than the documentation site). Since most of the smarts are in the client code, no custom server code is required. We took a look at some of the details here.

Microsoft is using the framework in its 365 service for collaborative documents that perform and scale better than traditional Office shared authoring. Microsoft 365 has its own Fluid server and a .fluid document type. Unlike other Office documents, it is purely cloud based. Downloading the files and working on them locally does not work.

Microsoft’s Fluid Framework documentation site today: not quite the scalability we were hoping for

Microsoft’s Fluid Framework documentation site today: not quite the scalability we were hoping for

A FAQ document clarifies some of the pros and cons. Since the server stores all the ops, a browser could close and rejoin a session and get back up to date; but for data that will persist beyond a session, the developer will need to store the ops somewhere, in a database or file. A .fluid file is one example, though these only work on Microsoft 365. The company said that at a minimum, 100s of concurrent users are supported, but it could scale further.

What is the difference between Fluid and SignalR, a .NET framework also based on WebSockets? Fluid is more lightweight on the server, said Microsoft, and focuses on “distributing state between multiple clients.” There are some cases where you could use either, but in instances where more logic on the server is required, SignalR would be a better fit, whereas Fluid is suitable if all the logic can be on the client. Turn-based games are a possibility, but awkward in some cases since the client enforces the rules and in effect has all the data.

“There may be some interesting problems to solve around preventing cheating,” Microsoft said.

The code is now on GitHub under the MIT license. We successfully installed and ran a simple example using Visual Studio Code on a Mac, though we got errors on some of the examples. The server runs on Node, and Microsoft has noted that the full test coverage does not work on Windows, an indication of how far the company has departed from its Windows roots.

“Fluid Framework works with your application framework of choice,” the docs stated, “whether you prefer straight JavaScript or a framework like React, Angular or Vue.”

Any framework then as long as it is JavaScript. What about .NET? Developers will need a JavaScript runtime to host Fluid code. Java? The same would apply.

Although the code is now published, it is still in preview. Microsoft reckons that the “core technology powering Fluid Framework is mature and stable. However the layers built on top of that foundation are still a work in progress.”

Fluid is interesting but its real-world value to Microsoft remains unclear. Microsoft designed it with real-time collaborative document editing in mind, but the restrictions around incompatibility with existing Office documents and inability to work offline will be issues as it tries to integrate this into Microsoft 365. Compelling use cases may yet emerge, and the framework does have potential for developers building collaborative features into web applications.®

Similar topics

Broader topics

Other stories you might like

  • Saved by the Bill: What if... Microsoft had killed Windows 95?

    Now this looks like a job for me, 'cos we need a little, controversy... 'Cos it feels so NT, without me

    Former Microsoft veep Brad Silverberg has paid tribute to Bill Gates for saving Windows 95.

    Silverberg posted his comment in a Twitter exchange started by Fast co-founder Allison Barr Allen regarding somebody who'd changed your life. Silverberg responded "Bill Gates" and, in response to a question from Microsoft cybersecurity pro Ashanka Iddya, explained Gates's role in Windows 95's survival.

    Continue reading
  • UK government opens consultation on medic-style register for Brit infosec pros

    Are you competent? Ethical? Welcome to UKCSC's new list

    Frustrated at lack of activity from the "standard setting" UK Cyber Security Council, the government wants to pass new laws making it into the statutory regulator of the UK infosec trade.

    Government plans, quietly announced in a consultation document issued last week, include a formal register of infosec practitioners – meaning security specialists could be struck off or barred from working if they don't meet "competence and ethical requirements."

    The proposed setup sounds very similar to the General Medical Council and its register of doctors allowed to practice medicine in the UK.

    Continue reading
  • Microsoft's do-it-all IDE Visual Studio 2022 came out late last year. How good is it really?

    Top request from devs? A Linux version

    Review Visual Studio goes back a long way. Microsoft always had its own programming languages and tools, beginning with Microsoft Basic in 1975 and Microsoft C 1.0 in 1983.

    The Visual Studio idea came from two main sources. In the early days, Windows applications were coded and compiled using MS-DOS, and there was a MS-DOS IDE called Programmer's Workbench (PWB, first released 1989). The company also came up Visual Basic (VB, first released 1991), which unlike Microsoft C++ had a Windows IDE. Perhaps inspired by VB, Microsoft delivered Visual C++ 1.0 in 1993, replacing the little-used PWB. Visual Studio itself was introduced in 1997, though it was more of a bundle of different Windows development tools initially. The first Visual Studio to integrate C++ and Visual Basic (in .NET guise) development into the same IDE was Visual Studio .NET in 2002, 20 years ago, and this perhaps is the true ancestor of today's IDE.

    A big change in VS 2022, released November, is that it is the first version where the IDE itself runs as a 64-bit process. The advantage is that it has access to more than 4GB memory in the devenv process, this being the shell of the IDE, though of course it is still possible to compile 32-bit applications. The main benefit is for large solutions comprising hundreds of projects. Although a substantial change, it is transparent to developers and from what we can tell, has been a beneficial change.

    Continue reading
  • James Webb Space Telescope has arrived at its new home – an orbit almost a million miles from Earth

    Funnily enough, that's where we want to be right now, too

    The James Webb Space Telescope, the largest and most complex space observatory built by NASA, has reached its final destination: L2, the second Sun-Earth Lagrange point, an orbit located about a million miles away.

    Mission control sent instructions to fire the telescope's thrusters at 1400 EST (1900 UTC) on Monday. The small boost increased its speed by about 3.6 miles per hour to send it to L2, where it will orbit the Sun in line with Earth for the foreseeable future. It takes about 180 days to complete an L2 orbit, Amber Straughn, deputy project scientist for Webb Science Communications at NASA's Goddard Space Flight Center, said during a live briefing.

    "Webb, welcome home!" blurted NASA's Administrator Bill Nelson. "Congratulations to the team for all of their hard work ensuring Webb's safe arrival at L2 today. We're one step closer to uncovering the mysteries of the universe. And I can't wait to see Webb's first new views of the universe this summer."

    Continue reading
  • LG promises to make home appliance software upgradeable to take on new tasks

    Kids: empty the dishwasher! We can’t, Dad, it’s updating its OS to handle baked on grime from winter curries

    As the right to repair movement gathers pace, Korea’s LG has decided to make sure that its whitegoods can be upgraded.

    The company today announced a scheme called “Evolving Appliances For You.”

    The plan is sketchy: LG has outlined a scenario in which a customer who moves to a locale with climate markedly different to their previous home could use LG’s ThingQ app to upgrade their clothes dryer with new software that makes the appliance better suited to prevailing conditions and to the kind of fabrics you’d wear in a hotter or colder climes. The drier could also get new hardware to handle its new location. An image distributed by LG shows off the ability to change the tune a dryer plays after it finishes a load.

    Continue reading

Biting the hand that feeds IT © 1998–2022