
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
@fluid-experimental/odsp-client
Advanced tools
A tool to enable creation and loading of Fluid containers using the ODSP service
The odsp-client package provides a simple and powerful way to consume collaborative Fluid data with the ODSP as a storage mechanism. Please note that odsp-client is currently an experimental package. We'd love for you to try it out and provide feedback but it is not yet recommended/supported for production scnearios.
The odsp-client package has an `OdspClient`` class that allows you to interact with Fluid
import { OdspClient } from "@fluid-experimental/odsp-client";
import { OdspClient, OdspConnectionConfig, OdspClientProps } from "@fluid-experimental/odsp-client";
const connectionConfig: OdspConnectionConfig = {
tokenProvider: "<YOUR_TOKEN_PROVIDER>",
siteUrl: "<SITE_URL>",
driveId: "<RAAS_DRIVE_ID>",
path: "<FOLDER_PATH>",
};
export const clientProps: OdspClientProps = {
connection: connectionConfig,
};
const client = new OdspClient(clientProps);
OdspClient could be instantiated with experimental features. These features are experimental in nature and should NOT be used in production applications. To learn more, see Experimental Features.
A Container instance is a organizational unit within Fluid. Each Container instance has a connection to the defined Fluid Service and contains a collection of collaborative objects.
Containers are created and identified by unique IDs. Management and storage of these IDs are the responsibility of the developer.
Fluid Containers are defined by a schema. The schema includes initial properties of the Container as well as what collaborative objects can be dynamically created.
const containerSchema = {
initialObjects: {
/* ... */
},
dynamicObjectTypes: [
/*...*/
],
};
const odspClient = new OdspClient(clientProps);
const { container, services } = await OdspClient.createContainer(containerSchema);
const itemId = await container.attach();
const attributes = await services.tenantAttributes();
const sharingUrl = attributes.sharingUrl;
const driveId = attributes.driveId;
Using the OdspClient class the developer can create and get Fluid containers. Because Fluid needs to be connected to a server, containers need to be created and retrieved asynchronously.
import { OdspClient } from "@fluid-experimental/odsp-client";
const odspClient = new OdspClient(props);
const { container, services } = await OdspClient.getContainer("_unique-id_", schema);
The most common way to use Fluid is through initial collaborative objects that are created when the Container is created. Distributed data structures and DataObjects are both supported types of collaborative objects.
initialObjects are loaded into memory when the Container is loaded and the developer can access them via the Container's initialObjects property. The initialObjects property has the same signature as the Container schema.
// Define the keys and types of the initial list of collaborative objects.
// Here, we are using a SharedMap DDS on key "map1" and a SharedString on key "text1".
const schema = {
initialObjects: {
map1: SharedMap,
text1: SharedString,
},
};
// Fetch back the container that had been created earlier with the same url and schema
const { container, services } = await OdspClient.getContainer("_unique-url_", schema);
// Get our list of initial objects that we had defined in the schema. initialObjects here will have the same signature
const initialObjects = container.initialObjects;
// Use the keys that we had set in the schema to load the individual objects
const map1 = initialObjects.map1;
const text1 = initialObjects.text1;
FAQs
A tool to enable creation and loading of Fluid containers using the ODSP service
The npm package @fluid-experimental/odsp-client receives a total of 16 weekly downloads. As such, @fluid-experimental/odsp-client popularity was classified as not popular.
We found that @fluid-experimental/odsp-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.