The Cortilia’s Tech Stack

Roberto Valletta
Cortilia Team Blog
Published in
4 min readJul 1, 2021

Today I would like to take you behind the scenes of Cortilia’s Tech world.

We are building a house based on four pillars: craftsmanship, scalability, technology and security.

Every framework, library and tool is serving as a brick.

The following picture shows the tech stack of Cortilia: every brick is a tool, framework or library we use in the day to day activity

Each of these bricks represents a story, and behind each story there was a challenge we have faced during these years.

As the CTO, the emotional impact of watching this set of bricks, built and linked by the team during the past years, is enormous.

Let me elaborate on some of these bricks.

AI/ML and Data

A good introduction of the data model in Cortilia was written by Ivan here: Cortilia a Data Driven Company.

In Cortilia, Machine learning is a valuable asset when it comes to replenishing; we have developed a forecast algorithm in Python, based on Facebook’s Prophet, in order to balance the trade off between over-ordering, thus wasting valuable goods, and having too little stock to satisfy our customers’ needs. Moreover, the website offers to each customer a personalized selection of products suggested by a recommender system, a deep learning collaborative filter implemented via Tensorflow.

Furthermore, a predictive algorithm on User Action Time allows us to anticipate the next order time for each customer. This model leverages on a recurrent neural network architecture fed with historical deliveries of each user

DevOps

The DevOps culture is a key aspect in Cortilia: we encourage the collaboration between teams to increase the quality of the output and build a shared responsibility between infrastructure and developers.

We implemented IaC to remove manual processes that can cause performance bottlenecks or human error with the following tools:

  • terraform
  • cloud formation
  • chef

Any software we write has its own pipeline for testing, deploying in staging and production via bitbucket pipeline scripts.

We have 3 different kinds of architecture:

  • legacy architecture: relies on tomcat on OpsWork provisioned instances done though Chef
  • serverless architecture: 100% hosted by AWS and mainly written in python or node
  • Microservice architecture: base on sprint cloud technology containerized on AWS ECS.

Security is also a crucial aspect in Cortilia: we invest a lot of resources in order to provide a safe environment to our customers.

Application

The main programming languages used in Cortilia are:

  • Java (both 8 and 11)
  • Kotlin and Groovy as more sophisticated programming languages that runs on JVM
  • Javascript (based on React library and Next.js)
  • Python (on Serverless architecture and on ML API)

The application layer has 3 differents architectures:

  • Monolith architecture: we are decomposing it with incremental changes, in order to migrate to a more reliable and scalable architecture (Microservices and serverless)
  • Microservices: the microservices architecture is based on Spring Cloud and based on Eureka for service discovery, Zuul as software router, Hystrix for circuit breaker. All the microservices are written in Kotlin, Groovy or Java 11.
  • Serverless: we use AWS Lambda, with SAM framework in order to implement lightweight and reliable application deployment

The frontend side is based on react and Next.js

Cloud

Cortilia is a cloud native set of applications. We are hosted in theFrankfurt region and we are 100% on AWS Cloud.

Tools

We use Jira, Bitbucket and Confluence in the Atlassian suite. This helps us to track changes, bugs, branches and all our history bound to business requests through a ticketing system.

Database

The choice of the database to use is guided by the data model of a specific project. It is also very important to keep an eye on performance.

We use Dynamo DB, for example, for a lot of serverless applications and some other microservices projects based on some trivial changes to the data system.

The main Database is still PostgreSQL used on AWS RDS Aurora. This allow us to use GIS tools that are native on PostreSQL and to use time ranges to keep row version history log.

In order to achieve the best search experience we use ElasticSearch with 3 indexes for product, brands and tags.

Hazelcast and Redis are used as cache manager: Redis is centralized by AWS Elasticache and is used by a wide set of applications. Hazelcast is used as a service bus to let different instance of the same microservice communicate with each other.

This is our stack now… in the future there will be other changes: we strive towards continuous incremental improvement, one brick at a time, one challenge at a time

Suggested soundtrack: Another Brick In The Wall, Pink Floyd, the Wall, 1979

--

--