New York University

Computer Science Department

Courant Institute of Mathematical Sciences

 

Homework #6 – EJB/CORBA Interoperability in J2EE Component-Based Computing Environments

 

Due Date: 12/23/11 (choose one assignment among hw#6-8)

 

Course Title: Application Servers                                            Course Number: g22.3033-006

Instructor: Jean-Claude Franchitti                                            Session: 8

 

 

1. Ongoing Project Background

 

This homework follows the course on-going project approach described in the homework #1 specification. You should keep enriching your framework-based enterprise application design, and take advantage of the application server platforms used to implement/deploy your application. Your application should be developed in such a way as to be shielded as much as possible from the underlying software infrastructure. For that reason, it is a good idea to build your applications around a portable application framework. As portability issues arise, you will learn how to improve the design of your applications to make them more portable across application server platforms.

 

2. Interoperability in Component-Based Computing Environments

 

It is often the case that distributed computing applications involve components operating on top of heterogeneous computing environments. In this homework, you will consider the cases where CORBA clients need to communicate with J2EE EJB components, and where J2EE EJB components need to access resources from a CORBA object implementation. The context will be that of the framework-based application developed as part of previous assignments on top of the CORBA and J2EE Component-Based Computing Environments. You may wish to extend the application you developed so far to motivate the need for component interoperability on top of the J2EE and CORBA platforms.

 

2.1. Software Infrastructure Provided:

 

Programming environment

 

1.       CORBA MOO Framework

2.       EJB-MOO Framework used for homework #5

3.       Other development tools best suited for J2EE and CORBA development environments (as identified in previous assignments)

4.       All the application software needed for this homework is contained in archives posted on the course Web site under demos. The distribution archives contains programs for the various types of implementations mentioned in this homework.

 

Programs/Design for CORBA MOO Framework:

 

1.       The chat room is implemented with CORBA, the client side is a Java application instead of Java applet.

2.       IDL

ChatServer.idl describes the interfaces to the server.

connect:       called by client when the chat user connects to the server.

disconnect:    called by client when the chat user disconnects to the

   server.

sendMessage:   called by server when new user (dis)connect, or by client

   when some user send a message to others.

            sendLocation:  called by client when some user move his/her position in

   the graph.

 

ChatClient.idl describes the interfaces to the client.

      updateMessage:  called by server when new messages arrives

      updateLocation: called by server when location changed for some user

3.       Communication

Message is transferred via a string or integer, while complicated message is encoded in string using special separator “@” instead of using object.

4.       Client implementation

Each client has a user list to keep track of all the online users. Each user has a record to record his/her info: like name, location, etc.

The graph of chat room is updated at some time interval, timer is used to decide if a message should be showed in graph.

5.       Server implementation

Server has a user list to keep track of all the online users.

6.       The chat room is implemented with RMI-IIOP, and the client side is a Java application.

7.       RMI interfaces:

ChatServerRMI.java describes the interfaces to the server.

connect:       called by client when the chat user connects to the server.

disconnect:    called by client when the chat user disconnects to the

   server.

sendMessage:   called by server when new user (dis)connect, or by client

   when some user send a message to others.

            sendLocation:  called by client when some user move his/her position in

   the graph.

ChatClientRMI.java describes the interfaces to the client.

      updateMessage:  called by server when new messages arrives

      updateLocation: called by server when location changed for some user

8.       Communication

Messages are transferred via strings or integers, while more complicated messages are encoded in strings instead of sending objects.

9.       Client implementation

Each client has a user list to keep track of all the online users. Each user has a record to record his/her info: like name, location, etc.

The display of chat room is updated at some time interval, timer is used to decide if a message should be displayed.

10.   Server implementation

There are five different servers (chat rooms), and each has a user list to keep track of all its online users. Furthermore, the client can enter any one of the five chat rooms, even after it has left another room.

 

Additional Sample Applications

 

1.       No additional sample applications are provided for this homework

 

2.2. Installing and Running the Homework Software Infrastructure:

 

Programs for CORBA MOO Framework:

 

1.       Extract CORBA-MOO.zip using winzip.

2.       After extraction, a directory named CORBA-MOO is created, which includes subdirectory ChatClient and ChatServer.

3.       Open the file “vb.bat” in corba directory, change the classpath for Visibroker and current directory.

4.       Environment

Inprise Visibroker 7.0 installed

5.       Test

> vb.bat

> osagent

> vbj ChatServer.Server

Open another DOS prompt

> vbj ChatClient prof

Open another DOS prompt

> vbj ChatClient student

 

3. Questions

 

1.       Preparation phase:

 

  1. Select a technology infrastructure that is compatible with the application infrastructure components provided for this homework.
  2. Install the application infrastructure software, and experiment with it.
  3. Experiment with the sample application on both the CORBA and EJB platforms.
  4. Refine your framework-based enterprise application and extend it to make use of the  CORBA and J2EE EJB component model. Your application should involve a CORBA client interacting with a J2EE EJB, and should also involve connectivity between a J2EE EJB and a CORBA object implementation. If your application is well designed you should simply have to extend existing services or create separate services that extend the semantics of your application. You may wish to keep using a  combination of infrastructure frameworks for the time being.

 

2.       Prepare a short report documenting your refined framework-based enterprise application (using software engineering standards), and explaining its motivation.

 

3.       Prepare a short report including functional diagrams and screenshots (as needed) to demonstrate your understanding of the infrastructure software. Explain the infrastructure software differences between the application you developed in previous assignments and the one you are developing for this homework.

 

4.       Develop and deploy your framework-based enterprise application as follows on top of the CORBA and EJB MOO infrastructures. You are welcome to either reuse services provided by the sample application or complement them. Document the benefits and deficiencies of the approach on which CORBA and J2EE EJB component-based computing environments are based and explain (as needed) how it limits your ability to develop the various application components you have envisioned for your enterprise application. Note that you do not need to provide a complete implementation of your application in this homework. You should restrict yourself to what you feel is feasible based on time and the level of support provided by the infrastructure software. Your application should be tuned for efficiency as allowed by the underlying infrastructure software, and you should document your performance engineering approach. You should conclude your report by suggesting, and implementing (as time allows) an improved Application Server model.

 

5.       Explain how you would refine the “analyzer” tool you started designing in previous assignments to  capture information about the version of the applications deployed in previous assignments, and re-deploy them as XML-based web applications such as: (a) the   “SpyWeb” applications provided as support material under demo programs on the course Web site, (b) applications based on the Cocoon 2 XSP framework, and (c) applications based on a mixture of J2EE EJB frameworks. Note that the target application should again maintain a strict separation between content, style, and logic. As for previous assignments, your analyzer should strive to extract and represent a generic model of your application using a suitable markup language. You should comment on the merit of your proposed approach as it relates to the one followed by Sygel’s “Wonder Machine” as illustrated in the weekly session slides for session 8.

 

6.       Extra Credit: Implement a prototype of the analyzer tool described in question 5 (ongoing)

 

5. Deliverables

Please provide an electronic copy of your homework submission as one zip archive by sending it to the course TA by the beginning of next class. The archive should include your application software, any modified infrastructure software, a readme file describing the environment setup required to run your application, and your homework report (in word or text format). You should name your archive using the following convention for all homework archives: name_hw?_fa08.zip, where name may include additional underscore characters as needed. You are also required to provide a hard copy of your homework reports at the beginning of each session or according to the homework submission scheduled spelled out in the homework specification.

 

6. Grading

 

All assignments are graded on a maximum scale of 10 points. Your grade will be based equally on:

 

a.       The overall quality of your documentation.

b.       The understanding and appropriate use of application server related technologies.

c.       Your ability to submit working and well-commented code.

d.       Extra credit may be granted for solutions that are particularly creative.

 

7. Additional Information

 

Please let the TA know as soon as possible about teaming arrangements. You will need to stay with the same team for the duration of the course. You should only submit one report/archive per team for each assignment. To balance things out, the final grading in the course will take into account the fact that you are working as a team instead of individually, so you should feel free to work individually as well. Note that the final take home examination will require individual work.