8th December 2022

Event-driven serverless architectures

At Si Novi we specilise in building and designing serverless architectures. We explain the benefits of serverless computing, and introduce some key components of the serverless computing model, such as AWS Lambda, DynamoDB, and event-driven architecture.
Cloud development

Why we ❤️ serverless and event-driven architectures

We went all-in on serverless a few years ago and are delighted that many more clients and development teams are now seeing the benefits of this type of architecture.

Put simply, this type of architecture allows us to focus more on the underlying business logic of your application or service, rather than worrying about provisioning and maintaining an adequate amount of servers.

We know that a lot of clients - start ups, scale-up teams and internal IT teams - value the managed approach to this architecture rather than being burdened with an on-going maintenance requirement for patching and scaling a fleet of servers.

They also value the speed in which we're able to iterate ideas, the relability of their services during usage spikes, and the flexibility of the de-coupled event approach.

In our opinion, AWS are still leaps and bounds ahead of any other cloud provider in this field - AWS continually strive to update and improve their offerings, adding new capabilities such as EventBridge Pipes which we're excited to explore further.

AWS provides many managed services that fall into the serverless category - fully managed, billed based-on usage (in the main), and highly scalable.

Their solutions can be grouped into Compute (functions / runtime), Integration (events) and Data (storage).


Compute Application integration Data store
AWS Lambda Amazon EventBridge Amazon S3
AWS Fargate AWS Step Functions Amazon EFS
Amazon SQS Amazon DynamoDB
Amazon SNS Amazon RDS Proxy
Amazon API Gateway Amazon Aurora Serverless
AWS AppSync Amazon Redshift Serverless
Amazon Neptune Serverless

architecture

Our approach

We utilise infrastructure as code tools like AWS SAM and OpenJS Architect to aid in the creation of event-driven functional web apps.

Key components of our serverless toolbelt are API Gateway, AWS Lambda, DynamoDB, and event-driven technologies such as SQS, SNS and EventBridge.

Together these technologies help us build and run a wide range of applications and services, that are highly-scalable, easy to maintain and update, and offer single digit millisecond latency in data retreival - at any usage level.

Over the years we've built a range of innovative applications using serverless technologies from AWS, to highlight but a few:

  • a fully-serverless Extract, Transform, and Load (ETL) application in AWS, using DynamoDB, Kinesis and Lambda - providing our client with a much more cost effective and reliable replacement for a legacy system, despite running at astonishing rates of data - many millions of invocations per day
  • large event driven applications that process and serve terrabytes of data using API Gateway, SQS, AWS Lambda and DynamoDB
  • robust web applications, such as a large application for a financial services provider which utilised API Gateway, AWS Lambda, SQS, DynamoDB, Kinesis Streams, and a traditional relational database with EC2 for adminsitration / analytics
A hand drawn service digram of a recengt serverless application we developed

Benefits:

Cost optimisation

Let's say you have an application that processes images and generates thumbnails. With traditional computing models, you would have to provision and pay for a server to run the application, even if the workload is variable or unpredictable.

With serverless computing, you can use AWS Lambda to run the image processing code, and only pay for the resources your application uses, such as the number of images processed and the amount of storage required for the thumbnails.

This means you can save money on infrastructure costs, and only pay for the resources your application actually uses.

Scalability

Another benefit of serverless computing is improved scalability and flexibility.

For example, you have a mobile game that has a leaderboard feature, where players can compete with each other to earn the highest score. With traditional computing models, you would have to provision and manage the infrastructure that runs the leaderboard, and make sure it has enough capacity to handle the expected number of players and the expected workload.

With a serverless architecture, you can use AWS Lambda and DynamoDB to automatically scale the leaderboard up or down, based on the number of players and the workload, without having to worry about the underlying infrastructure.

This means your game can handle large and unpredictable workloads, and provide a seamless experience for your players.

Event driven

Event-driven architecture is a software design pattern that allows for the creation of scalable and maintainable systems. This type of architecture is based on the idea of events, which are simply things that happen within a system. In an event-driven architecture, components within the system are designed to listen for specific events and respond to them in a predefined manner. This approach has several benefits over other architectures, such as improved scalability and flexibility.

Dr Werner Vogels giving his keynote speach at re:Invent 2022

Because components are designed to listen for and respond to specific events, it makes it easier to handle large amounts of data and to support a growing user base, which allows for better scalability.

Another benefit of event-driven architecture is greater flexibility - components are decoupled from one another, so it's easier to add new features or modify existing ones without breaking the system.

Overall, event-driven architecture offers many benefits that make it an attractive option for building scalable and maintainable systems. Its ability to support large amounts of data and its flexibility make it an ideal choice for many applications.

Serverless

Conclusion

Serverless architectures offer a number of benefits; cost savings, improved scalability and flexibility, and the ability to focus on writing and deploying code, rather than managing and maintaining the underlying infrastructure.

Our event-driven approach ensures we create flexible, de-coupled systems, that are easier change without affecting other parts of the system.


Read more about 'Serverless on AWS': https://aws.amazon.com/serverless/

Do you have any thoughts on this article? Get in touch: hello@sinovi.uk

About the author

Martin Hicks

Martin is a software developer with extensive experience in building highly-available, functional web applications.

In his past projects, Martin has demonstrated his ability to design and implement scalable, resilient systems that can handle a high volume of traffic and data. His AWS certification, "AWS Certified Developer - Associate," confirms his expertise in using AWS technologies to build and deploy cloud-based applications.

Martin is also a keen open-source contributor and passionate about the web-platform. He sees the future of web app development as being centered around serverless compute, event-driven architectures, infrastructure as code, and managed databases.

Profile image of Martin Hicks
contact us

We're here to help

Talk to us today about AWS cloud development.

We're a software development and cloud consultancy, operating as an outsourced technology partner for businesses - building, hosting and maintaining functional web based applications in the AWS cloud with trusted web technologies.

Discuss your next project