Tuesday, March 26, 2013

Automated Deployment


Deployment Automation replaces the manual non-standard deployment process to standardized automated deployment process for various environments such as Production, QA etc.

Tuesday, March 19, 2013

Groovy & Grails Architecture Best Practices

Groovy & Grails Architecture Best Practices

1.1.            Separations Layers

Keep separate layer for domain logic and presentation logic. Keep domain logic to domain classes and presentation logic in controllers/views

1.2.            Improve Performance

An application might be slow simply because its executing way more queries than it needs to. For that reason, you should always profile your application to find out what's happening

Thursday, March 14, 2013

Enterprise Benefits on Service Oriented Architecture - SOA


Currently, the market push is towards SOA, or Service-Oriented Architecture. SOA as a term is impressive but we need to understand what benefit we can achieve using SOA. Before turning towards benefit, it is necessary to discuss common understanding.  In brief, a service oriented architecture is paradigm which include service as a layer whereas service which is nothing but individual functionality that is shared across the applications.
The primary goal of Service Oriented Architecture is to align business users with information technologies (IT).
Adopting Service Oriented Architecture realizes many benefits..

Click To Read More!



Tuesday, March 12, 2013

Template engine on Web development

A template engine is a generic tool used on web development to process web templates and content information to produce output web documents. Template Engine as a processor is most frequently used in the context of development for the web.

Friday, March 8, 2013

Wednesday, March 6, 2013

Java Version History


Java Version History
Thought to share some of the old Java version released
New features in Java SE 7
Code named Dolphin and released on July 28, 2011.
  • Strings in switch Statement
  • Type Inference for Generic Instance Creation
  • Multiple Exception Handling
  • Support for Dynamic Languages
  • Try with Resources
  • Java nio Package
  • Binary Literals, underscore in literals
  • Diamond Syntax

New features in Java SE 6
Code named Mustang and released on December 11, 2006
  • Scripting Language Support
  • JDBC 4.0 API
  • Java Compiler API
  • Pluggable Annotations
  • Native PKI, Java GSS, Kerberos and LDAP support.
  • Integrated Web Services.
  • Lot more enhancements.
New features in J2SE 5.0
Code named Tiger and released on September 30, 2004.
  • Generics
  • Enhanced for Loop
  • Autoboxing/Unboxing
  • Typesafe Enums
  • Varargs
  • Static Import
  • Metadata (Annotations)
  • Instrumentation
New features in J2SE 1.4
Code named Merlin and released on February 6, 2002 (first release under JCP)
  • XML Processing
  • Java Print Service
  • Logging API
  • Java Web Start
  • JDBC 3.0 API
  • Assertions
  • Preferences API
  • Chained Exception
  • IPv6 Support
  • Regular Expressions
  • Image I/O API
New features in J2SE 1.3
Code named Kestrel and released on May 8, 2000.
  • Java Sound
  • Jar Indexing
  • A huge list of enhancements in almost all the java area.

New features in J2SE 1.2

Code named Playground and released on December 8, 1998.
  • Collections framework.
  • Java String memory map for constants.
  • Just In Time (JIT) compiler.
  • Jar Signer for signing Java ARchive (JAR) files.
  • Policy Tool for granting access to system resources.
  • Java Foundation Classes (JFC) which consists of Swing 1.0, Drag and Drop, and Java 2D class libraries.
  • Java Plug-in
  • Scrollable result sets, BLOB, CLOB, batch update, user-defined types in JDBC.
  • Audio support in Applets.

New features in JDK 1.1

  • JDBC (Java Database Connectivity)
  • Inner Classes
  • Java Beans
  • RMI (Remote Method Invocation)
  • Reflection (introspection only)

JDK Version 1.0

Codenamed Oak and released on January 23, 1996.
Wishing you a happy new year!

Oracle Service Registry


Oracle Service Registry
Oracle Service Registry provides a 'DNS'-like reference for SOA. A fully compliant UDDI v3 registry, Oracle Service Registry provides a standards-based interface for SOA runtime infrastructure to dynamically discover and bind to deployed service end points. As part of the Oracle SOA Governance solution, Oracle Service Registry bridges the gap between the design time and runtime environments through automated synchronization with Oracle Enterprise Repository and Oracle SOA Suite
·         Comprehensive UDDI v3 compliance—Provides a standards-based mechanism for dynamic discovery of services and their associated policies during runtime
·         SOA agility—Keeps SOA infrastructure up-to-date with changes to service end points, ensuring your SOA doesn't break
·         End-to-end SOA Lifecycle Management—Serves as the UDDI interface to Oracle Enterprise Repository for support of end-to-end management of the SOA lifecycle
·         Hot-pluggable—Supports heterogeneous services from any vendor

You can use Oracle SOA Suite with the following versions of OSR:
·         OSR 10.3 (with Oracle WebLogic Server 10.3)
·         OSR 11g
This section describes how to integrate Oracle Service Registry with Oracle SOA Suite 11g. It contains the following topics:
1.      Integrating with Oracle JDeveloper  
To create a connection between the Oracle Service Registry and JDeveloper:
·         Go to Oracle JDeveloper.
·         Select File > New > Connections > UDDI Registry Connection to create a UDDI connection.
·         Enter a connection name.
·         Enter an inquiry endpoint URL. For example: http://myhost.us.oracle.com:7001/registry/uddi/inquiry
·         Ensure that the Business View option is selected.
·         Click Next.
·         Click Test Connection.
·         If successful, click Finish. Otherwise, click the Back button and correct your errors.
2.      Configuring Oracle Service Registry at Runtime  
Oracle SOA Suite uses the SCA standard as a way to assemble service components into a SOA composite application. SCA provides a programming model for the following:
·         Creating service components written with a wide range of technologies, including programming languages such as Java, BPEL, C++, and declarative languages such as XSLT. The use of specific programming languages and technologies (including web services) is not required with SCA.
·         Assembling the service components into a SOA composite application. In the SCA environment, service components are the building blocks of applications.
SCA provides a model for assembling distributed groups of service components into an application, enabling you to describe the details of a service and how services and service components interact. Composites are used to group service components and wires are used to connect service components. SCA helps to remove middleware concerns from the programming code by applying infrastructure declaratively to composites, including security and transactions.
The key benefits of SCA include the following:
·         Loose coupling: Service components integrate with other service components without needing to know how other service components are implemented.
·         Flexibility
·         Service components can easily be replaced by other service components.
·         Services Invocation
·         Services can be invoked either synchronously or asynchronously.
·         Productivity: Service components are easily integrated to form a SOA composite application.
·         Easy Maintenance and Debugging: Service components can be easily maintained and debugged when an issue is encountered.
The Oracle Service Registry (OSR) provides a common standard for publishing and discovering information about web services. This section describes how to configure OSR against a separately installed Oracle SOA Suite environment:
3.      Publishing and Browsing the Oracle Service Registry  
This section provides an overview of how to publish a business service. For specific instructions, see the documentation at the following URL:
To Manually Publish a Business Service
·         Go to the Registry Control: http://hostname:port/registry/uddi/web
·         Click Publish > WSDL.
·         Log in when prompted.
·         Complete the fields on this page to specify the access point URL and publish the WSDL for the business service. The following screen provides details.

If you later change your endpoint location, you must also update the WSDL location in the Registry Control. Otherwise, UDDI invocation fails during runtime. To change the WSDL location:
·         Log in to the Registry Control.
·         Navigate to the service.
·         Change both URLs within the port type and binding information using the model key

4.      Configure a SOA project to Invoke a Service from the Registry  
To configure a SOA project to invoke a service from the registry:
·         Open the SOA project in which to create a reference to the business service.
·         Drag a Web Service icon into the External Services swimlane. The Create Web Service dialog appears.
·         To the right of the WSDL URL field, click the icon to select a WSDL.
·         From the list at the top, select Resource Palette.
·         Expand the navigational tree.
·         Expand UDDI Registry > Business Services.
·         Select the published business service, and click OK. The following screen provides details.


5.      UDDI Deployment Options dialog.
·         Select one of the following deployment options:
o   Dynamically resolve the SOAP endpoint location at runtime.
o   Dynamically resolve the concrete WSDL location at runtime.
·         The following screen provides details.


·         Click OK. You are returned to the Create Web Service dialog.
·         See the following section based on your selection in the UDDI Deployment Options dialog.
6.      Dynamically Resolving the SOAP Endpoint Location
·         Complete the remaining fields in the Create Web Service dialog, and click OK. The Create Web Service dialog looks as shown in the following screen.


·         Verify the wiring of the reference with the appropriate service component.
7.      Dynamically Resolving the WSDL Endpoint Location  
·         Complete the remaining fields in the Create Web Service dialog, and click OK. The Create Web Service dialog looks as shown in the following screen.

·         Verify the wiring of the reference with the appropriate service component.
8.      Configure the Inquiry URL, UDDI Service Key, and Endpoint Address for Runtime 
You can set the inquiry URL, UDDI service key, and endpoint address during runtime in Oracle Enterprise Manager Fusion Middleware Control Console.
To configure the inquiry URL, service key, and endpoint reference for runtime:
·         Log in to Oracle Enterprise Manager Fusion Middleware Control Console and navigate to Common Properties, as shown in the following screen.

·         Specify values for the following properties:
o   In the SOA Infrastructure Common Properties page, specify the same UDDI inquiry URL in the Inquiry URL text box, as shown in the following screen, that you specified in the Create UDDI Registry Connection wizard. For example, http://TST.myhost.com:7101/registry/uddi/inquiry.


o   In the Properties page of the reference binding component, you can change the endpoint reference and service key values created during design time. For information, see section "Configuring Service and Reference Binding Component Properties" of Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite.
·         Restart the SOA Infrastructure.
·         Exit Oracle Enterprise Manager Fusion Middleware Control Console.
·         To see endpoint statistics, return to the Registry Control.
·         Go to the Manage page and check statistics to see the increase in the number of invocations when not cached (the first time).
Reference:



