We’ve been hearing about the energy cost of mining cryptocurrencies such as Bitcoin for years now. With the recent surge in the value of such coins (the USD value of one BTC is hovering around $59,000 at the time of writing but was at around $6,000 a year ago), the concerns of how much energy is consumed by the distributed computation network used to power such blockchains have once again entered public discourse.
So, what exactly is happening? Well, according to my search engine results, Bitcoin mining alone (so, disregarding all other cryptocurrencies for now) has an annual carbon footprint…
This will cover getting our backend API up and running!
If you missed part 1 and need to set up some your initial docker-compose file and directory structure, you can check that out here if you want.
Let’s start with FastAPI. FastAPI is a python framework that makes it super easy to stand up a REST API. But we can take a brief moment to evaluate it as a tool.
Pros:
Cons:
This will hopefully help you take out most of the guesswork of standing up a fully containerized, multi-page web application with a backing database.
What you know/aren’t scared by:
What you will have by the end of this:
Good to go? Let’s get started…
I recently came across an issue where I had to stand up a scalable compute pipeline and make it easy to deploy for others to stand up themselves.
For a myriad of reasons (I won’t give you the story of the long road filled with tech hardships or any of that), I went with Terraform for my declarative infrastructure, AWS Batch for my compute, and AWS EFS as my storage. However, it was pretty annoying to get everything together because there’s not a ton of documentation on how to make it all work. So… eggs.
I’m going to describe how…
Software Engineer @ HMS