Getting CICS on the Enterprise Bus

With JBI, development of new integration components that can be installed in compliant Enterprise Service Bus (ESB) is possible, to act as bridges between the BUS and the old communication technologies.

Java Business Integration [JBI] can serve to bridge a service bus and legacy communication technologies, according to Gruppo Imola’s Amedeo Cannone and Stefano Rossini. On TSS.com, they write about use of a Jbi4Cics component as an Open Source JBI Binding Component that can be used to connect an ESB with a CICS system. The Jbi4Cics component is developed and tested on the OpenESB platform and it is integrated with Netbeans Enterprise. A use-case sample is included.

http://www.theserverside.com/tt/articles/article.tss?l=IntegratingCICSwithJBI

Mini-Guide: Hibernate and NHibernate

By Brent Sheets
Posted by Jack Vaughan

Hibernate is an ORM [Object-Relational Mapping] service used to develop persistent Java classes. On the back of NHibernate, it’s popularity has spread to the .NET space as well. This has proved of special interest in IT shops that are working toward interoperability strategies that leverage the skills of developers who can handle both .NET and Java problems. No matter whether you’re an old pro or just starting to investigate object relational mapping, the resources I’ve gathered should help you learn something new. You’ll find quick links to official reference material and great tutorials for gaining hands-on knowledge. Dig right in. Read more »

The Search for the Common Code Base

By George Lawton
[Posted by JVaughan]
Mainsoft recently released its updated software tool, Mainsoft for Java EE, version 2.0, for enabling companies to automatically convert .NET applications into Java EE bytecode. Version 2.0 introduces support for Microsoft’s Visual Studio 2005 IDE, the .NET Framework 2.0, ASP.NET 2.0 controls, role-based security, and C# generics. Companies can use the tool to write their applications in C# or .NET code and compile it to any Java EE application server. Mainsoft also has a portal development version,  that specifically supports the IBM WebSphere platform and its associated portal.

Solutions like this can allow teams to support one common code base. In some cases this can lead to savings in developer-related expenses.

Healthcare finance application maker Urix has been using the Mainsoft software to port it’s a application out to the Java platform. Atul Mistry, vice president of Technology at Urix said that some of the company’s largest customers wanted to get access to the Urix application, but had a requirement that the apps run in Unix. He explained that the Mainsoft tools save them from having to support two code bases and having an engineering team that is split between the languages. Read more »

Bridging Java and PHP

Web developer Daniel Krook recently discussed bridging Java with PHP on his blog, krook.net. Krook’s goal is to access Java code from within a PHP application, and vice versa. Read more »

GemStone spans .NET-Java-C++; creates ‘Data Fabric’

GemStone Systems has been in the business of middle-tier caching since at least the early Java days. Like other players [for example, Azul, GigaSpaces, Tangosol] that have found success selling into low-latency financial and related systems markets, GemStone is looking to support mixed C# .NET and Java development.

For some of these firms, the interoperability journey includes C++ as well. In GemStone’s case, heterogeneous language support now means Java, C++ and .NET. Earlier this year, the company added native support for C++ and .NET clients to its GemFire Enterprise 5.0.1 “Enterprise Data Fabric.” The company said this eliminates the need to deploy a Java Virtual Machine (JVM) on an application client or to use wrappers when sharing data between C#, C++ and Java applications. Read more »

Tangosol ups the interop ante

By Jack Vaughan
Interoperability is going along for the ride in some of the more advanced applications these days. That is to say that Java technologists are coming up with new distributed architectures for fast transaction systems, improving reliability, and then throwing in some degree of interoperability between Java and .NET applications.

 

Take as example: Tangosol Inc. Founded by early Java advocates Cameron Purdy and Gene Gleyzer, the company gained ground ‘smoke jumping’ into engagements where J2EE applications were not performing the way they were supposed to. Tangosol was recently purchased by RDB giant Oracle.

 

In the early days, Tangosol’s principles discovered a common pattern of ‘data starvation,’ or data latency in tiered architectures, according to Peter Utzschneider, vice president of marketing, Tangosol. The firm came out with the Coherence Data Grid, which takes the memory space of individual servers, clusters it, and allows you to use that as a shared memory space for objects.

 

