Skip to content
Robert de Forest edited this page Jan 28, 2019 · 1 revision

Notes on implementing lower levels with API Gateway + Lambda + DynamoDB.

Free tier limits

  • API
    • 1M requests / month
  • Lambda
    • 1M requests / month
    • 400,000 GB-seconds / month
  • Dynamo
    • 25GB persisted state
    • 2.5M read requests / month
    • 25 reads / second
    • 25 writes / second

Plan

  • Implement Engine in Lambda, fronted by API service, persisting to Dynamo.
  • First step towards that is the old "schizm" project built on the same parts.
    • A wiki where the content of the wiki includes the bulk of its implementation

MVP

  • Can create a new page by going to a non-existent page and saving new contents
  • Lambda code stored in mutable objects persisted to Dynamo
  • Objects are copy-on-write

Bootstrapping: MinimalDB + starting config

To get up and running we need a working API and pre-populated Lambda functions.

/send -> dispatchMessage

Dynamo schema

Tables

  • Objects

    • number objId -> partition key
    • number version
    • string methods
    • string data
  • LambdaControl...

API

Routes

  • /
  • Greeting, login, etc
  • /client
  • Serves up the HTML and code which know how to talk to /send
  • /send
  • method call interface
  • params
  • number id
  • number version
  • string messageName
  • object data
  • /admin
  • Bootstrapping hack
  • /admin/setObject
  • number id
  • number version
  • If missing or non-numeric, creates a new version of the object
  • object data
  • /admin/getObject
  • number targetId
  • number version
  • If missing or non-numeric, returns list of all versions

Clone this wiki locally