java 

Implementing an Interface in Python

Interfaces play an important role in software engineering. As an application grows, updates and changes to the code base become more difficult to manage. More often than not, you wind up having classes that look very similar but are unrelated, which can lead to some confusion. In this tutorial, you’ll see how you can use a Python interface to help determine what class you should use to tackle the current problem. In this tutorial, you’ll be able to: Understand how interfaces work and the caveats of Python interface creation Comprehend…

Read More
Programming 

Implementing reader-writer locks

When writing concurrent code, a lock is one of the most critical tools programmers have in their toolbox. For the majority of applications adding a lock to protect access to some data is all you need. However, for some performance-critical pieces of code, a lock may introduce significant overhead and its use has to be carefully optimized; for example, lock granularity is frequently tweaked to make sure threads hold locks for the minimal amount of time necessary. A common optimization for locks is using reader-writer locks, and this post discusses…

Read More
java 

Implementing the Outbox Pattern with CDC using Debezium

The post Implementing the Outbox Pattern with CDC using Debezium appeared first on Thoughts on Java. A microservice architecture makes the implementation of a single service easier but introduces new challenges as soon as you need to share data between services. Reliably sharing data and keeping your services independent of each other isn’t as easy as most developers expect. But using the right patterns, it’s also not an impossible task. Using the outbox pattern and a Change Data Capture (CDC) implementation provided by Debezium, this gets actually quite simple. In…

Read More