Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Designing Domain Events (medium.com/casaone-engineering)
21 points by endeepak on May 21, 2021 | hide | past | favorite | 3 comments


I have implemented something quite similar, over a decade ago, for a credit card terminal application.

Basically the idea is to have the intent to send the message saved in a local database (actually a single byte denoting state of the FSM for the communication with central system). Once saved, it means it it is possible that the message was sent. This is important detail, because retries need to have a flag set so that central system takes special care to possibly match it with previous transmission.

Once the record is saved, it is reminder for the application that there is exchange that needs to be performed and the terminal will retry the transaction on various occasions until it receives response from the central system, which should conclude with the state byte changed to indicate the communication was completed.


Didn't know about transactional outbox pattern before, thanks for sharing


I'm glad to hear that.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: