Architecture and Infrastructure

Architecture & Infrastructure

‟Infrastructure describes the actual set of components that make up a system, while architecture describes the design of the components and their relationships. In a nutshell, a system is built on an infrastructure that has a particular architecture.” - MooseBoys

Architecturing an information system and deploying its supporting infrastructure will set its backbone for a while. Doing it right is crucial.

Modern infrastructures, and in particular public cloud providers have paved the way to better-architectured information system. It is easier than ever to do it right.

Infrastructure as code has changed the development lifecycle changing forever project scale involving infrastructure deployment: from month or years to weeks.

  • CAP Theorem - The CAP theorem extensive description - and its drawbacks. The CAP (Consistency, Availability, Partition-Tolerance) theorem helps selecting the best suited database solution for a particular problem. In this article, you will also discover its limits.
  • AWS:
    • AWS Blog - If you want to be amazed by the innovation pace of AWS, be sure to subscribe to their blog, in addition to the day to day announcements you also get hands on blog post and a lot of inspiration.
  • Cloud native:
  • Tools for local development:
    • minio - A distributed object storage server that mimic the “de facto standard API for object storage”, named AWS S3.
    • localstack - The folks aren’t really responsive, nor their enterprise offer seems to conclude in one way or another, but there is a lot of value and a lot to learn from that project.
  • API design:
    • REST is the new SOAP - An article with a counter-current point of view that emphasizes every negative aspects of REST.
  • Tools:
    • Cloudcraft - Isometric 3D drawing of your AWS infrastructure (to be or the actual one). Will help you document automatically your cloud infrastructure and to advertise it.
    • Cloudockit - Same promise
    • Draw.io - Another taste
  • Desired vs Deployed architecture
  • BFF - Backend For Frontend
Desired vs Deployed architecture

Serverless

Serverless is an infrastructure model in which the cloud provider handles every aspects of the infrastructure while the end user only provides the code to execute.

It doesn’t mean that there is no server, it means than the server related activities virtualization, os and application activities are transparent for the end user. The provider dynamically manages the allocation of machines resources, the underlying infrastructure maintenance, and any OS patching. The code is typically run inside stateless containers that can be triggered by a variety of events (http requests, database events, queuing services, monitoring alerts, file uploads, schedulers, etc.)

Pricing is based on the actual amount of resources consumed by an application, rather than on pre-purchased units of capacity.

Serverless is sometimes referred to as “Functions as a Service” or “FaaS” because the end user only needs to send code functions, nothing else.

Serverless logic has been at the heart of my strategy at Redbird then Airware. With this model we have been able to focus all our resources on creating new value for our customers while our cloud provider was handling everything else.

There are different school to serverless, with a caricature we can split them into two categories, the cloud agnostic gurus and the opportunists.

I was part of the opportunists. As an early stage company I didn’t want us to spend a cent in devops and infrastructure management. Why setting us a kubernetes cluster while we were able to use lambdas instead? Why setting our own database in a cluster while dynamo was here? Why setting us a custom HTTP gateway or building our own workflow engine? As a results, we ended with a fully scalable solution built out entirely on top of serverless services from AWS. All our man power directed into value added project that no one else were doing.

To start:

  • Serverless Stack - A comprehensive guide to build your first serverless application
  • Serverless GraphQL - A 2016 speak by Jared Short that explains how to build a Serverless GraphQL on Lambda - before AWS released AppSync. This is outdated but gives you a good taste of the serverless spirit

Testimonials:

Controversy

The biggest concern that raises when you think about the serverless idea and you start implementing your application on top of cloud providers services is the vendor locking you are entering in. You are becoming wholly dependent on your cloud provider. This concern was the main argument for a potential full rewrite of Redbird application when Airware acquired it fall 2016 - (TLDR, we never did it.)

As a CTO, I carefully weighted and chose to empower the serverless paradigm over being cloud agnostic. I often had to justify that decision which happened to appear as a wrong choice for some of my interlocutors. But the equation is easy to solve: when you want to create as much value as you can, you must focus your energy and resource on building that value. When the serverless paradigm supports that vision and accelerates the value creation, this is a no-brainer.

Embracing the serverless idea will save you time, resources and let you focus on what makes your business and application unique.

There are other controversies:

While AWS continues its Mr. Softy strategy of extend, embrace and extinguish with Lambda, Google is doubling down on its Kubernetes masterstroke with the upcoming “Knative.” - Abraham Ingersoll

Or the fact that Amazon Web Services doesn’t support the open source community while other do, but that is an entire other topic.

Tools

  • Epsagon - Observability is as of today the biggest challenge in serverless infrastructure - even with latest AWS enhancements on Cloudwatch, at least allowing textual search across your logs. Epsagon provides an observability SaaS board which creates - among other features - an execution map of all your connected services on a per API call basis. Tremendously useful.
  • Seed - A solution that industrializes in a few clicks your serverless deployments. Frow manual command line deployment to production ready deployment board in minutes, literally.

Various

Data protection

Any SaaS business leads to customer data management. And, with customer data management comes responsibilities.

Like mentioned in the Growing a company section, Security should be a top priority for any SaaS company. It means protecting the data against intrusion, copy, and misappropriation, but is also means preserving the data.

A reddit discussion highlights the MySpace case: all music uploaded from 2003 to 2015 is lost due to a “server migration”. Slightly confirmed on the Myspace homepage.

As a result of a server migration project, any photos, videos, and audio files you uploaded more than three years ago may no longer be available on or from Myspace. We apologize for the inconvenience. If you would like more information, please contact our Data Protection Officer at DPO@myspace.com.

Myspace homepage as of 27th of March 2019

Handling data is hard, in particular when you deal yourselves with backups. Cloud providers are here to help, in particular for emerging business. They help you achieve a higher level of service quality at no cost. You don’t have to deal with the overhead of such data management; you let them do and concentrate on your business. When you achieve success, you might go one step further and implement extra physical backups. What is stored on the Internet may disappear, and we never know, cloud providers might not remain forever. 😅