The approach effectively allows an in-memory data store to be used by multiple applications. Parallel processing and querying is also a use.

 

An early goal of the product was to improve dependability of Java apps. “We looked at the problem and we put reliability foremost,” said Utzschneider.

 

With Coherence, he said, “you don’t need to know where the stuff is.”

 

“We came to focus on the goal of a reliable distributed in-memory architecture,” he indicated. “We automatically backup so it’s there if it fails.”
 
“As people put more data into it,” said Utzschneider, “people realized it did more than solve latency issues. They decided they could [do] parallel queries and parallel processing on top of our technology.”

 

.NET and J2EE both exist in the types of organizations - often Wall Street powerhouses - that companies like Tangosol pursue.  Some of those customers would like to see their developers able to work with objects in the Coherence Data Grid while still using their native development language. That impetus is behind a recent move Tangosol made to introduce Coherence for the Microsoft .NET Framework.

 

With this software, the company enables .NET developers to use C# to access data and services. [Tangosol also recently announced Coherence Data Grid for Spring, brining its clustering data grid to Spring Framework users.]

In order to provide interop, Tangosol fashioned PIF-POF, which stands for the Portable Object Format/Portable Invocation Format. It serves as the foundation for Coherence integration with non-Java languages and platforms, such as C++ and .NET.

 

Company literature describes PIF-POF thusly: “The Portable Object Format (POF) allows object values to be encoded into a binary stream in such a way that the platform/language origin of the object value becomes irrelevant. The Portable Invocation Format (PIF) allows method invocations to be similarly encoded into a binary stream.”

 

“We are seeing a lot of customers interested in it, “ said Jason Howes, staff engineer, Tangosol. “The have heterogeneous environments and they need something to play nicely.”

 

The early adopters of this type of software are often denizens of the so-called Real-Time Enterprise. Financial services firms are big adopters, as they gain immediate benefit for performing complex transactions more quickly. Even for these deep-pocketed sorts, the advent of things like blade servers and InfiniBand connections has had a hand in making the Real-Time Enterprise a bit more economical.

 

With Oracle’s announcement last month that it entered into a definitive agreement to acquire Tangosol, data grid technology will gain broader attention. For its part, Oracle said it purchased Tangosol to further  efforts in what it described as “extreme transaction processing,” or XTP.

 

Tangosol Coherence technical information

 

A Look at the SpaceFacade Pattern

A unique form of distributed computing may be called ‘space-based.’ Program objects and data can share a space in this scenario, without a lot of stipulations placed upon them. JavaSpaces has emerged as a standard means to do such programming, and GigaSpaces has in turn emerged as a major commercializer of JavaSpaces technology.

Today, Owen Taylor of GigaSpaces writes about spaces. There is an interoperability play here. He notse one can embed a space in the same process as a .NET application and expose it to C++ and Java as a fully-functioning virtual resource. In fact, GigaSpaces has recently gone beyond the Java world to support space-based programming in .NET. [See Java player GigaSpaces sets course for .NET coverage, TSS.NET, February 27, 2007] – J.Vaughan

By Owen Taylor
A space-based architecture is fundamentally different from traditional architectures (meaning stuff we already understand).

This is primarily due to the combined behaviors of state management and event distribution that a Space provides. This creates a natural hub and spoke architecture where the space acts as the communication hub for the rest of the application.

Additionally, when using a space as a reliable in-memory store for your active Objects, there is a shift in dependency away from the database for frequent reads and even updates to the system state within a business transaction. (changes are usually propagated to the DB in an asynchronous fashion to facilitate long-term persistence and extensive queries)

Due to the space taking on the responsibility for state management and event distribution, an entirely new architecture can be achieved.

In essence, what a Space offers is a single logical resource that allows the sharing of Objects between different machines, processes, and threads within a process - aw heck, let’s just say among “services”. Which indeed leads us to adopt a service-oriented, space-based architecture.

Spaces are designed to support a very potent pattern called Master/Worker which is used to address problems where there is a huge amount of work to be done and most of it can be done independent of the rest.

In the Master/Worker pattern, the Master writes Entries into the space and the workers take them out. I liken this to serving a bowl of popcorn. The master fills the bowl and the workers take the popcorn out.

The more workers, the faster the popcorn is processed because there is no dependency between kernels.

