Migrating from Java, Spring, MySQL on AWS to Node.js, Restify, Firebase on GCP
In September 2015 I have joined a 2 months old startup which had a team of 4, enough funding to get going for a year and a challenging vision for the future.
Building something that has got a potential to question the status quo required sharp product thinking and a great engineering team combined with un-orthodox approach to project management (we didn’t go with agile, we went with common sense).
In 15 months we went from a prototype of our platform through a Java, Spring, MySQL stack deployed on AWS to a total rewrite in Node.js, Restify, Firebase deployed on GCP.
V1 — PAST
Initially, we have been working with an outsourcing company on the V1 of the platform, which we have launched in January 2016 with the following stack:
- Java Back-End / REST API — Java, Spring, FreeMarker, Hibernate, MySQL
- iOS App — Swift
- APIs — Stripe, EasyPost, Mandrill, HelloFax
- Testing — TestNG, PowerMock, DbUnit — 30 tests
- Operations — Bitbucket, Jenkins, AWS (Elastic Beanstalk, EC2, RDS, S3)
During the V1 development efforts, I have spent around 40% of my time implementing the Web App, 20% bug fixing the Java Back-End / REST API, 20% bug fixing the iOS App and 20% on the architecture, operations and project management.
After we have launched the V1, I have quickly realised that because our requirements were constantly changing (e.g. based on what did and didn’t work for our users) and as we were limited by funding & time, we needed a technology stack that would allow for a greater flexibility and Node.js seemed to promise exactly what we were looking for.
V2 — PRESENT
In June 2016 with a Front-End Engineer and iOS Engineer on board we have started rewriting everything from scratch and with the help of a Node.js Engineer and DevOps Engineer who joined us in August 2016 we have launched the V2 of the platform in November 2016 with the following stack:
- iOS App — Swift, Firebase Client SDK
- Web App — TypeScript, Angular 2, SCSS, HTML5, Firebase Client SDK
- APIs — Stripe, EasyPost, Mandrill, Twilio, HelloFax
- Testing — Mocha, Chai, PhantomJS, Targaryen — 1579 tests that cover 80% of code
- Operations — GitHub, Travis CI, Google Cloud Platform (App Engine, Compute Engine, Storage, Elasticsearch)
During the V2 development efforts, I have spent around 50% of my time implementing the Node.js Back-End / REST API, 30% writing tests and 20% on the architecture, data modelling, operations and project management.
Going with Firebase and Google Cloud Platform not only allowed us to simplify our architecture, embrace rapid development and have a much more compact data model (30 tables in MySQL vs 10 paths in Firebase), but also to keep our operations cost lower.
If you want to quickly get going with your own Node.js app on Google Cloud Platform check out my GitHub repository https://github.com/RomansBermans/google-cloud-node-cluster for a ready to deploy example solution.