Skip to content

Category: Databases

Setting up Change Data Capture with Debezium and PostgreSQL

Event-driven systems have well-known advantages and most modern distributed system architectures leverage events to reduce latency, improve scalability, and overall, make everybody’s life a little bit easier.

But what happens when integration with a legacy system (non-event-driven) needs to happen? Are we ready to sacrifice the benefits of event-driven architectures, or will we spend time, effort and money to build and event source based on the legacy system?

SEQUELIZE AND TYPESCRIPT

As many .NET developers transitioning to the world of Node, I started looking for an ORM. After some research, I found sequelize which seems widely adopted by the community.

I’m using typescript, and I quickly found the way to define the model with sequelize a bit too verbose, and especially a duplication of the typescript class.

That’s when I discovered sequelize-typescript, which provides this bridge, and leverages typescript’s typings, so mapping can be transparent if so we wish. All it takes is to extend a base Model class, and some annotations.