Remote Server Controller                      

A program designed to help a user to controller the server that he has bought using a desktop top application.

 

SUMMARY

 

To develop a desktop based application that helps customers to execute program in remote machine. If the user owns multiple servers then they shall have option to configure them all. Also this application provides an option to downgrade/upgrade the number of users access a given remote machine.

 

TECHNOLOGIES

 

   1. Java Swing for GUI

   2. Remote Method Invocation

   3. Tomcat 6 web server.

   4. Java 1.6

   5. MySQL as the database

   6. Ant for build.

   7. SVN version control for versioning and code delivery.

   8. Struts -1.2

   9. NSIS - creating installable executable file.

   10. Eclipse 3.4 and NetBean

      

 

PROJECTS IMPLEMENTATION DETAILS

 

Following are the major requirements that we had to meet while developing this project:

 

Ø       Technical Requirements

1.      Develop the swing based GUI for client program.

2.      Develop the master program that interacts with the client program and gives command to remote program.

3.      Develop the remote program to execute command from master program.

4.      Create installable client program.

 

Ø       Functional Requirements

This application consists of three pieces of software

 

Client Program:

         This software is downloaded by the end user and installed on their desktop. When they run the program it should start off by prompting for a login name and password. Once they enter that it will send the info to the master program server which will verify the information against a Mysql database.

                     

Master Application:

This is the main program that the client program interacts with it will process logins for the clients and once a client is verified, send commands to the remote programs to perform tasks such as modifying text files and restarting server processes.

 

Remote application:

This program sits on the remote servers and waits for the master application request. Once the request is received, it performs the request and report the completion back to the master which would send the message to the client.

 

Following are the implementation:

Ø       Technical Solutions

1.      Java Remote Method Invocation (RMI)

2.      We used java swing for GUI.

3.      We developed the application using Java (jdk 1.6).

4.      Deployed the J2EE/Struts application in application server tomcat 6

5.      We used MYSQL as the database.

6.      NSIS - creating installable executable file.

 

Swing

    The entire Client program is coded using Java Swing through NetBeans. A tabbed menu was using to create the sub modules of the client program.

 

NSIS

   NSIS (Nullsoft Scriptable Install System) is a tool that allows programmers to create installers for Windows. NSIS creates installers that are capable of installing, uninstalling, setting system settings, extracting files, etc.

    To create a NSIS installer, we have written a NSIS script (script file is .nsi).

 

System Architecture

 

Figure 1, shows the architecture diagram of this application.

 

The GUI of Client Program is coded using Java Swing for the presentation. It connects to the remote Master Program hosted on a remote machine using HTTP protocol. Each user events, generates a Java Object which is send to the Master program using Java Object Streaming.  It also has a generic error display section at the top of each screen.

 

The Master Program is a Web application, which can be deployed on any Java Web Server. It is built using the Struts MVC pattern to accept and process the incoming requests from the Client Program. It delegates the requests to a Manager layer, which has the ability to connect to Mysql Database as well as make a RMI connection to the Remote Program. Upon receiving response from the Manager layer, it returns a Java Response object using Object Streaming to the Client Program.

 

The Remote Program is a Standalone RMI Java application that is installed on all the remote servers. It accepts the incoming requests and processes the requests using Command Design Pattern. It generates a Response Object, which is returned to the Master program. After processing each incoming requests, it re-start an OS based service automatically.

Figure 1

 

Ø       Functionality Implementation

1.     Server Manager

Screen shown in Figure 2 shows the Server Manager Tab.

It allows the users to manage the servers that belong to them by configuring a set of files on each of the remote servers. This tab displays all the host names (IP address) available to the logged in user, in the form of buttons.

                The IP addresses shown on to the button are different remote server’s addresses. The master program will use these addresses to connect to remote system to process the request from the client. The following code is used to perform an action in to the remote machine. Here ‘serverAddress’ is the address of the remote server which is shown in to the buttons. The master program gets the response from the remote machine as a response object. The response will pass to the client program using java object streaming. 

      

registry = LocateRegistry.getRegistry(serverAddress, port);      

CommandReceiverInterface commandInterface= (CommandReceiverInterface)

(registry.lookup("commandService"));

response = commandInterface.execute(req.getAction(), req);

 

 

Figure 2

 

                                On click of any of the button, Client pass the corresponding server IP, working directory path to the master program from where it connects to the remote program for that particular server IP address. The remote program fetches all the available file names under the provided directory path. Returns to the client where it displays it in the form of buttons as shown in figure 3.

 

 

Figure 3

 

                    If user clicks on any of these buttons, the master program fetch all the key value pairs from the specified file and is displayed as shown in Figure 4.I will helps the user to edit the configuration file. After the file is saved, the related service will be restarted.

 

 

Figure 4

 

 

2.     Trouble Ticket

This will simply open an email and allow user to submit a trouble ticket. Figure 5 shows the screen where the user creates the ticket.    

 

   User enters the value for

   From    : logged in user name (auto populate)

   Subject: subject of the content

   Content: content of the mail

   Priority: priority of the ticket

 

 On click on the submit button a mail is sent to the address "support@progamerhosting.com"

 If the mail is successfully sent a message is displayed on top "Mail sent successfully"

 If any error occurs then an error message is displayed at the top.

  

 

                                                          

Figure 5

 

4. Billing Account Management

 This allows user to submit a cancel request which will generate an email and send it to our cancel department and upgrade/degrade user. Figure 6 shows the Billing Account Management option.

 

 

 

 

 

 

 

Figure 6

4.1. Upgrade/Degrade User.                                             

Figure 7 shows the Upgrade/Degrade User option. Using the login Id of the user the master program fetches and passes the user information to the GUI as shown.

 

Figure 7

 

On click of the submit button the system does the following operations

     1. Pass the data to master program and where it updates the amount of user’s field.

     2. Calculates the price difference based on the following formula:

         Package price / number of days in billing cycle (monthly=30, quarterly=90, etc) *

         Number of days left in current cycle (next due date – today’s date).

     3. Send and display a confirmation message to the client program.

  On click of the Cancel button the user is sent to default Bill Account Management tab.

  

 4.2. Cancel Service.

Figure 8 shows the Cancel Service option.

       Here the user enters the information for why he wants to cancel the service. The user rates a set of service of service related question by selecting rating from the drop down.

On click of the submit button a mail is sent to the "cancel@progamerhosting.com" address.

The content of the mail is the information entered by the user with the user name.

If the mail is successfully sent a message is displayed on top "Mail sent successfully"

If any error occurs then an error message is displayed at the top.

 

 

Figure 8

 

The SMTP host and the address to which the mail is send comes from properties file of the master program. User can edit these values in properties file to their appropriate addresses.