Storing state machine

Поиск
Список
Период
Сортировка
От Mohan Radhakrishnan
Тема Storing state machine
Дата
Msg-id CAOoXFP_=OWmOoyzb8iUN3wHdhTgL-qxFJiHki9veTO-NFRQaqw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Storing state machine  (Tim Cross <theophilusx@gmail.com>)
Список pgsql-general
Hello,
           We have a workflow when we receive events into the service. But we don't have a way to choreograph or orchestrate the workflow. The services are all independent and receive and respond to events.

Since there is no order imposed by the event queues I was thinking of storing a simple state machine in the table.

1. Order PENDING
2. Order line 1 PENDING
3. Order line 2 PENDING
4. Order line 1 PROCESSED
5. Order line 2 PROCESSED
6. Order PROCESSED

Order and Order lines can be PROCESSED in any order. But at the end all lines should be  PROCESSED and then the order is also  PROCESSED.
I won't be able to use any PostgreSql functions because we don't depend on those features.

Are there any PostgreSql features that could support this pattern ? Is it just like any other eventually consistent pattern ?
  
Thanks

В списке pgsql-general по дате отправления:

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Vulnerability PostgreSQL 11.2
Следующее
От: Tim Cross
Дата:
Сообщение: Re: Storing state machine