Monday, November 09, 2009

SCA a step forward or a just hype?

When Oracle introduced the new version of the Oracle SOA Suite 11g, it introduced a new abstraction layer, the Service Component Architecture (SCA).

The SCA can be seen from a technical point of view, as a container that holds a set of SOA components. These components interact with each other and can be exposed to the outside world as a service. The components itself can call external services, these are called references.

From functional point of view, the SCA is an abstract object that contains a set of business requirements. These requirements are implemented via the various SOA components and are hidden to the outside world.

The biggest advantage of the SCA, is the way the business can talk to the IT and vice versa. With the introduction of SOA technology a few years ago, the two worlds come together. SCA is the finally the bridge of these two worlds. With SCA the business can talk about their requirements and their information flows that need to be processed and orchestrated. While the IT can listen and map the requirements to the different SCA composites with their SOA components, without having discussions with the business on the implementation.

Earlier I wrote a dutch article when I discussed if SOA itself is a hype. In my opinion it is not. The same applies for SCA. It is a next step in the evolution of integration. Think about when we used technologies such as hub-spoke model, EIS, EAI and technologies such as CORBA etc.

While SCA is relative new, the main discussion on SCA composite, how big or how small we make the SCA. Do we design small SCA composites with a few business requirements or do we design large SCA composites that holds a large number of business requirements. The answer is always in the middle. It depends on the non functional requirements of the customer.

When implementing a green field project based on SCA, the SCA composite can be designed to handle particulare business requirements. Examples are:
  • OrderHandling - handle all the requirements of an order; create/update/change
  • CustomerInfo - Handle all the business requirment of the customer
Aoother view is from technical/implementation view. SCA composite can be designed for handling 'low' level functionality.
  • ProcessNotifications - handle all notifications from and to other systems
  • MaintainCRMInfo - handle all requests to the CRM system; update/delete/query/etc
  • ProcessJMSMessgae - hanle all the message from the vaious JMS queues
Using an existing SOA application to migratie to SCA, the most common approach is to migrate it 1-on-1. This makes every component in your old SOA application an SCA composite. This is the fastest way to by into the SCA world. The next step is to use the benefits of SCA; combine multiple SCA composites into a single composite.

A architectural decision should be made how we build the the SCA. With SOA/SCA it is all about re-usability. Are we designed SCA's based on the business flow or are we desiging SCA's from technical point of view. To goal is to find the correct balance. You want to design a service once and reuse it many times. From that point of view you would build small SCA's. But you could also choose for a large SCA's with multiple services that are exposed to the outside world. But in this case, the SCA is relative large, which increases the maintainability.

What you want is to define and design services and create composites that reference to this services. This will result that the service is designed once and reused many times.

Technically I think this is possible with the Oracle SOA Suite rel 11g, but it needs some hand-craft. We should manually change the composite.xml file and change the references and wiring within the composite. We could also use tools as subversion to create references with composites. This is with the option 'external:'. But again it needs some hand-craft.

The SCA is the next step of making the bridge between business and technology smalleras it already was with SOA, but we are not there yet. I would like to have a SCA 'reference' functionality and also inheritance. I hope that the team of OASIS team will look into this.

Monday, November 02, 2009

SOA 11g; start and stop

Ever wondered why there are no start and stop scripts for your complete domain? So do I :-). There are scripts to stop a single admin server or a managed server, but there is no start and stop all your servers during shut-down or a reboot. You have to create your own. Here are my scripts.

They are straight forward, and split into 3 parts:
  1. Stop WLS servers
  2. Start WLS servers
  3. A script used during boot/shutdown
The start script
This script will start the admin server and the two managed servers; soa_server1 and bam_server1


echo Starting Admin Server
nohup $O/bin/ &

echo sleep 60
sleep 60

echo Starting SOA Server
nohup $O/bin/ soa_server1 &

echo sleep 120
sleep 120

echo Starting BAM Server
nohup $O/bin/ bam_server1 &

The stop script
This script will stop the servers in the descending order.

echo Stopping SOA Server
$O/bin/ soa_server1

echo Stopping BAM Server
$O/bin/ bam_server1

echo Stopping the Admin Server

The oracle-wls script
This script is used within Linux/Unix environment during start-up or shutdown. You should copy this into /etc/init.d directory.

Then make symbolic links for each Unix run-level to start or to top the WLS environment.

These symbolic links will start the WLS environment.

ln -s /etc/init.d/oracle-wls /etc/rc2.d/S99oracle-wls
ln -s /etc/init.d/oracle-wls /etc/rc3.d/S99oracle-wls
ln -s /etc/init.d/oracle-wls /etc/rc4.d/S99oracle-wls
ln -s /etc/init.d/oracle-wls /etc/rc5.d/S99oracle-wls

These symbolic links will stop the WLS environment.

ln -s /etc/init.d/oracle-wls /etc/rc0.d/K10oracle-wls
ln -s /etc/init.d/oracle-wls /etc/rc1.d/K10oracle-wls


# Source fuction library
if [ -f /lib/lsb/init-functions ]
. /lib/lsb/init-functions
elif [ -f /etc/init.d/functions ]
. /etc/init.d/functions

# Set path if path not set (if called from /etc/rc)
case $PATH in
"") PATH=/bin:/usr/bin:/sbin:/etc
export PATH ;;


if [ $(id -u) != "0" ]
echo "You must be root to run the configure script. Login as root and then run the
configure script."
exit 1

start() {
echo "Starting Oracle WLS Instance."
$SU -s /bin/bash $ORACLE_OWNER -c "$ORACLE_START_SCRIPT" > /dev/null 2>&1
if [ $RETVAL -eq 0 ]
echo Failed to start Oracle WLS Instance.
return $RETVAL

stop() {
echo Shutting down Oracle WLS Instance.
$SU -s /bin/bash $ORACLE_OWNER -c "$ORACLE_STOP_SCRIPT" > /dev/null 2>&1
if [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$LSNR
return $RETVAL

# See how we were called
case "$1" in
echo $"Usage: $0 {start|stop|restart}"
exit 1