hyperledger / identus-edge-agent-sdk-ts

Apache License 2.0
24 stars 13 forks source link

Bring alternatives to Pluto Encrypted in TS SDK #327

Open elribonazo opened 1 week ago

elribonazo commented 1 week ago

Short Description

This feature will bring another more modern and robust alternative for RXDB, that is dependency free, easier to maintain and not so bloated with functionality we will ever need.

Pluto Encrypted is a project maintained by the community and in order to simplify the integration we also integrated the RXDBStorage into our SDK.

I've been working on an alternative to RXDB which is hopefully going to become the long term alternative to pluto-encrypted.

RIDB is a modern alternative to pluto-encrypted all open source and exclusively designed to satisfy our SDK needs. RIDB provides and uses the same model and schema system, and also supports several storages as pluto-encrypted did.

We will prevent at all cost to introduce a breaking change to the Identus users and for a period of time, we will be keeping support for both solutions. As soon as RIDB implementation is ready, we will add a deprecation notice to RXDB related and at some point completely remove the storage.

With some optimisations, RIDB is a 500KB package VS a 7MB package with vulnerable npm dependencies.

Documentation on How to use RIDB, the tests and the source

Proposed roadmap

Value statement

Integrating a lightweight database package we will be reducing the maintenance required, as RXDB has got outdates over time and bloated with packages and functionality we will ever need. By adding RIDB, we will be having exactly the same functionality we have with RXDB but without all the maintenance cost, issues and security vulnerabilities we found over the time. Also, in a package of around 500KB, there will be no need to use external packages for storages as with pluto-encrypted.

Integration should be smooth enough as RIDB is using the same Schema and Migration functionality and the only thing that would be needed is to provide a class extending fromSDK.Pluto.Store and choose one of the available Storage modules.

Components

Typescript SDK

Team members

@hyperledger/identus-maintainers

Architect

@hyperledger/identus-maintainers

QA Member

@hyperledger/identus-maintainers

Owner

@hyperledger/identus-maintainers

elribonazo commented 1 week ago

@mixmix As this is typescript, is this a quick thing u guys can assist us on with?

The main idea is to include a new wrapper and Store for this RIDB package we created and include a first version with inMemory storage in Identus, for a period of time (until all storages are ready) both will coexist.

At some point all RXDB related code will be removed.

If u or somebody else with TS knowledge wants to jump in, it would have high impact and be beneficial for all of us building on TS SDK

elribonazo commented 4 days ago

We've decided to just make the models public exported in the SDK, the store will not be implemented as part of the SDK and become a separate package.

This is how we always envisioned it should be but for a period of time and in order to make things easier we integrated the pluto-encrypted Store.

After the storage is available we will be adding a deprecation notice