You are viewing a single comment's thread from:

RE: Stratos Communities Database Upgrade - Utopian.io

in #utopian-io5 years ago

Thank you for your contribution @shredz7 !

AFAIK, SQLite is relational DBMS which may not be so scalable. The new way of writing the query e.g. using the Sequelize is in fact very much alike the NoSQL such as MongoDB - which is scalable by its nature.

Maybe you can extract all the database logics into a separate module/class which provides the interface for querying database whether it is sqlite or sequelize - in other words, implementation - dependent.

You could also use async/await to replace your Promise syntax. The DB logging can be also handled separatedly.

How do you ensure the upgrade is safe? I would expect the unit tests that give you some confidences.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Sort:  

Thanks @justyy! I definitely agree about SQLite, originally Stratos was only going to have to handle things like NFTs and stuff so I was using SQLite because it is easier and there isn't much scalability requirements for just smaller NFTs.

Sequelize does work a lot like mongoose and it is more readable IMHO. I've already extracted the database logic into a specific module, database.js, though there is no need to have seperate code for SQLite and Sequelize as Sequelize supports SQLite already.

Thank you for your review, @justyy! Keep up the good work!

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.030
BTC 66709.93
ETH 3505.67
USDT 1.00
SBD 2.71