Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Change to embedded database system #5238

Closed
ManuGowda opened this issue Apr 30, 2020 · 3 comments
Closed

Change to embedded database system #5238

ManuGowda opened this issue Apr 30, 2020 · 3 comments

Comments

@ManuGowda
Copy link
Contributor

ManuGowda commented Apr 30, 2020

Description

Replace the postgresql database with an embedded database.

Motivation

  • Reduce the complexity of preparation for SDK user
  • Optimize database storage size
  • RDB features are not required for on-chain processing
  • Better read/write performance
  • Split of search capability
  • Support for cross platform

Tasks

Spike 02

Sprint 19

Sprint 20

Additional Information

  • Batch write should only happen at one place in the application
  • Height/Number in general has to be 0 prepended or converted to buffer
  • Throw custom error for non existing records
  • Use key type as string and value type as buffer
@shuse2 shuse2 changed the title Network Longevity - Embedded database Network Longevity - Change database system to EmbeddedDB Apr 30, 2020
@ManuGowda ManuGowda changed the title Network Longevity - Change database system to EmbeddedDB Change database system to EmbeddedDB Apr 30, 2020
@pcdinh
Copy link

pcdinh commented May 4, 2020

While a server-less embedded database like SQLite or LMDB can make server provisioning much easier, its scalability is limited into a single machine

@shuse2
Copy link
Collaborator

shuse2 commented May 4, 2020

@pcdinh For the on-chain processing of the blockchain, data access is always sequential and cannot be multi-processed with our current approach.
Therefore, the scalability of the database does not apply to the SDK

@ManuGowda ManuGowda changed the title Change database system to EmbeddedDB Change database system to Embedded database system May 6, 2020
@sridharmeganathan sridharmeganathan added this to the Sprint 19 milestone May 10, 2020
@karmacoma karmacoma changed the title Change database system to Embedded database system Change to embedded database system May 22, 2020
@vitaly-t
Copy link
Contributor

vitaly-t commented Jul 31, 2020

@pcdinh For the on-chain processing of the blockchain, data access is always sequential and cannot be multi-processed with our current approach.
Therefore, the scalability of the database does not apply to the SDK

You don't understand what you are talking about. Scalability isn't just about what happens on the client side. It is about memory+CPU management, plus execution planning by the server to further improve performance. Advanced migrations, etc.

You've just shot yourself in the foot, by replacing PostgreSQL with half-baked file server.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants