Skip to content

[3.5 M1][CORE] Mule Container Resources

pablolagreca edited this page Aug 23, 2013 · 27 revisions

Jira:

Forum discussion:

Motivation / Context

Several mule users have requested the capability to share resources between applications that are deployed within the same container. The main reason for the request is that they want to create an application that is a composition of mule applications. This allow them to have different teams working independently.

Another request is the capability of consuming services between mule applications deployed in the same container using VM. This allow mule applications to make use of services deployed in other mule applications in a really easy way.

We are going to provide such capabilities through the definition of resources at the container level and exposing them to all the applications deployed in the container.

Uses cases

As an architect I have different teams working on different parts of an applications. I want them to work as independent units but they must:

  • share the same security mechanism
  • all the services must be provided through the same port
  • share the connection to the persistent storage
  • share services between each other through a well defined interface

Design

Provide an xml configuration file at the container level in which users can define the mule components that they want to share between applications. Components defined in this file can be referenced from a mule application and make use of it.

A different or complementary approach can be define a configuration file at the domain level so instead of sharing resources with every app we can share resources between mule applications within the same domain.

Configuration

Configuration file at the container level

A file located in MULE_HOME/conf/mule.xml will contain the file with the user defined shared resources

<mule-server>
   <http:connector name="ApiConnector"/>
</mule-server>

What resources we will be able to configure as shared

  • HTTP connectors
  • VM connectors
  • Security Managers

Risks

We need to take into consideration that with the current threading implementation we are going to start reusing thread across different applications.

Mule Studio Impact

We need to find a way to, for every applications, allow the definition of the container shared resources file so Studio can load it when it deploys the application.

We can also think of creating a new project structure that represents the set of applications that belongs to the same container and the file with the shared resources.

MMC Impact

We must add support for the shared resources and show it status as we currently do for connectors.

CH Impact

Initially there's no impact since CH only uses one application for AMI and by default there will be no shared resources.

Service Registry Impact

No impact.

Migration Impact

No impact yet.

Documentation Impact

Requires a new documentation section for this functionality.