Library for building distributed, real-time collaborative web applications
MIT License
Bot releases are visible (Hide)
Published by github-actions[bot] 4 months ago
This is a minor release.
Published by github-actions[bot] 4 months ago
Full Changelog: https://github.com/microsoft/FluidFramework/compare/client_v2.0.0-rc.5.0.4...client_v2.0.0-rc.5.0.5
Published by github-actions[bot] 4 months ago
#21724
#21720
Full Changelog: https://github.com/microsoft/FluidFramework/compare/client_v2.0.2...client_v2.0.3
Published by github-actions[bot] 4 months ago
Full Changelog: https://github.com/microsoft/FluidFramework/compare/client_v2.0.0-rc.5.0.3...client_v2.0.0-rc.5.0.4
Published by github-actions[bot] 4 months ago
Full Changelog: https://github.com/microsoft/FluidFramework/compare/client_v2.0.0-rc.4.0.8...client_v2.0.0-rc.4.0.9
Published by github-actions[bot] 4 months ago
Full Changelog: https://github.com/microsoft/FluidFramework/compare/client_v2.0.0-rc.3.0.10...client_v2.0.0-rc.3.0.11
Published by github-actions[bot] 4 months ago
#21706
#21685
#21678
Full Changelog: https://github.com/microsoft/FluidFramework/compare/client_v2.0.1...client_v2.0.2
Published by github-actions[bot] 4 months ago
Full Changelog: https://github.com/microsoft/FluidFramework/compare/client_v2.0.0-rc.5.0.2...client_v2.0.0-rc.5.0.3
Published by github-actions[bot] 4 months ago
Full Changelog: https://github.com/microsoft/FluidFramework/compare/client_v2.0.0-rc.4.0.7...client_v2.0.0-rc.4.0.8
Published by github-actions[bot] 4 months ago
Full Changelog: https://github.com/microsoft/FluidFramework/compare/client_v2.0.0-rc.3.0.9...client_v2.0.0-rc.3.0.10
Published by github-actions[bot] 4 months ago
#21674
#21639
#21656
#21668
Full Changelog: https://github.com/microsoft/FluidFramework/compare/client_v2.0.0...client_v2.0.1
Published by github-actions[bot] 4 months ago
#21632
#21618
#21593
#21600
#21598
#21585
#21581
Full Changelog: https://github.com/microsoft/FluidFramework/compare/client_v2.0.0-rc.5.0.1...client_v2.0.0-rc.5.0.2
Published by github-actions[bot] 4 months ago
#21630
#21619
#21594
#21561
#21441
Full Changelog: https://github.com/microsoft/FluidFramework/compare/client_v2.0.0-rc.4.0.6...client_v2.0.0-rc.4.0.7
Published by tylerbutler 4 months ago
Fluid Framework 2 is now generally available and ready for production deployments! 🎉
In Fluid Framework 2, we're introducing a new DDS called SharedTree, a powerful and flexible DDS designed to keep hierarchical data synchronized between clients. We encourage you to move all new development and containers to SharedTree. We believe SharedTree is the best option for building with Fluid Framework 2. To learn more, visit the SharedTree docs
Note: As a result of the new DDS, we have marked most pre-existing DDSes as Legacy (not deprecated yet), so you will have to update your import paths. Learn more about API support levels and our goal for a graceful DDS deprecation
in future.
We are also introducing support for a new relay option in Fluid Framework 2, called SharePoint Embedded. This is a Microsoft 365 hosted service that keeps your collaborative Fluid data saved in a partition on SharePoint, allowing you to harness the power of Microsoft 365 file and document storage platform for you apps. You can integrate with SharePoint Embedded using the @fluidframework/odsp-client package. To learn more, visit the SharePoint Embedded docs.
Fluid Developer Tools is a browser extension that improves the developer experience when writing and debugging Fluid apps. It allows you to peek inside your application's Fluid container and diagnose issues. You can learn more about it in the DevTools docs.
And many more updates! Please continue to engage with us on GitHub Discussion and Issue pages as you adopt Fluid Framework 2!
Published by github-actions[bot] 4 months ago
#21631
#21557
#21334
Full Changelog: https://github.com/microsoft/FluidFramework/compare/client_v2.0.0-rc.2.0.8...client_v2.0.0-rc.2.0.9
Published by github-actions[bot] 4 months ago
#21628
#21620
#21559
#21440
Full Changelog: https://github.com/microsoft/FluidFramework/compare/client_v2.0.0-rc.3.0.8...client_v2.0.0-rc.3.0.9
Published by tylerbutler 4 months ago
Full Changelog: https://github.com/microsoft/FluidFramework/compare/client_v2.0.0-rc.5.0.0...client_v2.0.0-rc.5.0.1
Published by tylerbutler 4 months ago
When defining how to view a SharedTree, an application can now specify that new content inserted into the tree should be subject to schema validation at the time it is inserted, so if it's not valid according to the stored schema in the tree an error is thrown immediately.
This can be accomplished by passing an ITreeConfigurationOptions
argument with enableSchemaValidation
set to true
when creating a TreeConfiguration
to use with the SharedTree.
Since this feature requires additional compute when inserting new content into the tree, it is not enabled by default.
A new type, SharedObjectKind
is added as a type erased version of ISharedObjectKind
and DataObjectClass
.
This type fills the role of both ISharedObjectKind
and DataObjectClass
in the @public
"declarative API" exposed in the fluid-framework
package.
This allows several types referenced by ISharedObjectKind
to be made @alpha
as they should only need to be used by legacy code and users of the unstable/alpha/legacy "encapsulated API".
Access to these now less public types should not be required for users of the @public
"declarative API" exposed in the fluid-framework
package, but can still be accessed for those who need them under the /legacy
import paths. The full list of such types is:
SharedTree
as exported from @fluidframwork/tree
: It is still exported as @public
from fluid-framework
as SharedObjectKind
.ISharedObjectKind
: See new SharedObjectKind
type for use in @public
APIs. ISharedObject
IChannel
IChannelAttributes
IChannelFactory
IExperimentalIncrementalSummaryContext
IGarbageCollectionData
ISummaryStats
ISummaryTreeWithStats
ITelemetryContext
IDeltaManagerErased
IFluidDataStoreRuntimeEvents
IFluidHandleContext
IProvideFluidHandleContext
Removed APIs:
DataObjectClass
: Usages replaced with SharedObjectKind
.LoadableObjectClass
: Replaced with SharedObjectKind
.LoadableObjectClassRecord
: Replaced with Record<string, SharedObjectKind>
.TreeStatus.New
indicates that a SharedTree node has been constructed but not yet inserted into the tree. Constraints passed to the runTransaction
API are now marked as readonly
.
The scope of the odsp-client package is changed from @fluid-experimental/odsp-client
to @fluidframework/odsp-client
.
@public
that are not neededMark the following APIs @alpha
instead of @public
:
@public
scopeThe following types have been moved from @public
to @alpha
:
IFluidSerializer
ISharedObjectEvents
IChannelServices
IChannelStorageService
IDeltaConnection
IDeltaHandler
These should not be needed by users of the declarative API, which is what @public
is targeting.
ISubscribable
is renamed to Listenable
.IsEvent
type helper is renamed to IsListener
.Events
is renamed to Listeners
."afterBatch"
event from Treeview
This event is no longer necessary. In the past, it provided a means for waiting for a batch of changes to finish applying to the tree before taking some action. However, the tree change events exposed via Tree.on
wait for a batch to complete before firing, so the "afterBatch"
event provides no additional guarantees. Listeners of this event who wish to respond to changes to the tree view can use "rootChanged"
instead.
The stable public API surface for Tree has been reduced.
Several types have been moved into InternalTypes, indicating that they are not fully stable nor intended to be referenced by users of Tree.
Additionally a few more types which could not be moved due to technically limitations have been documented that they should be treated similarly.
Also to reduce confusion type
was renamed to typeNameSymbol
, and is now only type exported. Tree.is
should be used to get type information from TreeNodes
instead.
ITree.schematize
removalITree.schematize
(and its argument TreeConfiguration
) has been removed. Instead, call ITree.viewWith
and provide it a TreeViewConfiguration
. Unlike schematize
, viewWith
does not implicitly initialize the document. As such, it doesn't take an initialTree
property. Instead, applications should initialize their trees in document creation codepaths using the added TreeView.initialize
API.
As an example, something like the following code may have been used before for both the document create and document load codepaths:
// -- fluid-framework API for statically defined objects in container schema --
const tree = container.initialObjects.myTree;
const view = tree.schematize(
new TreeConfiguration(Point, () => new Point({ x: 0, y: 0 })),
);
// -- fluid-framework API for dynamically created objects --
const tree = await container.create(SharedTree);
const view = tree.schematize(
new TreeConfiguration(Point, () => new Point({ x: 0, y: 0 })),
);
When using the encapsulated API, creating a tree looks a bit different but the call to schematize
is the same:
// -- encapsulated API --
const tree = SharedTree.create(runtime, "foo");
const view = tree.schematize(
new TreeConfiguration(Point, () => new Point({ x: 0, y: 0 })),
);
After migrating this code away from schematize
and onto viewWith
, it would look like this on the create codepath:
const treeConfig = new TreeViewConfiguration({ schema: Point });
// The following line reflects the first-party API (e.g. @fluidframework/aqueduct). If using the third-party API, obtaining
// a SharedTree is unaffected by this changeset.
const tree = SharedTree.create(runtime, "foo");
const view = tree.viewWith(treeConfig);
view.initialize(new Point({ x: 0, y: 0 }));
and this on the load codepath:
// 'tree' would typically be obtained by retrieving it from a well-known location, e.g. within a `DataObject`'s
// root directory or in `IFluidContainer.initialObjects`
const view = tree.viewWith(treeConfig);
Besides only making the initial tree required to specify in places that actually perform document initialization, this is beneficial for mutation semantics: tree.viewWith
never modifies the state of the underlying tree. This means applications are free to attempt to view a document using multiple schemas (e.g. legacy versions of their document format) without worrying about altering the document state.
If existing code used schematize in a context where it wasn't known whether the document needed to be initialized, you can leverage TreeView.compatibility
like so:
const view = tree.viewWith(config);
if (view.compatibility.canInitialize) {
view.initialize(initialTree);
}
IDisposable
interfacesPublic APIs in @fluidframework/tree
now use IDisposable
from @fluidframework/core-interfaces
replacing disposeSymbol
with "dispose".
IDisposable
in @fluidframework/core-interfaces
is now @sealed
indicating that third parties should not implement it to reserve the ability for Fluid Framework to extend it to include Symbol.dispose
as a future non-breaking change.
If you depended on this mutability to implement some behavior, you should create your own mock logger implementation.
If you depended on this mutability to work around the logger's self-clearing behavior after running a match check, you can now override this behavior via the clearEventsAfterCheck
parameter.
MockLogger
for external use.No replacement API is given. This type was never intended for use outside of the fluid-framework
repository.
If you were depending on this class for testing purposes, we recommend creating your own mock logger implementation,
or copy and adapt the code from fluid-framework
as needed.
Update package implementations to use TypeScript 5.4.5.
Update tsconfig to target ES 2022.
To support migration from 1.x to 2.0, a compatibility mode parameter has been added to these methods on AzureClient and TinyliciousClient. When set to "1", this allows interop between the 2.0 clients and 1.x clients. When set to "2", interop with 1.x clients is disallowed but new 2.0 features may be used.
Listenable.on()
no longer supports the same listener function object being registered twice for the same event. The deregister function returned by Listenable.on()
may now be called multiple times with no effect.
TinyliciousClient
and related types have been promoted to @beta
.
Makes object node fields with statically known default values (i.e., optional
and identifier
fields) optional when creating trees, where they were previously required.
Example:
class Foo extends schemaFactory.object("Foo", {
name: schemaFactory.string,
id: schemaFactory.identifier,
nickname: schemaFactory.optional(schemaFactory.string),
}) {}
// Before
const foo = new Foo({
name: "Bar",
id: undefined, // Had to explicitly specify `undefined` to opt into default behavior
nickname: undefined, // Had to explicitly specify `undefined` for optional field
});
// After
const foo = new Foo({
name: "Bar",
// Can omit `id` and `nickname` fields, as both have statically known defaults!
});
TreeViewEvents.afterBatch
is now triggered when appropriate instead of never firing.
This change adjusts some top-level APIs for using SharedTree to better accommodate applications that need to change their schema. These changes enable forwards compatibility with future work to relax SharedTree
's restrictions around view schema and stored schema compatibility. That future work will enable more flexible policies around how applications can update their documents' schemas over time.
Application authors are encouraged to develop a compatibility policy which they are comfortable with using the guidance in the "Schema Evolvability" section of @fluidframework/tree
's readme.
To make the details of schema compatibilities that SharedTree supports more clear, TreeView.error
has been functionally replaced with the compatibility
property. Users desiring the previous strict behavior should use view.compatibility.isEquivalent
at appropriate places in application logic.
IDetachedBlobStorage will be removed in a future release without a replacement.
When applications load a container without specifying ILoaderServices.detachedBlobStorage, an implementation which stores the blobs in memory will be injected by Fluid.
IDetachedBlobStorage as well as application-defined implementations of it are deprecated and support will be removed for them in a future update. Applications are recommended to stop providing this property on ILoaderServices.
ISharedString no longer extends SharedSegmentSequence and instead extends the new ISharedSegmentSequence, which may be missing some APIs.
Attempt to migrate off the missing APIs, but if that is not practical, request they be added to ISharedSegmentSequence and cast to SharedSegmentSequence as a workaround temporally.
The ITelemetryContext
interface was not intended to allow getting properties that had been added to it, so it is now "write-only". Internal usage within FluidFramework should use the new ITelemetryContextExt
.
schemaChanged
event on TreeView
The previous rootChanged
event was called whenever the root was invalidated, which happens on changes to the document schema as well as changes to the root field (i.e. usage of TreeView.root
's setter on a local client, or acking such a change made by a remote client).
There was no distinct schemaChanged
event, meaning that any time the root changed, clients would have needed to check the error
state on TreeView
to see if the document's underlying schema had been changed.
Now, the latter case of the document's underlying schema changing has been split off into a schemaChanged
event, which will fire before rootChanged
. This should allow applications to run slightly less compatibility logic to routine changes to the root field.
Reading the tree inside of NodeChange and TreeChange events could corrupt internal memory structures leading to invalid data in subsequence reads as well as internal errors being thrown. This bug has been fixed.
fluid-framework
legacy exportsCleanup fluid-framework
legacy exports to remove no longer required types.
Signaler
now implements SharedObjectKind<ISignaler>
, allowing its use in ContainerSchema
which was broken when ContainerSchema was made more strict. Additionally fewer encapsulated APIs are exposed on Signaler and the instance type must now be ISignaler
(instead of Signaler
), which has been extended to have an "error" event which was previously missing.
Users of IInboundSignalMessage
will need to import it from the /legacy
scope and should not mutate it. Only users of existing @alpha
APIs like IFluidDataStoreRuntime
should be able to use this type, so it should not introduce new /legacy
usage.
The following Fluid server dependencies have been updated to the latest version, 5.0.0. See the full changelog.
Published by tylerbutler 4 months ago
IDeliServerConfiguration
defines a new optional property, ephemeralContainerSoftDeleteTimeInMs
, that controls when ephemeral containers are soft-deleted.
You can find more details in pull request #20731.
Adds optional dispose
method to IWebSocket
for disposing event listeners on disconnect in Nexus lambda.
You can find more details in pull request #21211.
For ephermeral container, the session grace period is reduced from 10 minutes to 2 minutes when cluster is draining. This ensures the ephemeral container gets cleaned after disconnection sooner. Clients will not find old EH containers and will need to create new containers. This logic only takes effect when forcing draining.
You can find more details in pull request #21010.
Added the option to make Nexus client connections disconnect in batches. The new options are within socketIo
element of the Nexus config:
gracefulShutdownEnabled
(true or false)gracefulShutdownDrainTimeMs
(overall time for disconnection)gracefulShutdownDrainIntervalMs
(how long each batch has to disconnect)Additionally, the DrainTimeMs
setting should be set to a value greater than the setting shared:runnerServerCloseTimeoutMs
which governs how long Alfred and Nexus have to shutdown.
You can find more details in pull request #19938.
During a session there may be multiple client/service summary calls, and independently, multiple checkpoints. Checkpoint will clear messages storage in pendingCheckpointMessages
, which is also used for writing summaries. Because of this cleanup, when we write new summaries, it often needs to request the ops from Alfred again, which is not quite efficient.
Now the pending messages are cached for improved performance.
You can find more details in pull request #20029.
Limits maximum number of tracked valid parent (service) summaries to 10 by default. Configurable via IScribeServerConfiguration
in scribe
property of IServiceConfiguration
.
You can find more details in pull request #20850.
When a client joins in "write" mode with only "read" scopes in their token, the connection message from server will reflect a "read" client mode.
You can find more details in pull request #20312.
Creates a deeper clone of the quorum members when snapshotting to make sure the snapshot is immutable.
You can find more details in pull request #20329.
Overhauled how the Scribe lambda handles invalid, missing, or outdated checkpoint data via fallbacks.
Before:
if (no global checkpoint)
use Default checkpoint
elsif (global checkpoint was cleared or global checkpoint quorum was scrubbed)
use Summary checkpoint
else
use latest DB checkpoint (local or global)
After:
if (no global and no local checkpoint and no summary checkpoint)
use Default checkpoint
elsif (
global checkpoint was cleared and summary checkpoint ahead of local db checkpoint
or latest DB checkpoint quorum was scrubbed
or summary checkpoint ahead of latest DB checkpoint
)
use Summary checkpoint
else
use latest DB checkpoint (local or global)
Also: Updated CheckpointService
with additional fallback logic for loading a checkpoint from local or global DB depending on whether the quorum information in the checkpoint is valid (i.e. does not contain scrubbed users).
You can find more details in pull request #20259.
Added support to add a custom tenant key generator instead of using just the default 128-bit sha256 key.
You can find more details in pull request #20844.
The getOrderer
workflow no longer calls getTenant
when globalDb
is enabled. This saves two HTTP calls to Riddler and will improve performance.
You can find more details in pull request #20773.
Note: This change is primarily internal to routerlicious.
When scribe boots from a checkpoint, it fails over to the latest summary checkpoint if the quorum is corrupted (i.e. user data is scrubbed).
When scribe writes a checkpoint to DB or a summary, it respects new IScribeServerConfiguration
options (scrubUserDataInSummaries, scrubUserDataInLocalCheckpoints, and scrubUserDataInGlobalCheckpoints) when determining whether to scrub user data in the quorum.
Added optional param, scrubUserData
, to ProtocolOpHandler.getProtocolState()
. When true
, user data in the quorum is replaced with { id: "" }
. Defaults to false
. Previously was always scrubbed.
Added the following configuration options for IScribeServerConfiguration
:
All default to false
.
You can find more details in pull request #20150.
Added support for custom authentication with Redis instead of only password based authentication. This includes support for Microsoft Entra-ID based authentication for Redis.
You can find more details in pull request #20214.
NetworkError
s now include an optional property, internalErrorCode
, which can contain additional information about the internal error.
You can find more details in pull request #21429.
Before, the Redis Pub/Sub would be disposed before the socket connections were closed. Now we first close socket connections then do Redis disposal.
You can find more details in pull request #20429.
This change removes the SessionStartMetric from Scribe and Deli. The metric is a source of bugs and has been superseded by the restoreFromCheckpoint
and RunService
metrics.
You can find more details about the reasons for this change in pull request #21125.
Published by github-actions[bot] 4 months ago
#21432
#21332
Full Changelog: https://github.com/microsoft/FluidFramework/compare/client_v2.0.0-rc.4.0.5...client_v2.0.0-rc.4.0.6