I’ve downloaded bitcoin data locally via the bitcoin core app install and sync. I’m looking to build a system though which users can query their account balance. I’m thinking of building a simple web interface to accept a wallet address and in the backend, I run below commands in the bitcoin-cli console
createwallet “wallet-1” true
importaddress “1CfaunqrVpcXmpLheUVWeSP1KPsKDha1Nb” “” false
And return the result back to webUI.
However this approach is not scalable to support say 100s of requests per sec. Therefore I’m thinking of parsing the bitcoin data out from the .blk files into a query-able database, say mySQL or Mongo or Cassandra etc and run the balance query on the above db. Its a one time job of preprocessing and indexing the data and then I’ve a query service sitting in front of db to query and return result.
- What is the ideal way to transfer bitcoin data out into a suitable db. Since I’m only interested in supporting balance enquiries, whats the best and easy way to achieve this? Any existing tools I can use?
- Which db would be suitable for above purpose. sql or no-sql?