Many work-flow applications can be modeled this way as can matching engines and execution engines as long as the Entries written are designed to house (or be deployed in the same process as) a self-contained set of instructions and or data.

What this allows within the familiar tier-based architecture is a kind of magical pressure valve that can take advantage of any number of boxes that might be available on the network and thus process these kernels of work at tremendous speeds. A facade can be created that receives a request for processing, cracks it into parallel tasks and submits them to a space.

While the original caller writes, blocks and waits for a result (thinking it is talking to a single resource) in the back-end many simultaneous operations are occurring that result in faster results and a more adaptive and scalable solution.

This use of this SpaceFacade pattern has resulted in great successes for the customers of GigaSpaces. These successes are measurable in various ways.

Performance:
Major financial firms worldwide are leveraging the space to facilitate dramatically reduced transaction latency and greater overall throughput. By collocating services with the data they require in the same process as a space, latency of operations within real applications are reduced from tens of milliseconds to hundreds of microseconds. This is realized through removing the dependency on separate messaging, data-caching/store, and business processing layers, and the resulting reduction in network hops and distributed transactions.

Reliability:
As described here.Virgin Mobile experiences not only greater throughput as a result of this architecture, but also increased reliability as the in-memory ‘virtual’ resources act as a buffer to the traditional backend systems. Last fall (2006), while their DB was down for 10+ hours, the Space and its associated services continued to accept and process orders so not a single one was lost.

Interoperability:
Being able to embed a space in the same process as a .NET application and expose it to C++ and Java as a fully-functioning virtual resource offers up an extremely simple solution to the problem of sharing information among disparate services and applications. I can think of three major financial services companies that today, leverage our support for inter-language communication where the SpaceFacade also hides the language used when implementing cooperative services.

Layers of indirection are remarkably useful!

———————

Owen Taylor is Senior Director for Worldwide Technical Communications, GigaSpaces Technologies.

————————-

Author’s Note: If you would like to try out the Space as implemented by GigaSpaces, I have posted a simple .NET/C# example on my blog here.

Further information on our .NET support can be found on the GigaSpaces .NET wiki.

For an introduction to the core space API and further discussion of the space value proposition you can look at my post on four verbs.

The tried and true wrapper: CORBA

By Daniel Rubio
[Posted by Jack Vaughan]

If interoperability was a necessity to enterprise software in the pre-web services era, CORBA (Common Object Request Broker Architecture) was in all likelihood at the top of the list for many. Similar to messaging, which we discussed in the last entry, CORBA has had wide acceptance due to the different language/platform support it has garnered throughout the years, including : Java/Java EE, C++, C, COBOL, Python, among others.

And even though the Microsoft product line has lagged in CORBA support, partly due to a competing and in-house technology named DCOM which came out around the same time as CORBA, a series of alternatives have come to fruition in the .NET camp, making CORBA a viable alternative for Java/.NET interoperability projects.

CORBA’s core concepts can be summarized in : ORB’s, IDL and IIOP. An ORB(Object Request Broker) serves as a dispatcher for CORBA-type requests, just like a web server does for web pages. IDL (Interface Description Language) on the other hand is a language-neutral syntax used for describing CORBA services, just like WSDL is a platform neutral syntax for describing web services. (For those wanting a little more background on the similarities between IDL/WSDL, an excellent post by Steve Vinoski can be found at: Weighing in on IDL vs. WSDL). Finally, IIOP (Internet Inter-ORB Protocol) is the wire protocol used by CORBA, that while a little bit arcane to mention as core, is an important aspect when attempting to use CORBA from .NET.

Before we continue our discussion, you should be aware that CORBA is a very powerful and hence complex technology, so it can take some time to become acquainted with its inner workings, nevertheless I will do my best to get you up and running with a very basic CORBA Java/.NET app.

Since Java’s JDK already comes bundled with an ORB and IDL compiler, we will use both tools to create a server side CORBA application, in the case of .NET, we will make use of an open source library named IIOP.NET to make requests from a .NET application to a Java-CORBA application.

Lets start by defining a CORBA application contract in IDL, the following listing illustrates such a contract:

Listing 1.1 CORBA-IDL Contract

