jump to navigation

ESB Design Pattern – Generic Proxy Pattern August 19, 2009

Posted by Terry.Cho in Architecture.
Tags: , , , , , , ,

Generic Proxy Pattern

The Generic proxy pattern is a design pattern for ESB to reduce factory job and provide more flexibility to ESB design. Oracle ESB has 2 service types.

  • Business Service : This service provides a delegate for the real web service. It is used as a interface for real webservice.
  • Proxy Service : This service has mediation pipeline to provide flexibility for business service access. It covers transformation, routing, adding of new functionality and sometimes includes service orchestration.

One issue in OSB design proxy service is that normally we have cross cutting concerns like logging,authentication,authorization etc. Typically in OSB, we have to implement these in each proxy service. This introduces a lot of factory work and reduces system flexibility as changing cross cutting concerns becomes more difficult.

For example, we can implement logging with a Java call out in OSB. We can put the call out  into each proxy service. If we change interface of the java-call out class, we have to change all of proxy service in the system. The Generic proxy pattern helps us to remove this factory job.

Today with introduction of WEB 2.0, there are a lot of defecto standard protocol like XML/HTTP RPC, REST,JSON etc. Sometimes SOA systems have to support these kinds of protocols.  The generic proxy pattern provides a protocol converter.

Generic Proxy Pattern is consists of four layer.


  1. Edge Proxy (Inbound) :  This is entry point of our ESB. It covers protocol conversion to internal SOA protocol. (Web service)
  2. Common Proxy : This is point to handle cross cutting concerns for system – Authorization,Authentication,Logging,Billing etc. And route the service request to appropriate local proxy.
  3. Local Proxy : It is one-to-one mapping to Business service. It can just forward request to business service. OR it contains mediation logics (Intermediary logic – Transformation, Routing, Function adding etc)
  4. Edge Proxy (Outbound/Optional) : This proxy is another edge proxy for outbound protocol conversion. This is optional. In our architecture internal protocols are integrated with webservice. This proxy is used for legacy integration.
  5. Business Service :  There is some design options.

In type of service, we can provide internal service and external service. Internal service is for internal system and it doesn’t need any security checking. The security checking is covered by firewall etc. In that case we can separate Edge proxy&Common proxy to external and internal.

In the edge proxy we can separate internal and external service with URL prefix. Http://myplatform/internal/serviceURI Http://myplatform/external/serviceURI.

And each edge proxy uses internal common proxy and external common proxy. In internal common proxy we remove security related logic & billing related logic.

Logical proxy and business service are reused same way for external and internal exposing.