Monday, June 8, 2020

loose coupling vs tight coupling

Tight Coupling:
  •  A Tightly Coupled Object is an object that needs to know about other objects and are usually highly dependent on each other's interfaces. When we change one object in a tightly coupled application often it requires changes to a number of other objects. There is no problem in a small application we can easily identify the change. But in the case of a large applications these inter-dependencies are not always known by every consumer or other developers or there is many chance of future changes.
  • Traditionally, connections between applications or between applications and services have been tightly coupled, as with CORBA (Common Object Request Broker Architecture).
  • Tightly coupled systems are usually fast and safe, and the risk of transmission errors is very low. 
  • Tight coupling tends to make component maintenance and reuse much more difficult, because a change in one component automatically means changes in others. Similarly, tight coupling makes extra work when an application has to adapt to changing business requirements, because each modification to one application may force developers to make changes in other connected applications.
Loose Coupling:
  • Loose coupling is a design strategy which allows us to reduce the inter-dependencies between components of a system with the goal of reducing the risk that changes in one component will require changes in any other component. It’s all about thinking a problem in generic manner and which intended to increase the flexibility of a system, make it more maintainable, and makes the entire framework more stable. 
  • One key feature of SOA is the use of loosely coupled connections.  
  • Loosely coupled systems, on the other hand, are usually more error-prone but also more flexible. 
  • Being loosely coupled enables you to keep moving forward, modifying/adding features, bugs fixing, etc.

Friday, June 5, 2020

Service orchestration vs Service Choreography

Service orchestration
  • Service orchestration represents a single centralized executable business process (the orchestrator) that coordinates the interaction among different services. The orchestrator is responsible for invoking and combining the services.
  • The relationship between all the participating services are described by a single endpoint (i.e., the composite service). The orchestration includes the management of transactions between individual services. Orchestration employs a centralized approach for service composition. 
  • WS-BPEL specification is an example. WS-BPEL is a language for defining processes that can be executed on an orchestration engine such as WSO2 BPS.


Service Choreography
  • Service choreography is a global description of the participating services, which is defined by exchange of messages, rules of interaction and agreements between two or more endpoints. Choreography employs a decentralized approach for service composition.

.
The choreography describes the interactions between multiple services, where as orchestration represents control from one party's perspective. This means that a choreography differs from an orchestration with respect to where the logic that controls the interactions between the services involved should reside.


Wednesday, May 27, 2020

12c Jdeveloper - Modify Jdeveloper font size

In order to set the font size for the Jdeveloper IDE,  you need to modify the ide.properties file to set the font size.

It is typically available under 

Windows: Go to the following location
For 11g:
C:\Users\{user_name}\AppData\Roaming\JDeveloper\system11.<Versiopn>\o.jdeveloper\ide.properties
For 12c:
C:\Users\{user_name}\AppData\Roaming\JDeveloper\system12.<Versiopn>\o.jdeveloper\ide.properties

# To modify the font size for all look-and-feels in all locales, set
# the Ide.FontSize property.  For example:
# Ide.FontSize=11

Change to:
(remove only the comments and provide your desired value for font size):

Ide.FontSize=16

In fact the ide.properties file is so self explanatory it has lot of comments documented in it on how to set the font sizes for a specific locale and look and feel etc.

Wednesday, May 20, 2020

How to export data dictionary with Oracle SQL Developer

Oracle SQL Developer is a free development tool for Oracle database. It has a nice feature of generating data dictionary and exporting it to HTML.

To generate data dictionary create connection to your database, then select connection, right click and choose Generate DB Doc....
Then choose output directory and optionally take time to select database object types.
Click OK and wait for export to complete. This is how it looks:


Unix/AIX box : count word occurrences in text file

Command:
An approach is to transform the content of the input file with tr command so that all words are in a single line and then use grep -c to count that match count.

$ tr '[:space:]' '[\n*]' < example.txt | grep -i -c 'EMPLOYEE_NUMBER'


Wednesday, May 13, 2020

12c SOA - Business Rules - use of generic rule

Input: id, name, designation (like PAT, A, SA, M etc.).

Output: eligible_trutime_topup_per_fortnight (like 10,20,0 etc.)

Step1: Create SOA Project.


Now project created.

Step2: Drag and drop bpel process and select synchronous process.

Now bpel created as like below.

Step3: Prepare schema as per your requirement.

Step4: Drag and drop business rules component.

Now you can import schema input and output.

Import input schema.

Input schema imported successfully, now import output schema.


Both schema’s imported successfully.

Step5: Double click business rules.

Now create rule.

Add the condition and hard code the output value.

Add then condition.

Select target processResponce.

Hard code output value.


Add remaining conditions also.

Step6: Double click bpel process and add Business Rules.

Double click rules and and select Business rules.

After selection now showing like below image.

Click ok, Now composite automatically invoke businessrules and created activity’s.

Step7:  Now composite like below and deploy the composite and test.

Testing:

Input:

<?xml version="1.0" encoding="UTF-8"?><inputVariable>

   <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">

      <ns1:process xmlns:ns1="http://xmlns.oracle.com/POC/BussinessRulls_Poc/TopupBPEL">

            <ns1:ID>12345</ns1:ID>

            <ns1:NAME>Suri</ns1:NAME>

            <ns1:DESIGNATION>A</ns1:DESIGNATION>

        </ns1:process>

   </part>

</inputVariable>

Output:

<?xml version="1.0" encoding="UTF-8"?><outputVariable>

   <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">

      <processResponse xmlns="http://xmlns.oracle.com/POC/BussinessRulls_Poc/TopupBPEL">

         <Eligibletopup>15</Eligibletopup>

      </processResponse>

   </part>

</outputVariable>


Tuesday, May 12, 2020

Unix/AIX box - Certificate expiration date check


Run the following openssl command 

echo | openssl s_client -servername NAME -connect HOST:443 2>/dev/null | openssl x509 -noout –dates

Example: If you have a server name ="test.server.com" and port="443"

echo | openssl s_client -servername test.server.com -connect test.server.com:443 2>/dev/null | openssl x509 -noout -dates


Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...