Skip to content

persistence layer design

timlesallen edited this page Jan 22, 2014 · 4 revisions

Using: PostgreSQL.

Table schema

  • jobs

    • (integer) id
    • (timestamp) processNext
    • (timestamp) createdAt
  • job_data

    • (integer) id
    • (json) data
    • (timestamp) createdAt

DO we use an ORM?

Perhaps not, perhaps... Will look at sequelize again.

Locking

We can use 'SELECT FOR UPDATE' to get row level locks.

Clone this wiki locally