Open bstrie opened 5 years ago
abstract redis-specific logic out of ilp-node
I wouldn't work on much abstraction here. Instead, I would replace these lines with a method on the node called connect_to_store
or something like that. That method would parse the database_url
parameter to see whether it's a redis
, redis+unix
, or sqlite
URL and use the appropriate builder to create and connect to the store. That method would return an impl Future<Item = ..., Error = ()>
where ...
is a thing that implements all the store traits.
dynamically determine whether to instantiate a prior existing node or a new node based on whether the sqlite file already exists (or configuration parameter, for use with redis as well?)
This should only be necessary if the SQLite store does anything to create the tables on startup. If the tables are created dynamically when they're used, its behavior would be the same whether you gave it a path to a file that didn't yet exist or one a path to a previously used database.
Is this happening on a branch somewhere? I'm curious to watch these changes take shape.
@KevinWMatthews I haven't pushed any of my WIP commits yet, but I'll try to get something up today that people can look at.
@KevinWMatthews I've got the initial groundwork laid in https://github.com/interledger-rs/interledger-rs/issues/474.
@bstrie Any updates here?
Given that we haven't had any progress on this, we decided with @sappenin to move forward with PostGRes and tokio-postgres for this task
In Java we have all account-related data stored in Postgres (only balance tracking is still persisted in Redis). I suggest we replicate the DDL that we have in the Java project here. See here for the table structure used by the Java Connector.
Breaking down this task into more manageable goals:
/
(status) endpoint without having the redis crate enabled at all