Design Patterns

Step Functions as an ad-hoc scheduling mechanism

We previously discussed how you can implement an ad-hoc scheduling system using DynamoDB TTL as well as CloudWatch Events. And now, let’s see how you can implement the same system using AWS Step Functions and the pros and cons of this approach. As before, we will assess this approach using the following criteria: Precision: how …

Step Functions as an ad-hoc scheduling mechanism Read More »

A self-healing Lambda function that adapts its throughput based on performance

I spent time with a client this week to solve an interesting problem – to adjust the number of concurrent requests to a downstream service dynamically based on response time and error rate. This is a common challenge when integrating with third parties, so we decided to share our approach so others might benefit from …

A self-healing Lambda function that adapts its throughput based on performance Read More »

Using CloudWatch and Lambda to implement ad-hoc scheduling

A while back I wrote about using DynamoDB TTL to implement ad-hoc scheduling. It generated some healthy debate and a few of you have mentioned alternatives including using Step Functions. So let’s take a look at some of these alternatives, starting with the simplest – using a cron job. We will assess this approach using the …

Using CloudWatch and Lambda to implement ad-hoc scheduling Read More »

DynamoDB TTL as an ad-hoc scheduling mechanism

CloudWatch Events let you easily create cron jobs with Lambda. However, it’s not designed for running lots of ad-hoc tasks, each to be executed once, at a specific time. The default limit on CloudWatch Events is a lowly 100 rules per region per account. It’s a soft limit, so it’s possible to request a limit …

DynamoDB TTL as an ad-hoc scheduling mechanism Read More »

how to do fan-out and fan-in with AWS Lambda

In the last post, we look at how you can implement pub-sub with AWS Lambda. We compared several event sources you can use, SNS, Kinesis streams and DynamoDB streams, and the tradeoffs available to you. Let’s look at another messaging pattern today, push-pull, which is often referred to as fan-out/fan-in. It’s really two separate patterns …

how to do fan-out and fan-in with AWS Lambda Read More »

What is the best event source for doing pub-sub with AWS Lambda?

AWS offers a wealth of options for implementing messaging patterns such as pub-sub with Lambda, let’s compare and contrast some of these options. The pub-sub pattern Publish-Subscribe (often shortened to pub-sub) is a messaging pattern where publishers and subscribers are decoupled through an intermediary broker (ZeroMQ, RabbitMQ, SNS, etc.). SNS + Lambda In the AWS ecosystem, the obvious …

What is the best event source for doing pub-sub with AWS Lambda? Read More »

Here Be Monsters – Message broker that links all things

In our MMORPG title Here Be Monsters, we offer the players a virtual world to explore where they can visit towns and spots; forage fruits and gather insects and flowers; tend to farms and animals in their homesteads; make in-game buddies and help each other out; craft new items using things they find in their …

Here Be Monsters – Message broker that links all things Read More »

Dart – implementing the Singleton pattern with factory constructors

In Dart there is an interesting language feature called ‘Factory Constructors’, which effectively allows you to override the default behaviour when using the new keyword – instead of always creating a new instance the factory constructor is merely required to return an instance of the class, the difference is important. Factory constructors allow you to …

Dart – implementing the Singleton pattern with factory constructors Read More »

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close