Home

Awesome

Server npm version Build Status Dependency Status Known Vulnerabilities Maintainability Test Coverage Download Status lerna

Client npm version Build Status Dependency Status Known Vulnerabilities Maintainability Test Coverage Download Status lerna

Feathers offline-first own-data / own-net

These packages implements the offline-first own-data / own-net principles on CRUD methods on any Feathers database adapter. It consist of two parts; one for the server services and one for the client counterparts.

Installation

Go to the packages to see the details:

You'll need both to be able to a fully functional own-dataor own-net offline-first implementation in your own app.

Example

You can see an example showcasing Feathers offline-first here

Documentation

You can read the original docs here discussing the theories behind it all. The new and updated documentation is available here.

Summary:

own-data / own-net are two related strategies implemented in Feathers Offline-first. Both strategies queues CRUD events for a wrapped service locally until the device have connection to the server, but to the user the CRUD events are executed immediately using optimistic mutation strategy.

own-data will re-play all queued event to the server in the order they were performed in offline mode. This allows the the server to react on each event (mutation). It may, for example, run hooks which send emails on certain mutations.

own-net on the other hand will only play the end result of all queued events for a given item (ie. row or document) to the server. If an item (document) is mutated 5 times only the result will reach the server when connection is established. If a record is patched and finally removed while still offline, the server will never see the mutations. The server may still react on each event (mutation), but bear in mind the changes are possibly only net changes. own-net usually results in much shorter synchronization times and reduced traffic between client and server.

License

Copyright (c) 2020

Licensed under the MIT license.