Tuesday, March 5, 2013

NFC in Action


Near field communication (NFC) is a set of standards to communicate NFC devices on radio frequency by bringing them into close proximity (usually less than 5 centimeters). Since communication would be based on radio frequency, therefore scope, use cases and security consideration are different from other radio based interface such as Bluetooth.


Fig: NFC compare to other communication
It make people’s lives easier by accessing new media and contents services more intuitive, make it easier to pay, easier to share information, and easier to use transport and other public services.

NFC’s bidirectional communication ability is ideal for establishing connections with other technologies by the simplicity of touch. For example if the user wants to connect their mobile device to their stereo to play media, they can simply touch the device to the stereo’s NFC touch point and the devices will negotiate the best wireless technology to use.
What does this mean for the end user? Easy connections, quick transactions, and simple data sharing.

The key initial applications for NFC technology fall into three categories:
      Machine-To-Machine: NFC is used to enable communication between two devices
      Payment & Ticketing: NFC will build on the emerging smart ticketing and electronic payment infrastructures
      Service Initiation: NFC is used to perform service discovery or to ‘unlock’ another service (such as opening another communication link for data transfer).
Machine-To-Machine
NFC could be used to setup local communication between two devices for small amount of information (up to few KB).
e.g. printing photo straight from mobile to printer, sharing photo from mobile to smart TV etc.

Fig: Taking picture and sharing to TV


Fig: Sharing data from mobile to mobile

Payment & Ticketing
Payment & Ticketing was one of the drivers for the creation of NFC standard. NFC-enabled payments are much easier and less costly for the credit card merchant than cash and other traditional payment method. Initially, NFC-enabled devices are likely to be used for low-fraud, limited-value payment situations, such as quick-serve restaurants, kiosks, vending machines and parking meters.
e.g.
Touch&Travel is an NFC-based ticketing pilot project jointly conducted by Deutsche Bahn, the German rail authority, and its partners Vodafone, Deutsche Telekom and O2 Germany, with support from industry as well as local transport companies
The illustration below gives an overview of the Touch&Travel system’s operation.

Forecast
1.   1. Currently close to 50 million NFC enabled handsets are sold across to world which is less than 5% of the handset market. However, the NFC enabled devices are  expected to increase at least ten folds over the current level (Refer the forecast below)



2.      2.  The forecasts from different analyst firms vary a lot on the NFC device projections but all agree that it would be significant by 2015. 

References:

Best Practices - SOA Service Registry


1.       Use the Right Type of Module:
·         Think about mediation logic vs. process logic.
·         Use Mediation Modules (Oracle ESB) for integration / mediation logic:
o   – Short-running, minimal choreography.
o   – Supports header manipulation.
·          Use (Integration) Modules (Oracle 11g Suite) for business / process logic:
o   – Can be long-running, powerful choreography and business logic

2.        Design your System Topology
·         Check if need more than one server.
·         Use clustering for scalability, For failover etc
·         Database selection.
·          Need to use a load balancer / HTTP server for failover and scalability.
3.       Spend Time on Interfaces and Business Objects
·         Refactoring support is limited inside mediation flows, so good to get this right first time round.
·         Adopt a naming convention.
·         Add constraints?
·         Add modelled faults?
·         Think about namespaces.
·         Configure default namespace policy before you start.

4.       Consider How you Split up Mediation Modules
·         How many mediation flows inside each mediation flow component?
o   – Large number of modules impacts performance / deployment.
o   – Small number impacts ease of development.
·         Remove unused library content.
·          
5.       Select your Binding Types Carefully
·         Often binding type dictated by circumstance.
·         But if you have the scope to decide:
o   – Prefer SCA default/native for inter  communications
o   – Prefer Web Services for synchronous service exposure
o   – Prefer JMS for asynchronous service exposure
o    
·          Sometimes you have alternatives. For example:
o   – Web Services binding : allows easy access to SOAP headers
Or
·         – HTTP with SOAP data binding : allows access to HTTP headers but not SOAP headers
6.       Consider your Custom Coding Strategy
·         Custom mediation:
o   – Most useful for one-off coding.
o   – Cannot be re-used between modules.
o   – ‘Visual’ mode available which may be useful to those less comfortable with Java/SDO API.
7.       Custom primitive (also called roll-your-own primitive):
o   – A first-class new primitive:  same abilities as any other primitive type (XSLT, Endpoint Lookup…).
o   – Can have customisable properties.
o   – Appears in palette in WID.
o   – More re-usable, but more work to create.
8.       Consider your Logging Strategy
·         You will want one; consider it before you start developing.
·         Options include:
o   – Message Logger – limited functionality – logs only to a fixed schema database table.
o   – JDBC or Flat File Adapter (in separate mediation module?)
o   – Custom mediations logging.
o   – Custom primitives.
9.       Use Source Control & Do Automated Builds
·         Use source control  and integrate with IDs
·          Only one developer per mediation module at once.
·         Automated build direct from source control.
10.   Do Unit Testing
Do the unit testing before check –in