Friday, 20 December 2013

Throttling in OSB -Control Number of Requests to Target service

Throttling 

              Throttling configured on Business Service only limited loads (requests) to back-end services and to avoid overloading the back-end.You can now “throttle” services and set priorities based on the caller. You can also manage service endpoints pools more effectively. 
Service Throttling
                       Service throttling is a new feature in Oracle Service Bus which allows to restrict the load for particular service. This has great value when it comes to Service up time.

Every system has its own capacity means it can process only certain number of message at one time, if we try to send messages beyond its capacity then that system's performance can degrade or in worst case it can crash. So to avoid all this we can use OSB throttling feature to send limited messages to target system.


To Enable Throttling to Business service or Proxy service

1.Create a Session Using Change center in OSb console.
2.Click on the Business Service/Proxy service you want to add throttling.
3.Go to Operational Settings tab.




4.Here 

1.Throttling State: 
  •  Enable or disable throttling for a business service.
Note: When you disable throttling for a business service at run time, all messages              in the throttling queue are processed without throttling.
2.Maximum Concurrency:
  • Restrict the number of messages that can be concurrently processed by a business service. This must be a positive integer. 
  • When this threshold is reached for a business service, all the incoming messages for the business service are placed in a throttling queue until the business service can accept more messages.
  • Any change to this setting affects both new messages and those already in the queue. When you increase the value, the Oracle Service Bus run time allows more messages to be sent to the business service after processing those in the queue first. 
  • When you decrease the value, the Oracle Service Bus run time places any new messages in a throttling queue until the concurrency setting goes below the new threshold, if you have defined a throttling queue. 
  • If you have not defined a throttling queue, the messages are discarded.
  • In a cluster environment, the number of messages that can be concurrently processed by a business service is equally divided among the managed servers.

Note: You can set this operational setting only if you enable throttling for the business service.

3.Throttling Queue (operational setting)

  • Restrict the number of messages in the throttling queue. The length of the throttling queue must be positive integer. 
  • All the incoming messages beyond the maximum concurrency limit for the business service are placed in the throttling queue. 
  • When the queue is full, the message in the queue with the lowest priority will be removed from the queue if a new incoming message has a higher priority.
  • If you set this length to be equal to zero, it implies that a throttling queue does not exist for the business service.
  • Any change to this setting is dynamically implemented. When you decrease the value for this setting, all the messages beyond the new length are discarded.

Note: You can set this operational setting only if you enable throttling for the business service.In a cluster environment, this is equally divided among the managed servers.

4.Message Expiration

  • Restrict the maximum time (in milliseconds) spent by a message in the throttling queue of a business service. This must be a positive integer. 
  • When this time has elapsed, the message is removed from the queue. These messages are referred to as expired messages.
  • If the message expiration is set to zero for a service, the messages in throttling queue for this service will never expire.
  • When you increase the value for this setting, the expiration time for the new messages and the messages that are already present in the queue is increased. 
  • When you decrease the value, all the messages that have exceeded the new value are immediately discarded.

Note: You can set this operational setting only if you enable throttling for the business service.


Example:Going to provide in next post...........

Thursday, 19 December 2013

Configure OSB domain


  • Go to All programes-->Oracle service bus-->configuration wizard




  • select create new weblogic domain and Click next.


  • select the above check boxes..and say next.


  • Enter new domain name and say next..

Note:don't create Managed servers at the time of creating domain to avoid exceptions while applying OWSM security for proxy services..So that we can run admin server only.To do this Select OSB for developers check box instead of oracle service bus

  • Enter weblogic werver pwd

                 weblogic/welcome1 and say next..
  • Leave the jdk locations as it is and say next..
  • Select the OWSM MDSSchema checkbox enter the following details and say next.Here pwd is Oracle123.


  • Configure the datasources correctly

1.OWSM MDS Schema
enter the details that we have provided while installing RCU.

Here
Vendor:Oracle
Driver:service connections
Schema Owner:OSBDEV_MDS
Schema Password:Oracle123
DBMS/Service:orcl
Host name:local host
Port:1521

2.OSB JMS Reporting Provider
Scema Owner:OSBDEV_SOAINFRA
remaing all same as above

  • Make sure that all test of all data sources are success.
              We Can check this Owner name and version in the following table (db connection :)

                               select * from schema_version_registry;(to get these data sources information)
           Make sure that schema version for these two data sources is 11.1.1.7.0.Otherwise we can update the table with theese version and we can observe here is while installing RCU we need to select the above COMP_NAME s only..

  • Click on ok for the JDBC incomplete poppup.

  • Here select the Admin server ,Managed servers and Deployements..as shown below and say next.We need to create one admin server and managed server and configure the deployements for those servers in this step.
  • Here we need to add a new managed server named as osb_server1 bty clickind add button.(this has to be done when you select Oracle service bus check box instead of oracle service bus for developers as we discussed above while creating domain)

Name:osb_server1
Listen address:default
port:8011
ssl:disabled

and say next..

  • Leave cluster and machines screens as it is for now...
  • Say next..you will navigate to Targetdeployments screen
  • Observe there for admin server all the check boxes are checked by default.. check alla the checkboxes

