Redis: Exploring Redis as Serverless Database to solve idempotence in APIs

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • DefinitelyTyped

    The repository for high quality TypeScript type definitions.

  • Each Lambda receives an event as part of their request.

  • Redis

    πŸš€ A robust, performance-focused, and full-featured Redis client for Node.js.

  • Then, check at the Redis database if that hash already exists in the table. We’ll do this using the lib ioredis. That we’ll pass an option to the middleware we are creating.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • middy-idempotent

    πŸ›΅ πŸ“¬ β€Žβ€Žβ€β€β€Ž β€Žβ€β€β€Ž β€Žβ€β€β€Ž β€ŽIdempotence Middy middleware for your AWS Lambdas

  • View on GitHub

  • typescript-badges

    :smirk_cat: TypeScript Badges

  • Redis

    Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs, Bitmaps.

  • As self-defined, Redis is:

  • middy

    πŸ›΅ The stylish Node.js middleware engine for AWS Lambda πŸ›΅

  • I’ll leverage Middy, a lightweight middleware for Lambda in Node, which has a particularly cool feature (and a really helpful one for the task at hand) that is its onion-like middleware pattern implementation and the ability to create a middleware that can read the function after and before the handler, which is essential for idempotent APIs.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts