#SpreadLoveNotCorona | The Technology

Our current reality has drastically changed due to the COVID-19 outbreak and the restrictions that come with it. Probably most people relate these days to the feeling where we search for a purpose, an achievement or something to share with our friends and family. That’s why my colleagues and I were so excited when we came up with the idea of #SpreadLoveNotCorona. If you didn’t read our story yet, this is the time to take a look.

No time to waste, that was the consensus after our first brainstorm. We had a good idea, now it is time to get it out there as fast as possible. Where we normally take our time, to carefully design an application rich in features and good practices, this time we wanted to create something simple and fast. Let’s break it down into the technical choices we made.

The web application

What’s the fastest way to get an application to an end-user, such that it’s accessible on every kind of device? We didn’t need to think long about this one. A web application would perfectly serve this purpose and because we are used to using the React framework, that is exactly what we chose for.

Structuring and storing the data

Every user in #SpreadLoveNotCorona can invite other people, who invite other people, who invite other people… I think you get the picture. Similar to the spreading of a virus, this causes exponential growth in the number of people involved and, as a result, this can be visualized with a tree structure. Everything starts with a patient zero and with every infection, the tree branches out and becomes wider and deeper. In the context of our application this means more donations to charity, so the more the merrier. To represent this data structure in our application we chose to use a radix tree. This tree assigns a character to each node while the key is calculated by concatenating the above characters, starting from the root node — patient zero. This leads to one of the biggest advantages of this tree structure by allowing an easy lookup to retrieve all child nodes. I’ll demonstrate with an example. Let’s assume we want to retrieve all child nodes originating from a key “rubic”. In this case it is sufficient to look for nodes starting with this exact key. Convenient right?

Deploying the solution

After building our web application, and we wrote the logic for the backend functionality, the solution has to be deployed to make it available to all of you. Most of the projects at IntellectEU make use of containerization technologies by deploying docker containers in a Kubernetes cluster, providing the required scalability and flexibility we all are fond of. But as much as we all love these technologies, we decided to take another approach this time. Because of the strict timeline for this application we want to be able to move our solution quickly into production without spending too much effort on setting up and managing the infrastructure. Ideally, we would only take care of implementing the required functionalities and logic without worrying about computing power, storage capacity, and scaling. If there only was such a technology that would take care of this for us… Entering serverless cloud computing.

Serverless computing is a type of cloud computing where developers simply deploy their code to the chosen cloud provider that will provision the application and manage all the relevant resources. This has the following advantages:

  • Fast Go to market: Developers can fully focus on functionalities which speeds up the building process.
  • Scalability: The deployed application automatically scales when the traffic is increasing allowing it to react better on a changing user base.
  • Maintenance: All resources are managed by the cloud provider which means maintenance is drastically reduced.
  • Cost: You only pay for consumed resources which can help to reduce the cost. This is especially useful when you don’t have a good prediction model for the user base of your application.

Exactly what we need for this use case. Everybody is excited, now let’s choose a cloud provider and start deploying this code!

As our preferred cloud provider, Amazon Web Services was the logical choice for us. To start building, we only need to pick out the right components. Luckily everything is a click away in AWS to complete our serverless architecture.

  • API Gateway: We created the API specs on beforehand to provide a contract between our frontend and backend developers and avoiding miscommunications and misinterpretation of the interfaces. These specifications were uploaded in the API gateway and linking them to the corresponding lambda functions gave us all we need to have a fully functional API.
  • Lambda Functions: Amazon’s FaaS (Function as a Service) platform allows deploying blocks of code to the cloud. These functions are triggered by the API gateway and handle a specific functionality, typically responding to an API call and consulting the database where necessary. I’ll give an example, whenever somebody donates to our chosen charity, a lambda function is executed to update your account with the donated amount. Thank god!
  • Amazon Aurora: Amazon’s RDBMS(Relational Database Management Solution). A serverless relational database storing the different accounts in #SpreadLoveNotCorona and the respective donations.

At IntellectEU we love blockchain technology and for this project we worked together with our partner R3. Next to the components above, we added an integration with our Corda node running in an AWS Kubernetes cluster to store payment confirmations on the network using our IntellectEU node. More auditability, immutability and to be honest… we couldn’t stop our developers from storing this trail on the ledger!

If you want to get involved and #SpreadLoveNotCorona, here is an invitation: https://spreadlovenotcorona.io/robbertc

A special thanks to our amazing team dedicating a lot of their (free) time to this project. Naya Tease (Designer), Bruno Almeida (Product Owner), JGaspar | Pieter Debaere | Farid Aly (Back-end), Carlos Filipe Marques (Front-end), Chaim Finizola | Thomas Bohner | Thomas Smets | Robert van Donge | Maxim Piessen (Ideation, Strategy)

IntellectEU-blog

Digital Finance & Emerging Technologies