Java and distributed object computing

fortunabrontideInternet and Web Development

Nov 13, 2013 (4 years ago)

76 views

Java and distributed object computing

Chaopeng Zhou,

Pinglei Zhou, Junming wang


Overview


Since its inception in 1995, the Java language has generated intensive interest in
the computer industry

(Art Taylor 1997).


Distributed computing and Java go togeth
er naturally. As the first language
designed from the bottom up with networking in mind, Java makes it very easy for
computers to cooperate. Even the simplest applet running in a browser is a distributed
application, if you think about it. The client runni
ng the browser downloads and executes
code that is delivered by some other system.




When we think of distributed computing, we usually think of applications more
complex than a client and server communicating with the same protocol. We usually
thi
nk in terms of programs that make remote procedure calls, access remote databases,
and collaborate with others to produce a single result. Java and Distributed Object
Computing project will discuss how to design and write such applications. It pays specia
l
attention to distributed data systems, collaboration, and applications that have high
bandwidth requirements.



We will mainly study
Enterprise
JavaBeans
,

Servelet
, and JDBC.



Topics and Scopes

Enterprise JavaBean


The modern enterprise information
system (EIS) requires the integration of
numerous technologies such as distribution, transactions, data management, security, and
naming. Off
-
the
-
shelf architectures such as Enterprise JavaBeans
TM

(EJB) provide a pre
-
integrated solution that supports the q
uick development and deployment of information
systems.

The Enterprise JavaBeans is a server component model for Java and is a
specification for creating server
-
side, scalable, transactional, multiuser, and secure
enterprise
-
level applications. It provide
s a consistent component architecture framework
for creating distributed n
-
tier middleware. Most important, EJBs can be deployed on top
of existing transaction processing systems including traditional transaction processing
monitors, Web servers, database
servers, application servers, and so forth. The EJB
programming model provides bean developers and EJB server vendors with a set of
contracts that defines a common platform for development.

There are two kinds of Enterprise Javabean: entity EJBeans and se
ssion EJBeans.
The entity beans are used to represent data in the database, while the session beans are
used to manage the interactions of the entity and other session beans, access resources,
and generally perform tasks on behalf of the client.

The primar
y advantages of going in for an EJB solution are: 1. EJB provides
developers architectural independence. 2. WORA(Write Once, Run Anywhere) for
server
-
side components. 3. EJB establishes roles for application development. 4. EJB
takes care of transaction ma
nagement. 5. EJB provides distributed transaction support. 6.
EJB helps create portable and scalable solutions. 7. EJB seamlessly integrates with
CORBA. 8. EJB provides for vendor specific enhancements.

The objective of this project is to discuss EJB(versi
on 2.0) in detail and then try to
build an application with EJB. We will show you how to build server side EJB
components and applications step by step. This project will mainly focus on Entity
EJBeans and Session EJBeans.


Servelet:


A few years a
go, the hype surrounding applets put Java on the map as a
programming language for the Web. Today, Java servlets stand poised to take Java to the
next level as a Web development language. The main reason is that servlets offer a fast,
powerful, portable re
placement for CGI scripts.


The Java Servlet API, introduced as the first standard extension to Java, provides a
generic mechanism to extend the functionality of any kind of server. Servlets are most
commonly used, however, to extend Web servers, p
erforming tasks traditionally handled
by CGI programs. So far, many Web servers can support servlets, including Apache,
Netscape's FastTrack and Enterprise Servers, Microsoft's IIS, O'Reilly's WebSite, and
JavaSoft's Java Web Server.


The beauty of s
ervlets is that they execute within the Web server's process space and
they persist between invocations. This gives servlets tremendous performance benefits
over CGI programs. Yet because they're written in Java, servlets are far less likely to
crash a Web

server than a C
-
based NSAPI or ISAPI extension. Servlets have full access
to the various Java APIs and to third
-
party component classes, making them ideal for use
in communicating with applets, databases, and RMI servers. Plus, servlets are portable
betwe
en operating systems and between servers
--

