Lambda Labs & ElephantSQL

So, at Lambda I’m in Labs now. Its a period in which I work with a team to build a project for a stakeholder. We go through the process of creating user stories, user flows, wireframes and other planning exercises. There are stages for technical decisions in which we research and plan out the technologies we’re going to use for our project, taking note of benefits and risks of chosen technologies, challenges we foresee using those technologies and more.

Later on the process will focus on other aspects of working with a team, including demonstrating contribution to a project, giving and receiving feedback and presenting our work. I’m only in the first phase, so it was a lot of the planning and now initial building, as well as focus on GitHub – not just the technical aspects of using it, but communicating with other developers, properly writing comments on commits and pull requests, and generally using GitHub to meaningfully convey information about the purpose of a given commit or pull request that we make, as well as being the review for someone else’s GitHub activity and how to best communicate with them.

The project I’m working on is called Express Pet Groomer. Its a build-on, which means that we’re continuing a project that another team worked on before us. The opposite of that is a greenfield project, which is a new one, which would need to be designed from scratch. Dealing with someone else’s technical decisions is an interesting endeavor. Its the situation that most developers will find themselves in throughout their careers, from my understanding. We don’t necessarily all work for start-ups and build a project from its conception – most of the time, we’re joining a company with an existing project or set of projects and have to acclimate to its codebase, technologies and workflows.

ElephantSQL

Anyway, the purpose of this article is to introduce ElephantSQL, a tool that I think will be useful for other beginner developers. During setup for our back-end, we had to get PostgreSQL set up. The three options that the previous team suggested in the documentation were (1) using Docker, (2) downloading and installing PostgreSQL locally and (3) setting up a free account with ElephantSQL.

I read through some of Docker’s documentation and a nice overview from freeCodeCamp. The technology is intriguing to me, because my background is in I/T and networking, but I haven’t had to do that kind of work in a while since I’ve been focusing mainly on application design for our EMR. I’m used to virtual machines and server sessions, but containerization is new to me. I intend to explore this in much more depth after Labs, when I can carve out time without the worry of slowing down my team.

Downloading and setting up PostgreSQL was also something I considered, but its nothing new. So, I decided to try out ElephantSQL. The steps seemed to be the most brief, and I wasn’t familiar with the service.

I ended up having the database set up within 5 minutes. Most of that process was just me looking over ElephantSQL for the first time. The actual process of setting up a free database as a service with them was very fast – just create an account, create an instance and pass the provided URL into your application’s configuration (in my case, the .env file).

I’m using the free “Tiny Turtle” plan, which allows up to 20MB of data and 5 concurrent connections. There are 4 plans for shared instances, 6 plans for dedicated instances and 6 plans for dedicated instances with “follower”, which is basically fault tolerance.

Once I had the URL from ElephantSQL set in my .env, I used knex to quickly migrate the latest starting schema and seed the database with data. I then tested my logins and looked at the application for the first time (our team didn’t have the environment variables and passwords to do all of this previously) and everything ran. It was a buttery smooth process that I’ll likely use again for small projects in the future. If you’re building small CRUD applications for a portfolio, or for proof-of-concept projects, ElephantSQL seems like a really fast and easy way to connect them to a database.

Leave a comment