paint-brush
Use Database Transaction Logs to Implement Observer Patternby@amritsingh
807 reads
807 reads

Use Database Transaction Logs to Implement Observer Pattern

by Amrit Singh3mJune 23rd, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Design patterns help you solve common problems and keep your code maintainable, and extensible. The observer pattern is used when a change in an object should trigger changes in the observing objects. Using Transaction Logs to implement Observer Pattern is the most common way to implement this pattern in web apps. There are many ways this pattern can be implemented, such as using Web Framework’s Observers and using periodic jobs to trigger the observer code based on the type of events. Using a simple background job to scan through the database tables and based on changes the observers code is run synchronously or asynchronously.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Use Database Transaction Logs to Implement Observer Pattern
Amrit Singh HackerNoon profile picture
Amrit Singh

Amrit Singh

@amritsingh

Cloud Software Engineer | Product Development | I write about Tech and Travel | Profile https://bit.ly/3dNxaiK

About @amritsingh
LEARN MORE ABOUT @AMRITSINGH'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Amrit Singh HackerNoon profile picture
Amrit Singh@amritsingh
Cloud Software Engineer | Product Development | I write about Tech and Travel | Profile https://bit.ly/3dNxaiK

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Also published here
Joyk
Coffee-web