Essays.club - Dissertations, travaux de recherche, examens, fiches de lecture, BAC, notes de recherche et mémoires
Recherche

Micro Project Report Middleware for distributed applications

Par   •  20 Août 2018  •  1 709 Mots (7 Pages)  •  402 Vues

Page 1 sur 7

...

-

Client side :

To access the functionalities, the application offers two interfaces: administrator interface and a user interface.

- Administrator Interface :

We can launch the Administrator Client interface through the class “DirectoryManager/Client/DirectoryManagerClient”. Administrator does not require authentication to access to this menu which will allow him to manage MailBox. The menu offers the following methods:

---------------------------------------------------------------

[pic 35]

Figure 5 : Administration Interface

- End User Interface :

We can launch the End User Client interface through the class “MailBoxManager/Client/MailBoxManagerClient”. Authentication is required to access to different services of the application. If the client is already registered so he will be redirected to the menu according to his right, however (if not registered), his entered values will be stored in a temporary text file (fileusers.txt) before that the administrator approves the inscription request.

[pic 36]

Figure 6 : End User Interface

-

Server side :

As cited in Section 2, we have two classes (DirectoryManagerServer and MailBoxManagerServer) which implement all the methods offered by the application using two interfaces (IUserDirectory and IMailBoxManager).

---------------------------------------------------------------

For data persistence, we have set up five classes which will be our tables in the distant database : User, Message, MailBox, News, NewsBox.

[pic 37]

-

Application server :

---------------------------------------------------------------

Figure 7 : MySQL Database

We used GlassFish v4 as an application server to deploy our project. All setup, configurations and running processes are taken from the Lab (more details here). For remote connection between client side and server side we used ssh command and we connect to another machine for testing purpose.[pic 38]

Figure 8 : Remote connection from two different machines

---------------------------------------------------------------

-

Conclusion

This project allowed us to improve our skills in the technologies used to produce enterprises applications. We have also deepened our knowledge of Java programming language technologies and building through terminal (using for example ANT command). On the other hand, we learned how to use XML data format storage.

Also, we had met some problems while working on this project. The problems were sometimes complex especially during the latest hours of work.

However, further improvements can be made to the project. Indeed, a better resource management, a use of persistent data storage while using REST, invoke RMI methods through REST web services, etc. On the other hand, other features can be added. Surely the only limit of the distributed applications programming is the imagination of the programmer.

---------------------------------------------------------------

[pic 39]

How to run RMI both server and client?

- Start GlassFish Server: asadmin start-domain domain1

- Undeploy (if already deployed), clean, build and deploy : ant all

- Run the DirectoryManager Clien: java directorymanager.client.DirectoryManagerClient

- Run the MailBoxManager Client: java mailboxmanager.client.MailBoxManagerClient

- Stop GlassFish Server: asadmin stop-domain domain1

How to run RMI from two different machines?

- Execution on Remote Server: ssh bxx-xx

- Execute Rest Admin Client Remotely from another machine:

java -Dorg.omg.CORBA.ORBInitialHost=bxx-xx.int-evry.fr –classpath

$CLASSPATH:$HOME/workspace/MicroProject mailboxmanager.client.MailBoxManagerClient

How to run REST both server and client from the terminal?

-

Compile both Server and Client:

javac -cp "jars/*:$GLASSFISH_HOME/lib/*" -sourcepath src -d bin src/directorymanagerrest/client/*.java src/directorymanagerrest/server/*.java

-

Run the Publisher :

java -cp "jars/*:$GLASSFISH_HOME/lib/*:bin" directorymanagerrest.server.Publisher

-

Run the Client :

java -cp "jars/*:bin" directorymanagerrest.client.DirectoryManagerRestClient

---------------------------------------------------------------

How to run REST client from the browser?

Available services

Path

Description

HTTP Data Format

GET

http://localhost:9999/MyServer/dire ctorymanager/init

This method will populates the file with 3 users

TEXT_XML

PUT (tested using a chrome plugin)

http://localhost:9999/MyServer/dire

...

Télécharger :   txt (13.6 Kb)   pdf (62.7 Kb)   docx (20.4 Kb)  
Voir 6 pages de plus »
Uniquement disponible sur Essays.club