Chapter 14. Creating a Spring-based “site-up” framework

 

This chapter covers

  • Creating a circuit-breaker template
  • Managing the circuit breaker through JMX
  • Enabling interceptors and supporting AOP configuration
  • Establishing a custom namespace
  • Supporting annotation configuration

This final chapter covers the advanced topic of creating your own Spring-based “site-up” framework based on the circuit-breaker pattern, described by Michael Nygard in his book Release It! (Pragmatic, 2012). We’ll begin a quick overview of the pattern, then jump right into the parts that build your framework. The code for this chapter is at https://github.com/springinpractice/sip14.[1]

1 The code in this chapter is based on the open source Kite framework at https://github.com/springinpractice/kite.

14.1. Circuit-breaker overview

Integration points between systems are a common source of production issues. It’s common for problems with a service to create performance and availability issues for clients. Similarly, it’s common for misbehaving clients to create performance and availability issues for the services they use.

Here are possible scenarios:

14.2. Creating a circuit-breaker template and callback

14.3. Exposing the circuit breaker as a JMX MBean

14.4. Supporting AOP-based configuration

14.5. Supporting custom namespaces

14.6. Supporting annotation-based configuration

14.7. Summary