New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

kvsync

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kvsync

Synchronization between two abstract key-value storages

latest
npmnpm
Version
1.0.23
Version published
Maintainers
1
Created
Source

Algorithm

1. Acquire locks

Get lock files from both source and target storages and ensure that the objects either do not exist or exist but have passed expiration period. If both lock objects meet that conditions - new lock objects are put to the storage with appropriate metadata, including expiration.

2. Commit changes

Writing changes passed as the input to source index.

3. Pull indices

Reading index files from both source and target storages. Process is optimized to read as less data as possible. Only indices which represent the delta between source and target are pulled - process stops as soon as the first common change is found in both storages.

4. Calculate delta

Using change log obtained from index files, determine the list of changes which are missing in the opposite storage (exist in source but missing in target, exist in target but missing in storage).

5. Commit deltas

Writing index files with the changes from the opposite storage which are missing in the current one (from source to target and from tarted to source).

6. Push deltas

Applying change log which represents delta between source and target to both storages.

7. Release locks

Delete lock files created at the beginning of the process. Occurs also in case of an error.

FAQs

Package last updated on 06 Dec 2022

Did you know?

Socket

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.

Install

Related posts