module interopApp
{
  interface Demo
  {
    string interopMethod();
  };
};
Don’t dwell to much on the details, just realize the contract indicates the application will have a method by the name interopMethod that will return a string value. With this contract in-hand, you then need to feed it through an IDL compiler to generate language specific supporting CORBA classes. In Java’s case, execute the following from the command line : idlj -fall interopApp.idl, where idlj is the compiler located under the JDK’s bin directory and interopApp.idl is the file containing the contract.

Upon execution, an additional folder with 6 supporting Java/CORBA classes will be created, compile them as you would any other Java classes. These last classes are in effect CORBA’s wrapper for your Java application code, which would look something like the following class:

Listing 1.2 Java-CORBA implementation class

import interopApp.*;

public class DemoImpl extends DemoPOA
{   public DemoImpl() {
    System.out.println( “Called DemoImpl constructor”);
  }

  public String interopMethod() {
      // Hardcode String, other logic or DB access could be used here
      String response = “At ” + new java.util.Date() + ” : Interop String obtained from Java-CORBA server”;
      return response;
  }
}
The import statement in this case is used to tap the generated CORBA classes, while the class in itself inherits its behavior from one of the supporting classes named DemoPOA. The important thing to take note of here is the exposed CORBA method interopMethod is overridden to contain any type of Java logic required by the application.

Next, you need to create a server class to associate this particular application code with a CORBA-ORB, the following listing shows such a server:

Listing 1.3 Java-CORBA Server class

import org.omg.CORBA.ORB;
import org.omg.CosNaming.*;
import org.omg.PortableServer.*;

import interopApp.*;

public class Server
{
  public static void main(String args[]) {
    try {
      String obj_name = “javanetapp”;

      //Create and initialize the ORB
      ORB orb = ORB.init(args, null);
      //Reference to rootpoa & activate the POAManager
      POA rootpoa
      = POAHelper.narrow(orb.resolve_initial_references(”RootPOA”));
      rootpoa.the_POAManager().activate();

      //Create servant and register it with the ORB
      DemoImpl demo_serv = new DemoImpl();

      //Object reference from the servant
      org.omg.CORBA.Object ref = rootpoa.servant_to_reference( demo_serv );
      Demo demoServ = DemoHelper.narrow( ref );

      //Root naming context
      org.omg.CORBA.Object naming
      = orb.resolve_initial_references(”NameService”);
      NamingContextExt nctx = NamingContextExtHelper.narrow(naming);

      //Bind Object reference in naming
      NameComponent path[] = nctx.to_name( obj_name );
      nctx.rebind(path, demoServ)

      //Run a separate thread
      orb.run();
    }
    catch (Exception x) { }
   }
}
The most relevant aspects of this last server class are that it uses the DemoImpl class, and its association to the name javanetapp — using the obj_name string — as a network identifier. Finally, you need to activate the Java ORB so the application can be accessed across the network. From the command line type tnameserv -ORBInitialPort 2007 — this will activate CORBA’s naming service on port 2007 — and then type java Server -ORBInitialPort 2007 — where Server is the previous class — to expose the CORBA access point.

At this juncture, you have a full-fledged CORBA enabled application accessible through the name javanetapp, so lets take a final crack at tapping this application from a .NET environment. Accessing CORBA services is a little simpler than exposing them, while you will need to pass the IDL through the compiler provided in IIOP.NET to generate supporting classes, you won’t need to wire-up up an ORB. The following listing illustrates what a CORBA .NET client using IIOP.NET would look like:

Listing 1.4 .NET-CORBA Client class using IIOP.NET

using System;
using System.Runtime.Remoting.Channels;
using Ch.Elca.Iiop;
using Ch.Elca.Iiop.Services;
using omg.org.CosNaming;
// Route to IDL supporting files
using interop.Demo;
namespace Interop.Demo {

   public class Client {

