What’s the difference between Red/Black deployment and Blue/Green Deployment?

Blue-green deployment Classic deployment technique described in the Continuous Delivery book by Jez Humble and David Farley: The idea is to have two identical versions of your production environment, which we’ll call blue and green… Users of the system are routed to the green environment, which is the currently designated production. We want to release … Read more

When should you use the singleton pattern instead of a static class? [closed]

Singletons can implement interfaces and inherit from other classes. Singletons can be lazy loaded. Only when it is actually needed. That’s very handy if the initialisation includes expensive resource loading or database connections. Singletons offer an actual object. Singletons can be extended into a factory. The object management behind the scenes is abstract so it’s … Read more

Which design patterns can be applied to the configuration settings problem?

I prefer to create an interface for setting query, loading, and saving. By using dependency injection, I can inject this into each component that requires it. This allows flexibility in terms of replacing the configuration strategy, and gives a common base for everything to work from. I prefer this to a single, global “settings loader” … Read more

Façade vs. Mediator

…most sites point out that the mediator “adds functionality”… The facade only exposes the existing functionality from a different perspective. The mediator “adds” functionality because it combines different existing functionality to create a new one. Take the following example: You have a logging system. From that logging system, you can either log to a file, … Read more

What design patterns are used in Spring framework? [closed]

There are loads of different design patterns used, but there are a few obvious ones: Proxy – used heavily in AOP, and remoting. Singleton – beans defined in spring config files are singletons by default. Template method – used extensively to deal with boilerplate repeated code (such as closing connections cleanly, etc..). For example JdbcTemplate, … Read more

Simple Explanation for the “Reactor Pattern” with its Applications [closed]

You might want to check the original paper describing it http://www.dre.vanderbilt.edu/~schmidt/PDF/reactor-siemens.pdf The Reactor design pattern handles service requests that are delivered concurrently to an application by one or more clients. Each service in an application may consist of serveral methods and is represented by a separate event handler that is responsible for dispatching service-specific requests. … Read more