3

Question: Microsoft recently released the Fluid-Framework on github, How can/ steps to replace Signal-R with MS Fluid-Framework and what would be the key differences?

Use Case: Fluid seems to support collaboration and data sync for Mermaid etc diagramming/Flowchart, which was a core use case. So, when I started trying to replace Signal-R with Fluid-Framework, I quickly realized both the docs. & guidance on this is missing.

Some confusion for me, I would appreciate some information:

  • The client-server is missing on their home page and confusing me. For e.g. I wanted to configure the sync data, how often, fall back storage, custom claims in the container, port info, bind attributes in the Action/API signature, but this data in the samples/help is not strongly typed? import { DataObject, DataObjectFactory } from "@fluidframework/aqueduct"; Just need more strongly type samples on the server side wire up.

  • Fluid Container: Transition or Query information for the state of active nodes, next nodes from the mermaid chart is also not clear, how do I get this

Missing documentation missing fluid documentation

Transformer
  • 6,963
  • 2
  • 26
  • 52

1 Answers1

4

SignalR is an excellent library for sending messages to and from the client. It would be reasonable for someone to write a driver that replaces the socket.io driver, another WebSocket implementation, in Fluid Framework.

Fluid Framework is not a drop-in replacement for WebSockets, Socket.IO, or SignalR. The app would probably have to move more of the client state into Fluid distributed data structures

Developers that use SignalR and WebSockets are often used to power Last Write Wins data structures e.g. a message is sent over a WebSocket that updates a value in a map on the client. In simpler scenarios, the message sent over WebSocket, could just be a notification e.g. you have mail, emit an alarm.

Fluid is about maintaining state, not about transmitting messages. While LWW data structures are included in Fluid, some data structures require more complex state management. Strings and sequences aren't last write wins.

How would a last write wins algorithm handle two users simultaneously editing a string?

Starting state "Hello World";
Alice adds "!" at the end;
Bob adds "?" at the end;

You might have odd behavior resulting in "Hello World?" or "Hello World!"

Fluid orders Bob's change and Alice's change through the Fluid service. The merge tree data structure then has a reproducible merge algorithm for applying those ordered changes. Ultimately the string would read "Hello World?!"

Although simple examples may be easy to implement, especially LWW, more complex examples are a challenge. OT & CRDTs are two existing ways of handling state replication. Much of Fluid's initial value proposition is around maintaining complex state on your behalf.

Sam Broner
  • 471
  • 2
  • 9
  • Hey Sam, What about the post and the Server Side receiving data, how is that wired up. Based on what you are saying Fluid is mainly for chats.. looks like – Transformer Sep 16 '20 at 19:56
  • tranformer, if you need to have non-browser logic, you can run a JS process in the cloud somewhere that connects to Fluid service. I'm not sure what you mean by "the post". Fluid can support a lot of state (for chats, but also many other applications) through distributed data structures. – Sam Broner Sep 16 '20 at 20:01
  • By Post I mean when it sends/Posts data to the backend web server, this is simple stuff https://www.w3schools.com/tags/ref_httpmethods.asp .. but the wire ups are mentioned but never documented on their end. – Transformer Sep 17 '20 at 21:46