Replace leveldb with an other database

proposal

#1

From @krhubert https://github.com/mesg-foundation/core/issues/565

As shown here https://github.com/syndtr/goleveldb/issues/226, leveldb might have some performance issues.

We can replace it with one of the following:

I think for mesg usecase the LSM Tree will be better choice (so badger key/value db)


#2

Just to open the discussion, why not using a classic database such as mongodb or postgresql, why do we “need” a key/value database ?

Also we don’t need to have the same database for the services and the executions, we could have services with mongodb and executions with sqlite (these are just examples)

I think we should explore the idea to move these 2 different databases into mesg services that will give us a lot of flexibility and control


#3

This is exactly what we need to do in ultimate version of Core. And we need to run this service at the start time. But there is one glitch, it might be hard to move database to a mesg service since it works in a very native layer.


#4

Just as a note:

Edit (anthony):


#5

Yeah that’s will be very cool.

Even more, if the Core still need some kind of state, then an in-memory storage will be enough (like saving the system service hash that are deployed on start).