DEV Community

Cover image for charts load faster on chainparser now.
mawutor
mawutor

Posted on

charts load faster on chainparser now.

it's been like a week-ish since we launched chainparser knowing fully well that it was nowhere near fit to tackle the audacious problem of making blockchain data simple and accessible. however, a journey of a thousand miles begins with a step, so we decided to take the initial step and iterate the product regularly over time. this approach to product development falls in-line with the "lean startup" principle.

after the first deployment, it was clear that it takes a considerable amount of time (~3+ seconds) to display the charts in their various cards. the worst part was that, the whole process was synchronous so the last chart to load may do so after an aggregate of 20 seconds or more. this was a major letdown for our initial users.

the chainparser backend reads blockchain data from a third-party "indexer" (flipside) which executes queries in FCFS fashion. therefore queries have to queue up, and are executed in the order in which they were added. this made the asynchronous requests sent from the frontend to the backend all look like synchronous requests and because of the latency it became very obvious to end users.

the challenge was simple, to setup our own mini database that would serve as an intermediary for the data we read from the indexer. the science behind it was that, since the intermediary database is on-site, the travel time for data moving from the backend to the frontend will be shorter than getting the data directly from the indexer.

we explored various options like Memcached, Memorystore, Redis, and others. but the goal was to use a simple cost-effective solution that requires less maintenance, so we settled with Datastore. Datastore is a NoSQL database product offered by Google Cloud which provides a highly scalable data storage solution via an API.

we implemented Datastore and deployed a cron job which periodically updates the database. now charts on chainparser load much faster and asynchronously. with this needed update out of the way, we can focus on adding solana data to the pack which should be ready by the end of next week.

we encourage users to use the feedback form to file any complaints or bugs and we will diligently fix every issue over time.

if you stumbled upon this post with no idea of what chainparser is, then welcome, we are a startup with an audacious goal of making blockchain data simple and easily accessible. we currently have our website showing key metrics of ethereum with more chains to be added soon.

we're live on X too, so follow us to get updated on exciting new features and updates.

chainparser, blockchain data made simple.

Top comments (0)