Case Anaxeos — developing smart vest for dogs
In the beginning of 2018 Valuemotive participated in the development of the Anaxeos smart vest for dogs. Our responsibility was software development while our partners developed the sensor pack and the vest. In addition to software development we provided service design and data science know-how.
The project is an excellent example of our “three D” model: design, development & data science. We were also trusted by our client to have free rein when it came to the technical side. Taken this together we could utilize a truly agile development process and concentrate on our job.
The greenfield project meant that there were no legacy tech to be considered. The Valuemotive team also operated in a consensus based decision making model. There was no “decider” as the whole team could suggest different tech choices.
Anaxeos would consist of a cloud-based backend and a mobile app for iOS and Android. The stack we chose for the server was based on time-tested AWS. The architecture followed the principles of infrastructure as code. For this we had to choose between Terraform and CloudFormation. Based on some earlier experiences with CloudFormation we chose to go with Terraform. In retrospect this turned out to be a valid decision.
The main alternatives for deployment were Docker containers and serverless lambdas. We chose to base the stack on containers, but we didn’t rule out lambdas. We could later on add lambdas where apt but implement the base system as containers. The containers would run Node.js and the modern Nest.js framework instead of Express.js. The database would be a “boring” but trusted choice — PostgreSQL.
The production environment used the new AWS Fargate for container orchestration. It’s a step up from managing EC2 instances but AWS still has work to do to simplifying it. This was clearly the riskiest part of the tech stack but in the end didn’t cause any problems. GitHub was used for code hosting and Travis CI for continuous deployment.
Perhaps the most disappointing tech choice in the project was Amazon Cognito. It’s promise was to generalize different identity providers like Facebook and Google. However, we ended up writing identity provider specific code and requiring quite a bit of effort in the authentication implementation.
Tying it all were the communication protocols between the server and the app. We went with traditional HTTPS between the server, the app and the sensor pack. We ruled out GraphQL for now since our API needs have been quite simple. Socket.IO is used for real time communication to the mobile app, though.
The project as whole went really well technology-wise. We didn’t really have any major issues or blockers. For future projects this validated Nest.js and Fargate as good tech choices, but I would not go with Amazon Cognito again.