Event-Driven Serverless
Featuring: sls-dev-tools
bene@theodo.co.uk
Ben Ellerby
@EllerbyBen
EventBridge Storming
@EllerbyBen
Ben Ellerby
@EllerbyBen
serverless-transformation
@EllerbyBen
Serverless
What is this Serverless thing?
-
Architectural movement
- “allows you to build and run applications and services without thinking about servers” — AWS
- Developers send application code which is run by the cloud provider in isolated containers abstracted from the developer.
- Use 3rd party services used to manage backend logic and state (e.g. Firebase, Cognito)
- A framework with the same name
@EllerbyBen
Why Serverless?
💰 Cost reduction
👷♂️ #NoOps... well LessOps
💻 Developers focus on delivering business value
📈 More scalable
🌳 Greener
@EllerbyBen
Not just Lambda (FaaS)
Lambda
S3
Dynamo
API Gateway
Compute
Storage
Data
API Proxy
Cognito
Auth
SQS
Queue
Step Functions
Workflows
EventBridge
Bus
Lambda Triggers
@EllerbyBen
Power and Flexibility to build...
@EllerbyBen
Microservices
@EllerbyBen
Microservices work well when:
@EllerbyBen
- Are split into clear Services
- Can be deployed independently
- Only communicate with each other asynchronously
- Master their own data
This is nothing new...
@EllerbyBen
- The Service-Oriented Architecture (SOA) movement, that preceded Microservices, had many of the same tenants
The ESB
@EllerbyBen
The ESB
@EllerbyBen
- Enterprise: Implies use in large Enterprise organisation as often used to tackle complexity in these domains along with the historically large infrastructure investment needed.
The ESB
@EllerbyBen
-
Service: As this is providing a way for the different Services (logical self-contained representations of business processes) to communicate.
The ESB
@EllerbyBen
- Bus: Referencing the hardware element of computers that allows the transfer of signals between different components.
The Event
@EllerbyBen
- Event: “A significant change in state” — K. Mani Chandy
Enter EventBridge
@EllerbyBen
Amazon EventBridge: "Serverless event bus that connects application data from your own apps, SaaS, and AWS services" -AWS
Enter EventBridge
@EllerbyBen
The biggest Serverless announcement since the release of AWS Lambda.
The key component to building state-of-the-art Serverless EDAs.
Enter EventBridge
@EllerbyBen
@EllerbyBen
The ESB is dead, long live the ESB
@EllerbyBen
- The difference is it's completely Serverless, with no management required.
- Simple integration with existing AWS Services
"Avoiding the Lambda Pinball"
@EllerbyBen
How do I start?
@EllerbyBen
🤷♂️
@EllerbyBen
Domain-Driven Design and Event Storming
- Event Storming, an extension to DDD, from Alberto Brandolini is a workshop based approach to discover your domain Events, Boundaries and Entities (or Aggregates)
@EllerbyBen
EventBridge Storming
EventBridge Storming: "A specific variant of EventStorming that reduces rework and tight-coupling for teams building state-of-the-art Serverless Event-Driven Architectures with EventBridge."
@EllerbyBen
EventBridge Storming
@EllerbyBen
1. Event Discovery
@EllerbyBen
2. Temporal Sequencing
@EllerbyBen
4. Categorize into Entities (& Aggregates)
@EllerbyBen
5. Categorization into Bounded Contexts
@EllerbyBen
A Lambda does not a Microservice Make
@EllerbyBen
6. Name Microservices
- One Bounded Context may have multiple Microservices corresponding to its underlying Aggregates & Entities
@EllerbyBen
6. Name Microservices
- ⚠️If an Entity or Aggregate appears in two Bounded Contexts, this implies there should be two independent Microservices to handle the divergent business processes in these two contexts.
@EllerbyBen
7. Creating a Single EventBridge Event Bus
@EllerbyBen
8. Building a Shared Schema
- Teams should be able to work on and deploy Services independently.
- Teams need to agree on the structure of Events, their Schema.
- Title, structure and types.
- Teams should share Schema, not data and code.
@EllerbyBen
EventBridge Schema Registry
@EllerbyBen
EventBridge Storming
EventBridge Storming: "A specific variant of EventStorming that reduces rework and tight-coupling for teams building state-of-the-art Serverless Event-Driven Architectures with EventBridge."
@EllerbyBen
EventBridge Storming
@EllerbyBen
How to trigger an Event?
🤷♂️
@EllerbyBen
@EllerbyBen
@EllerbyBen
@EllerbyBen
@SlsDevTools
@EllerbyBen
@EllerbyBen
@EllerbyBen
Event-Driven Serverless, EventBridge, EventStorming and more...
By Ben Ellerby
Event-Driven Serverless, EventBridge, EventStorming and more...
This talk was given at the virtual ServerlessDays Cardiff meetup 09/04/20.
- 1,299