Unit 1 WS
Unit 1 WS
The Internet has revolutionized our business by providing an information highway, which
acts as a new form of communication backbone. To achieve this goal of obtaining an Internet
business presence, organizations are exposing and distributing their business applications
over the Internet by going through a series of technological innovations. The key
phenomenon of enabling business applications over the Internet is based on a fundamental
technology called distributed computing. Distributed computing has been popular within
local area networks for many years, and it took a major step forward by adopting the Internet
as its base platform and by supporting its open standard-based technologies.
History:
Figure 1.1 shows a distributed computing model that provides an infrastructure enabling
invocations of object functions located anywhere on the network. The objects are transparent
to the application and provide processing power as if they were local to the application
calling them.
Today, Sun Java RMI (Remote Method Invocation), OMG CORBA (Common Object
Request Broker Architecture), Microsoft DCOM (Distributed Component Object Model), and
Message-Oriented Middleware (MOM) have emerged as the most common distributed
computing technologies. These technologies, although different in their basic architectural
design and implementation, address specific problems in their target environments
Higher performance:Applications can execute in parallel and distribute the load across
multiple servers
Collaboration: Multiple applications can be connected through standard distributed
computing mechanisms.
Higher reliability and availability: Applications or servers can be clustered in multiple
machines.
Scalability:This can be achieved by deploying these reusable distributed components on
powerful servers.
Extensibility:This can be achieved through dynamic (re)configuration of applications that
are distributed across the network.
3
Higher productivity and lower development cycle time: By breaking up large problems
into smaller ones, these individual components can be developed by smaller development
teams in isolation.
Reuse.:The distributed components may perform various services that can potentially be used
by multiple client applications. It saves repetitive development effort and improves
interoperability between components.
Reduced cost: Because this model provides a lot of reuse of once developed components that
are accessible over the network, significant cost reductions can be achieved.
• Client/server
• CORBA
• Java RMI
• Microsoft DCOM
• Message-Oriented Middleware
2Q. Explain a Client/ Server application model with an example. What are its limitations?
The early years of distributed application architecture were dominated by two-tier business
applications. In a two-tier architecture model, the first (upper) tier handles the presentation
and business logic of the user application (client), and the second/lower tier handles the
application organization and its data storage (server). This approach is commonly called
client-server applications architecture.
Server: the server in a client/server application model is a database server that is mainly
responsible for the organization and retrieval of data.
Client: The application client in this model handles most of the business processing and
provides the graphical user interface of the application.
It is a very popular design in business applications where the user interface and
business logic are tightly coupled with a database server for handling data retrieval and
processing. For example, the client-server model has been widely used in enterprise resource
planning (ERP), billing, and Inventory application systems where a number of client business
applications residing in multiple desktop systems interact with a central database server.
Figure 1.2 shows an architectural model of a typical client server system in which multiple
desktop-based business client applications access a central database server
4
CORBA:
The Common Object Request Broker Architecture (CORBA) is an industry wide, open
standard initiative, developed by the Object Management Group (OMG) for enabling
distributed computing that supports a wide range of application environments. OMG is a
nonprofit consortium responsible for the production and maintenance of framework
specifications for distributed and interoperable object-oriented systems.
CORBA differs from the traditional client/server model because it provides an object-
oriented solution that does not enforce any proprietary protocols or any particular
programming language, operating system, or hardware platform. By adopting CORBA, the
applications can reside and run on any hardware platform located anywhere on the network,
and can be written in any language that has mappings to a neutral interface definition called
the Interface Definition Language (IDL).
CORBA also defines a collection of system-level services for handling low-level application
services like life-cycle, persistence, transaction, naming, security, and so forth.
In a CORBA-based solution, the Object Request Broker (ORB) is an object bus that provides
a transparent mechanism for sending requests and receiving responses to and from objects,
regardless of the environment and its location. The ORB intercepts the client’s call and is
responsible for finding its server object that implements the request, passes its parameters,
invokes its method, and returns its results to the client. The ORB, as part of its
implementation, provides interfaces to the CORBA services, which allows it to build custom-
distributed application environments.
Figure 1.3 illustrates the architectural model of CORBA with an example representation of
applications written in C, C++, and Java providing IDL bindings.
5
IDL. CORBA uses IDL contracts to specify the application boundaries and to establish
interfaces with its clients. The IDL provides a mechanism by which the distributed
application component’s interfaces, inherited classes, events, attributes, and exceptions can
be specified in a standard definition language supported by the CORBA ORB.
ORB. It acts as the object bus or the bridge, providing the communication infrastructure to
send and receive request/responses from the client and server. It establishes the foundation
for the distributed application objects, achieving interoperability in a heterogeneous
environment.
4Q. What are the advantages of CORBA over a traditional slient/ server application model?
Legacy and custom application integration. Using CORBA IDL, developers can
encapsulate existing and custom applications as callable client applications and use them as
objects on the ORB.
Rich distributed object infrastructure. CORBA offers developers a rich set of distributed
object services, such as the Lifecycle, Events, Naming, Transactions, and Security services.
Network transparency. By using the IIOP protocol, an ORB can interconnect with any ORB
located elsewhere on the network.
Dynamic invocation interface. CORBA clients can both use static and dynamic methods
invocations. They either statically define their method invocations through stubs at compile
time, or have the opportunity to discover objects’ methods at runtime. With those advantages,
some key factors, which affected the success of CORBA evident while implementing
CORBA-based distributed applications, are as follows:
Availability of CORBA services. The Object services specified by the OMG are still lacking
as implementation products.
Scalability. Due to the tightly coupled nature of the connection oriented CORBA
architecture, very high scalability expected in enterprise applications may not be achieved.
JAVA RMI
Java RMI was developed by Sun Microsystems as the standard mechanism to enable
distributed Java objects-based application development using the Java environment. RMI
provides a distributed Java application environment by calling remote Java objects and
passing them as arguments or return values. It uses Java object serialization—a lightweight
object persistence technique that allows the conversion of objects into streams.
Before RMI, the only way to do inter-process communications in the Java platform
was to use the standard Java network libraries. Though the java.net APIs provided
sophisticated support for network functionalities, they were not intended to support or solve
the distributed computing challenges.
Java RMI uses Java Remote Method Protocol (JRMP) as the interprocess communication
protocol, enabling Java objects living in different Java Virtual Machines (VMs) to
transparently invoke one another’s methods. Because these VMs can be running on different
computers anywhere on the network, RMI enables object-oriented distributed computing.
RMI also uses a reference-counting garbage collection mechanism that keeps track of
external live object references to remote objects (live connections) using the virtual machine.
When an object is found unreferenced, it is considered to be a weak reference and it will be
garbage collected.
The RMI infrastructure based on the JRMP acts as the medium between the RMI clients and
remote objects. It intercepts client requests, passes invocation arguments, delegates
invocation requests to the RMI skeleton, and finally passes the return values of the method
execution to the client stub. It also enables callbacks from server objects to client applications
so that the asynchronous notifications can be achieved.
Figure 1.4 depicts the architectural model of a Java RMI-based application solution.
7
RMI client. The RMI client, which can be a Java applet or a standalone application, performs
the remote method invocations on a server object. It can pass arguments that are primitive
data types or serializable objects.
RMI stub. The RMI stub is the client proxy generated by the rmi compiler (rmic provided
along with Java developer kit—JDK) that encapsulates the network information of the server
and performs the delegation of the method invocation to the server. The stub also marshals
the method arguments and unmarshals the return values from the method execution.
RMI infrastructure. The RMI infrastructure consists of two layers: the remote reference
layer and the transport layer. The remote reference layer separates out the specific remote
reference behavior from the client stub. It handles certain reference semantics like connection
retries, which are unicast/multicast of the invocation requests. The transport layer actually
provides the networking infrastructure, which facilitates the actual data transfer during
method invocations, the passing of formal arguments, and the return of back execution
results.
RMI skeleton. The RMI skeleton, which also is generated using the RMI compiler (rmic)
receives the invocation requests from the stub and processes the arguments (unmarshalling)
and delegates them to the RMI server. Upon successful method execution, it marshals the
return values and then passes them back to the RMI stub via the RMI infrastructure.
RMI server. The server is the Java remote object that implements the exposed interfaces and
executes the client requests. It receives incoming remote method invocations from the
respective skeleton, which passes the parameters after unmarshalling. Upon successful
method execution, return values are sent back to the skeleton, which passes them back to the
client via the RMI infrastructure.
Microsoft DCOM
The Microsoft Component Object Model (COM) provides a way for Windows-based
software components to communicate with each other by defining a binary and network
standard in a Windows operating environment. COM evolved from OLE (Object Linking and
Embedding), which employed a Windows registry-based object organization mechanism.
Microsoft developed the Distributed Common Object Model (DCOM) as its answer
to the distributed computing problem in the Microsoft Windows platform. DCOM enables
COM applications to communicate with each other using an RPC mechanism, which
employs a DCOM protocol on the wire.
DCOM applies a skeleton and stub approach whereby a defined interface that exposes the
methods of a COM object can be invoked remotely over a network. The client application
will invoke methods on such a remote COM object in the same fashion that it would with a
local COM object. The stub encapsulates the network location information of the COM
server object and acts as a proxy on the client side. The servers can potentially host multiple
COM objects, and when they register themselves against a registry, they become available for
all the clients, who then discover them using a lookup mechanism.
Some of the widely known MOM-based technologies are SunONE Message Queue,
IBM MQSeries, TIBCO, SonicMQ, and Microsoft Messaging Queue (MSMQ). The Java
Platform provides a Java-based messaging API (JMS-Java Message Service), which is
developed as part of the Sun Java Community Process (JCP) and also is currently part of the
J2EE 1.3 specifications. All the leading MOM vendors like SunONE, TIBCO, IBM, BEA,
Talarian, Sonic, Fiorano, and Spiritwave support the JMS specifications.
JMS provides Point-to-Point and Publish/Subscribe messaging models with the following
features:
■ Complete transactional capabilities
■ Reliable message delivery
■ Security
• Most of the standard MOM implementations have provided native APIs for
communication with their core infrastructure. This has affected the portability of
applications across such implementations and has led to a specific vendor lock-in.
• The MOM messages used for integrating applications are usually based upon a
proprietary message format without any standard compliance.
some of the common challenges noticed in the CORBA-, RMI-, and DCOM-based
distributed computing solutions:
The emergence of the Internet has helped enterprise applications to be easily accessible over
the Web without having specific client-side software installations. In the Internet-based
enterprise application model, the focus was to move the complex business processing toward
centralized servers in the back end.
The first generation of Internet servers was based upon Web servers that hosted static
Web pages and provided content to the clients via HTTP (HyperText Transfer Protocol).
HTTP is a stateless protocol that connects Web browsers to Web servers, enabling the
transportation of HTML content to the user.
With the high popularity and potential of this infrastructure, the push for a more
dynamic technology was inevitable. This was the beginning of server-side scripting using
technologies like CGI, NSAPI, and ISAPI.
With many organizations moving their businesses to the Internet, a whole new
category of business models like business-to-business (B2B) and business-to-consumer
(B2C) came into existence.
This evolution lead to the specification of J2EE architecture, which promoted a much more
efficient platform for hosting Web-based applications. J2EE provides a programming model
based upon Web and business components that are managed by the J2EE application server.
The application server consists of many APIs and low-level services available to the
components. These low-level services provide security, transactions, connections and
instance pooling, and concurrency services, which enable a J2EE developer to focus
primarily on business logic rather than plumbing.
The power of Java and its rich collection of APIs provided the perfect solution for
developing highly transactional, highly available and scalable enterprise applications. Based
on many standardized industry specifications, it provides the interfaces to connect with
various back-end legacy and information systems. J2EE also provides excellent client
connectivity capabilities, ranging from PDA to Web browsers to Rich Clients (Applets,
CORBA applications, and Standard Java Applications).
A typical J2EE architecture is physically divided in to three logical tiers, which enables clear
separation of the various application components with defined roles and responsibilities. The
following is a breakdown of functionalities of those logical tiers:
Presentation tier. The Presentation tier is composed of Web components, which handle
HTTP requests/responses, Session management, Device independent content delivery, and
the invocation of business tier components.
Application tier. The Application tier (also known as the Business tier) deals with the core
business logic processing, which may typically deal with workflow and automation. The
business components retrieve data from the information systems with well-defined APIs
provided by the application server.
Integration tier. The Integration tier deals with connecting and communicating to back-end
Enterprise Information Systems (EIS), database applications and legacy applications, or
mainframe applications.
With its key functionalities and provisions for partitioning applications into logical tiers,
J2EE has been highly adopted as the standard solution for developing and deploying mission
critical Web-based applications. The power of J2EE-based applications would be
tremendous, if it is enabled to interoperate with other potential J2EE-deployed applications.
It also enables the realization of syndication and collaboration of business processes across
the Internet by enabling them to share data and component-level processes in real time. This
phenomenon is commonly referred to as business-to-business (B2B) communication.
The emergence of the Extensible Markup Language (XML) for defining portable data in a
structured and self-describing format is embraced by the industry as a communication
medium for electronic data exchange. Using XML as a data exchange mechanism between
applications promotes interoperability between applications and also enhances the scalability
of the underlying applications. Combining the potential of a J2EE platform and XML offers a
standard framework for B2B and inter-application communication across networks.
With J2EE enabling enterprise applications to the Internet and XML acting as a “glue”
bridges these discrete J2EE-based applications by facilitating them to interoperate with each
other. XML, with its incredible flexibility, also has been widely adopted and accepted as a
standard by major vendors in the IT industry, including Sun, IBM, Microsoft, Oracle, and
HP. The combination of these technologies offers more promising possibilities in the
technology sector for providing a new way of applicationto- application communication on
the Internet. It also promotes a new form of the distributed computing technology solution
referred to as Web services.
12Q. Briefly write about the Emergence of Web services and SOA
Today, the adoption of the Internet and enabling Internet-based applications has created a
world of discrete business applications, which co-exist in the same technology space but
without interacting with each other. The increasing demands of the industry for enabling
B2B, application-toapplication (A2A), and inter-process application communication has led
to a growing requirement for service-oriented architectures.