with servlets you can "write once,
serve everywhere."


In this servelet project, I will show how to use servlets to serve dynamic Web
content, including both HTML pages and multimedia data to interact wit
h our
bioinformactics database, also explores more topics like applet
-
servlet communication,
inter
-
servlet communication, and internationalization
.


JDBC

In a distributed object
-
oriented system, Java database support should be capable
to integrate Java
application with heterogeneous DBMS. We have a number of choices to
program Java database that are JDBC, SQLJ, ODMG Java Binding.


We will mainly discuss the JDBC technology and do a real model of JDBC for
Connecticut Climate Center.


Rather than simply be
ing used to

bring life to Web pages

, Java with database
now can fill the role of database

aware applications for a variety of needs. Where
currently common gateway interface (CGI) applications are required to access databases
from within Web browsers, J
ava applets with JDBC now have the potential to provide the
functionality with more direct programming and the potential for improved
performance
.


Using this API , you can now use Java applications for standard database
programming tasks such as reports o
r updates. With Java

s flexible network API, you can
us Java/JDBC applications for filter programs, to read data from data stream, and to
provide conversion facilities before updating database.


Java application written using JDBC are portable both for the

hardware platform
and the database. You can run a correctly written program on a variety platform against a
variety of database without any code changes. JDBC is based on ODBC. ODBC is based
on the X/Open CLI specification.The goals of X/Open groups have
been met to the extent
that database access standards have been accepted by the industry.Access to all major
database is available through ODBC. JDBC
-
ODBC bridges are available to provide
database access by mapping JDBC calls to their corresponding ODBC ca
lls. So any
database that can be accessed by ODBC driver can be accessed by Java/JDBC driver by
using JDBC
-
ODBC bridges ( Art Taylor 1997).



The Java Database Connectivity (JDBC) standard
was intended to allow Java
developers to quickly start working with

the pervasive relational database technology. It
is also was designed to be a base upon which to build higher level interfaces and tools.


JDBC has two main components: Core API and Extension
.



The new features supporting DOC included in the Core API are
:

1.

SQL data type support

2.

Custom mapping of SQL3 user
-
defined types to Java classes.


The new features included in the Core API are:

1.

Rowset

2.

Establishing Database Connections Using DataSource Objects and the
Java Naming and Directory Interface(JNDI
).

3.

Connection Pooling.

4.

Distributed Transactions.

Plan

Servlet:


Present
-
Oct 30: work with Perl and other tool for CGI


Oct 1
-
Oct 24: Servlet and other package for network


Oct 25
-

Nov 25: build some program to demonstrate the Servl
et, and CGI program,


apply this program to our bioinfomatics database, and show in our webpage.


Oct 26
-
Dec: prepare the final paper

Enterprise JavaBean

Now

-

Sep 30
:

Explore information of Enterprise Javabean
s and Java
.


O
ct 1


Oct 7: Build a general model of the component.


Oct
8


Oct 31:

Detailed design of the component and start coding.





Write mid
-
term paper meantime.


Nov 1


Nov 30:

Continue to build and implement the component
.


Dec 1


Dec 7: Write the final p
aper.

JDBC


Now
-
Sep 27
:

Study details of JDBC and Java.


Sep
28
-
Oct

24
:

Basically build JDBC model of database for Connecticut Climate
Center and write Mid
-
term report.


Oct
25

Dec 7:

Continue to build and complete the JDBC model. Write the final
present
ation.


References

Art Taylor 1997. JDBC Developer

s Resource. Prentice Hall PTR.XV

http://www.oreilly.com/catalog/javadc/

(
http://java.sun.com/j
2ee/j2sdkee/techdocs/guides/j2ee
-
overview/cover.fm.html
)

(
http://www.oreilly.com/catalog/javadc/
)