         public static void Main(string[] args) {
            try {
                string nameServiceHost = “localhost”;
                int nameServicePort = 2007;

                //Register channel
                IiopClientChannel channel = new IiopClientChannel();
                ChannelServices.RegisterChannel(channel);

                //Access CORBA/COS naming service
                RmiIiopInit init = new RmiIiopInit(nameServiceHost, nameServicePort);
                NamingContext nameService = init.GetNameService();
                NameComponent[] name = new NameComponent[] { new NameComponent(”javanetapp”, “”) };
                //Get the reference to Demo
                Demo interopClient = (Demo)nameService.resolve(name);
                //Call interopMethod()
                String result = interopClient.interopMethod();
                Console.WriteLine(”Result: ” + result);
            } catch (Exception e) {
                Console.WriteLine(”Exception: ” + e);
            }
        }
    }
}
Relevant sections in this last listing include : the use of Ch.Elca.Iiop classes — which is the actual namespace used by the IIOP.NET library — and the use of localhost,servicePort and javanetapp for locating the CORBA service, as activated on the Java server side ORB.

With this we conclude our short overview of CORBA as a Java/.NET interoperability option. In the final entry of this series on using non-webservices for interoperability, we will take a look at a non-network approach to interoperability: JNI and DLL’s.

Daniel Rubio is a software consultant with over 10 years of experience in enterprise software development, having recently founded Mashup Soft, a startup specializing in the use Web services for Mashups. He is a technology enthusiast in all areas related to software platforms and maintains a blog on these topics at webforefront.com.

Web services and interop

A few times on this blog now we have kind of waltzed around these questions: When are Web services a good fit? Where not?

In a recent article, writer Colleen Frye asked just such questions of Forrester analyst John Rymer. Like others, he admits that,  where performance is a key issue, Web services may not be the best option.

For loosely coupled application or component integration, where the interactions can be accomplished through messages rather than direct API calls, Web services may fit the bill, Rymer said. However, for tightly coupled integration or in-process integration, Rymer suggests other options like bridging middleware such as integration servers or Enterprise System Buses [ESBs]; extended J2EE platforms that implement .NET features; and language integration technologies.

The verbosity or latency of Web services - call it what you will - was there at the outset. One is careful to place too much emphasis on that, since hardware historically has had a way of catching up. But you’d antcipate that Web services would be largely frozen out of intense applications such as electronic trading today. How far does that boundary extend?

In a Forrester report last year, Rymer wrote that Web services technologies will eventually become more broadly useful. Binary Web services formats continue to be discussed as an option for in-process integration, but one wonders if they are much further along this year than last. What do you think?

Web services no interop cure - TheServerSide.NET

Blogging the Interop blogs -Framework versions; APIs evolve; Jagged arrays

. NET Framework version issues
Recently, U.K. developer Chris Alcock wrote about good API Design. A key point: you should never make changes to the API that will break your client’s code. An example cited: throwing exceptions based on values previously considered ok.

Even more recently, Alcock came across the precise problem. It occurred while installing  the .NET 2.0 Runtime on a server that in turn runs a number of .NET 1.1 applications and a number of classic ASP applications consuming COM components written in .NET 1.1.

Investigation revealed that instead of using the .NET 1.1 version of System.Web both CScript and the IIS DLLHost were loading the .NET 2.0 version. Loading the source code for the component into Visual Studio 2005 and attempting to compile and run a simple test application revealed a Null Reference Exception from within the framework.

“A code change to use a call to System.Web.HttpRuntime.Cache to obtain the cache instance fixed our problem, and a quick rebuild of the component against .NET 2 and redeploy to the server and we were back up and running,” wrote Alcock.

Commenting on Alcock’s blog, well-known developer-blogger Scott Hanselman noted a way to force IIS to use a specific version of the framework.

When APIs Evolve or- How I Lost My Lunchtime - cwa.me.uk
Good API design – cwa.me.uk
How to Force IIS to Load a Certain CLR - hanselman.com

History of Office XML formats
Brian Jones has created a timeline depicting the history of Office XML formats, beginning in 1998. He is open to additions. Take a look back in formats.

History of Office XML formats - MSDN Blog

Known-issue in WCF bungles bindings in WSDL
Ted Neward starts a trouble ticket rolling on Apache archives.

Working with WCF - Apache archives

Jagged arrays, and empty too
“Tiberiu” developed a Java web service which contains a simple function - the function returns a double-dimensional array of integers. The next step was to create a simple .NET web client which calls the function. But, when running a WSDL utility (generated by an Eclipse bottom-up web service wizard), “the result is returned as an empty jagged array”. Any vet SOAP serializers out there that can help?

WSDL question - Tech-Archive