This white paper discusses using Chili!Soft ASP with advanced technologies for distributed applications, such as Distributed COM (DCOM), Enterprise JavaBeans, and CORBA. It is intended for developers and IT staff.
In this white paper:
· Introduction
· Chili!Soft ASP and COM/DCOM
· Chili!Soft ASP and Enterprise JavaBeans (EJB)
· Chili!Soft ASP and CORBA
· Conclusion
Technologies for building distributed applications have been on the scene for a while (CORBA is a good example), but widespread use of distributed applications has only recently started to become commonplace. Web applications in particular are driving this new approach. The first Web applications were distributed in a sense, with the Web browser (client), database, and Web server/Web application server forming three tiers. Now, with technologies such as DCOM, Java and Enterprise JavaBeans, and CORBA, web applications are becoming even more distributed, with the Web application server becoming the focal point for presenting the entire application to the user.
Web developers especially like the Active Server Pages architecture that makes it very easy for them to create components that add new functionality or encapsulate business logic. They use simple scripting languages to access the components, while the components themselves can be written in any number of languages. Previously however, the components themselves had to be running on the same machine as Chili!Soft ASP. With the new features of Chili!Soft ASP 3.0, developers can create components using technology such as DCOM, Enterprise JavaBeans, and CORBA, and distribute those anywhere on the corporate network.
COM (the Component Object Model) is the Chili!Soft ASP native object model, on both Windows NT and UNIX. DCOM (for Distributed COM), is Microsoft’s enhancement to COM that enables a COM object running on another machine appear to the calling application as if it were running locally. Chili!Soft ASP 3.0 supports DCOM.
With DCOM, ASP developers access the capabilities of a custom object as always, by using the Server.CreateObject call. On the computer running Chili!Soft ASP, the custom object is registered with COM as a DCOM object, with all of the information regarding the object’s location (the object’s name, the hostname of the remote machine, etc.) On the remote machine, the object is registered with DCOM, with security information regarding who is allowed to access the object. Any calls to this object from an ASP page are sent by COM to the remote object via RPC (Remote Procedure Calls). The remote object completes the request and sends the results back to be used in the ASP page. The diagram below demonstrates how DCOM components are used in an ASP application.
With DCOM capability delivered as part of the Chili!Soft ASP package on UNIX, developers can immediately create distributed ASP applications that use DCOM to access remote objects and systems. (DCOM is already available as part of the operating system on Windows NT.) For example, a Chili!Soft ASP application on UNIX could use DCOM to access a remote COM object running on a Windows NT system. This capability can promote code re-use, allowing ASP applications to re-use COM objects from pre-existing applications that are running on other systems. Chili!Soft also provides tools that enable developers to create COM objects to run on UNIX that can be accessed remotely using DCOM by Chili!Soft ASP.
The Sun Microsystems new Enterprise JavaBeans (EJB) specification has captured a significant amount of attention in the Web application development world. EJB holds the promise of a robust, cross-platform architecture for the creation of component-based, distributed applications. Even though the EJB specification has only recently been finalized, the number of vendors providing application servers based on EJB has grown dramatically.
With the introduction of Chili!Beans in Chili!Soft ASP 3.0, ASP developers can take immediate advantage of using EJB servers to host transactional ASP components. The following diagram illustrates how Chili!Soft ASP would work in conjunction with an EJB application server, such as Persistence Power tier for EJB. (Because the EJB specification is still relatively new, different EJB application servers have somewhat different implementations, but the core methods for implementing distributed component functionality are relatively consistent.)
The EJB component is first developed, then registered with the EJB Server. Then the Java RMI (Remote Method Invocation) Stub compiler is used to create stub and skeleton classes that implement the remote communications between the calling application and the remote object. When used in conjunction with Chili!Soft ASP, the stub class stays on the same machine as Chili!Soft ASP, and is registered as a COM object with the Chili!Beans cbreg tool. Chili!Soft ASP scripts are then able to create and use the stub class as they would a local object. Any requests for methods and properties of the object are passed from Chili!Soft ASP to the stub class, which is responsible for using RMI to communicate with the remote skeleton class. The remote skeleton class contains methods that dispatch calls to the actual implementation of the object running in the EJB application server.
There is significant interest today in EJB application servers because of the capabilities they provide. For example, system-level services such as transactions, security, life-cycle management, threading, persistence, etc. are automatically managed for the EJB component by the EJB server. The combination of ASP’s easy, yet powerful object model and scripting languages with the application server capabilities of EJB, makes a great environment for rapid development of scalable and secure transaction-oriented Web applications.
CORBA (Common Object Request Broker Architecture) was one of the original technologies that created interest in the possibilities of creating distributed applications made up of independent objects. Since CORBA 1.1 came out in 1991, there have been enough implementations of CORBA-based solutions that CORBA is a significant part of the "legacy" system landscape. Furthermore, the release of a new version of CORBA in 1994 and the use of CORBA in many vendors’ implementations of application servers has led to the CORBA resurgence that is currently underway.
The combination of Chili!Soft ASP Chili!Beans technology, and the Java IDL features of the Sun Java2 platform, means that Chili!Soft ASP developers can use CORBA as one of their distributed application technologies. It also means that Chili!Soft ASP applications now have a means to connect to existing corporate CORBA services. The diagram below provides an example of how Chili!Soft ASP might connect to a CORBA object, using Chili!Beans and Java2.
To access a CORBA object via Chili!Beans and Java2, the developer first creates a Java class which will act as a stub. The Java IDL ORB (Object Request Broker) contains an idltojava compiler tool which translates IDL definitions into Java constructs according to the IDL-Java language mapping, and generates the stub class. This stub class is then registered on the Chili!Soft ASP machine by using the Chili!Beans cbreg tool. After an ASP page creates an instance of the stub class (using the usual Server.CreateObject call), properties and methods of the remote CORBA object can then be called. The stub uses the Java IDL ORB to locate the remote object and set up a network connection to it using IIOP (Internet Inter-ORB Protocol). At the other end, the CORBA object uses the ORB and skeleton to which it is bound to receive the method requests from the ASP page. An individual instance of a running CORBA object is called a servant. The CORBA object and skeleton may be implemented in any language that has a CORBA IDL (Interface Definition Language) mapping.
Through the use of Chili!Beans and the Java2 Java IDL, Chili!Soft ASP developers can now use new and existing CORBA objects as key components in Web applications.
One of the most important characteristics of the ASP architecture is its extensibility. In the past, it was easy to combine the rapid development characteristics of the scripting environment with new custom objects that resided locally. Now with support for DCOM and the addition of Chili!Beans, Chili!Soft ASP 3.0 provides ASP developers with a wealth of options for creating scalable, cross-platform ASP applications that leverage all of the latest Internet development technologies, while providing links to critical legacy systems.
ASP is an open, compile-free Web application environment that combines scripting, HTML custom server components, and robust database publishing to create dynamic Web-based business applications. With ASP, developers can build browser-independent Web solutions and publish legacy databases to the Web using tools such as Microsoft Visual InterDev, Macromedia DreamWeaver, Elemental DrumBeat, or Sybase Powersite. ASP is widely known for accommodating developers of varying skill sets and expertise, and for enabling corporate IT managers to more effectively allocate scarce developer resources. There are more than 500,000 ASP developers, over 500 companies producing ASP components and applications, and approximately 25,000 public Web sites using ASP.
Chili!Soft ASP is the functional equivalent of Microsoft’s ASP. Microsoft ASP is available exclusively on Microsoft’s Internet Information Server (IIS) web server on Windows NT. Chili!Soft ASP enables ASP on other leading Web servers and operating systems, making it the first open, cross-platform Web application server based on Active Server Pages (ASP) architecture. Chili!Soft ASP is supported by industry leading Web development tools such as Microsoft Visual InterDev, Elemental Drumbeat, NetObjects ScriptBuilder, and Sybase Powersite, and provides ASP functionality to Netscape, Lotus, IBM and other Web servers.
Chili!Soft, Inc., a wholly owned subsidiary of Sun Microsystems, Inc. (NASDAQ: SUNW), is a provider of enabling technologies and applications for Active Server Pages. Chili!Soft's award-winning flagship product, Chili!Soft ASP, extends the ASP framework to major Web servers and operating systems including Microsoft Windows NT and Windows 2000, Sun Solaris, IBM AIX, Hewlett Packard HP-UX, and Linux. Chili!Soft was incorporated in 1997 with headquarters in Bellevue, Washington. For more information, please visit the Chili!Soft Web site at http://www.chilisoft.com or call (425) 957-1122.
Copyright 2001 Sun Microsystems, Inc. All rights reserved. Legal Notice.