Simple Mutual Exclusion

When we design services for high availability, we often deploy more than one instance of the same application. It might be two servers behind a load balancer or a few nodes sharing the same workload. This setup is great for redundancy and performance, but it introduces a simple question: how can we make sure that only one instance executes a […]

Spring Cache Abstraction

Spring cache abstraction applies caching to the Java methods. It provides an environment where we can cache the result for the methods we choose. By doing so, it improves the performance of the methods by avoiding multiple execution of the methods for the same object. Note that this type of caching can be applied to the methods which return the […]

Dependency Injection in JavaScript

Dependency injection is about removing the hard coded dependencies and providing way of changing dependencies in compile-time or run-time. This pattern has been exercised in several frameworks like Spring(Java). It is also becoming popular in JavaScript community. There are libraries that support dependency injection like Angular.js, Require.js, Inject.js and more. Following recent developments, we will present what is dependency injection, […]

Cepheye Yönelik Programlama

Yazılım dünyasında başlıca endişelerinden biri, yazılımdaki parçaların biri birine çok bağlanmasıdır(high coupling, cross-cutting concerns). Bu durum yazılımın belirli bir noktadan sonra anlaşılmaz, ayrıştırılamaz, ilerletilebilemez hale gelmesine yol açar. Çare olarak yazılımcılar, en yaygın yöntem olan yazılım şablonlarını kullanırlar. Fakat, bazen işler o kadar karmaşık bir hal alır ki artık, yazılım şablonları da karmaşayı sonlandıramaz. Bu noktada cepheye yönelik programlama(aspect-oriented programming, […]