Note:(again this is in the case If you not select oracle service bus for developers..If you selected this option we no need all these things beacause we have only one admin server in this case ,so all are deployed to admin server only.)
1.Observe that wsm-pm should be targeted to only osb_servrer1.
2.OWSM Policy Support in OSB Initializer delopyed in both admin and osb_server1.
3.Two data sources are tested succesfully

  • Click on create to create new domain..


Start the weblogic admin and osb server
by navigating to that path

ADMIN_SERVER
1.open cmd..go to this path..(location where you have installed WLS and osb and the Domain created)
                E:\OSB_Install_new\Oracle\Middleware\user_projects\domains\osb_domain_new\bin
                  startweblogic.cmd and say enter.
Note :If we select oracle service bus for developers..we no need to go to next steps.because we have only one admin server.

OSB_SERVER(Managed server)

1.open new cmd and go to this path
E:\OSB_Install_new\Oracle\Middleware\user_projects\domains\osb_domain_new\bin
2.startManagedWeblogicServer.cmd osb_server1
3.it will ask you for credentials
4.there enter weblogic/welcome1
say enter to run the osb_server    

Introduction to OSB



Introduction to OSB

Oracle Service Bus (OSB) was earlier known as AquaLogic Service Bus (ALSB) which was the product of BEA systems. Once it is acquired by Oracle ALSB become OSB.
Oracle Service Bus is component of Oracle Fusion Middleware stack and it is used for light weight messaging. Along with messaging, it also do message transformation and service monitoring.
  • The Oracle Service Bus (OSB)  presents a communication backbone for transport and routing of messages across an enterprise. It is designed for high-throughput and reliable message delivery to a variety of service providers and consumers.
  •  It supports XML as a native data type, however, other data types are also supported. As an intermediary, it processes incoming service request messages, executes the routing logic and transforms these messages if needed.
  •  It can also transform between different transport protocols (HTTP, JMS, File, FTP, and so on.). Service response messages follow the inverse path. The message processing is specified in the message flow definition of a proxy service.
  • The Service Bus should also perform the routing of messages between the components so no components would have to be dependent on the knowledge of the location of another component.
  • OSB provides some functionality that are similar to the functionality of the Mediator component within the SOA Composite, such as routing, validation, filtering, and transformation. 
  • The major difference is that the Mediator is a mediation component that is meant to work within the SOA Composite and is deployed within a SOA composition application. The OSB on the other hand is a standalone service bus. In addition to providing the communication backbone for all SOA (and non-SOA) applications, OSB mission is to shield application developers from changes in the service endpoints and to prevent those systems from being overloaded with requests from upstream applications.


In addition to the Oracle Service Bus, we can also use the Mediator service component, which also provides mediation capabilities, but only within SOA composite applications. On the other hand, OSB is used for inter-application communication.

Functional View of OSB


The figure shows the functional architecture of Oracle Service Bus (OSB). We can see that OSB can be categorized into four functional layers:


  1. Messaging layer: Provides support to reliably connect any service by leveraging standards, such as HTTP/SOAP, WS-I, WS-Security, WS-Policy, WS-Addressing, SOAP v1.1, SOAP v1.2, EJB, RMI, and so on. It even supports the creation of custom transports using the Custom Transport Software Development Kit (SDK).
  2. Security layer: Provides security at all levels: Transport Security (SSL), Message Security WS-Policy, WS-Security, and so on), Console Security (SSO and role based access) and Policy (leverages WS-Security and WS-Policy).
  3. Composition layer: Provides configuration-driven composition environment. We can use either the Eclipse plug-in environment or web-based Oracle Service Bus Console. We can model message flows that contain content-based routing, message validation, and exception handling. We can also use message transformations (XSLT, XQuery), service callouts (POJO, Web Services), and a test browser. Automatic synchronization with UDDI registries is also supported.
  4. Management Layer:Provides a unified dashboard for service monitoring and management. We can define and monitor Service Level Agreements (SLAs), alerts on operation metrics and message pipelines, and view reports.

Proxy services and business services



OSB uses a specific terminology of proxy and business services. The objective of OSB is to route message between business services and service consumers through proxy services.
Proxy services:
Proxy services are generic intermediary web services that implement the mediation logic and are hosted locally on OSB. Proxy services route messages to business services and are exposed to service consumers. A proxy service is configured by specifying its interface, type of transport, and its associated message processing logic. Message flow definitions are used to define the proxy service message handling capabilities.
Business services:
Business services describe the enterprise services that exchange messages with business processes and which we want to visualize using the OSB. The definition of a business service is similar to that of a proxy service, however, the business services does not have a message flow definition.

OSB Service Invocation:

image
OSB service invocation happens through two different layers: 
  • proxy service and business service. Proxy service is an entry point for all service invocations. Ideally proxy service should present a canonical interfaces to clients.
  • Proxy service then routes inbound message through a series of steps (using request and response pipelines).
  • Each step can perform distinct operations such as transformation and logging etc., Eventually this message is routed to Business Service which is just a reference to target service.
  •  Similarly, output message from business services follows reverse flow through outbound pipeline, proxy service and finally to the client.

Input and output pipe lines are also responsible for transforming data from and to canonical format.


Home