@dstanesc/shared-tree-map-sync
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

shared-tree-map sync agent

Test dynamic synchronization (eg. backup for transient collab. environments) across multiple shared-tree-map instances and relays.

See also shared-tree-map library, shared-tree-map hello world

Demo

Demonstrates incremental synchronization between two shared-tree-map instances. First shared-tree-map instantiation is used for local, low latency collaboration between collocated apps. The local relay is Tinylicious. The collaboration session is synchronized incrementally to a second shared-tree-map instance, stored in the cloud, ie. Azure Fluid Relay. The cloud instance could be used for instance as backup and recovery for the local collaboration session.

demo

Build

npm run clean
npm run build

Run

npm start

Module usage

import { mapSync, mapSyncOnce } from "@dstanesc/shared-tree-map-sync";

const sourceId = "76ecf8d1-23cd-4cea-a9c9-7007cae65e02";
const targetId = undefined;

// Sync continuously
const { sourceMap, targetMap } = await mapSync(
  sourceId,
  targetId,
  sourceRelay,
  targetRelay
);

// Sync once
const { sourceMap, targetMap } = await mapSyncOnce(
  sourceId,
  targetId,
  sourceRelay,
  targetRelay
);

Licenses

Licensed under either Apache 2.0 or MIT at your option.

Readme

Keywords

none

Package Sidebar

Install

npm i @dstanesc/shared-tree-map-sync

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

9.64 MB

Total Files

20

Last publish

Collaborators

  • dstanesc