Skip to content

Project 3

nranudeep1990 edited this page May 6, 2015 · 31 revisions

Project 3: ScoutOut

Physical Devices and Virtualization

Team Members:

  • Kevin Wilkens

Function

This division is responsible for initial setup of the physical and virtual server containing the back-end for our product. This involves setting up a reliable security firewall that can be easily implemented and will allow users access to app information, and will allow any other division who is responsible for software implemented on the server to have access to their respective software through a secure channel.

After initial setup, the responsibilities of this division shifts to maintaining the security and integrity of the server, while assisting the any other division needing assistance with work they are responsible for on the physical or virtual servers.

Networking and Server-Client Architecture

Team Members:

  • Joshua Cano (Android App Structure and Integration)
  • Rong Liu (SSL Certificates)
  • Pranay Eedara (Android Opencv Integration)
  • Anudeep Tungala (Network Administration and Service Hosting)

Android Client CheckIn Using Digit Recognition

To do Digit Recognition on android using Opencv, the first step is to get the training data for training the classifier and the k-Nearest Neighbor(KNN) classifier is used for this project. Then for testing the classifier, extract digits from raw image and pass it through the classifier to recognise the number.

Obtaining Training Data

  1. Preprocess the Image
    (a) Get Binary Image using Adaptive threshold
    (b) Apply morphology closing followed by opening to remove the noise and thicken the width of numbers

  2. Get binary image of digits
    (c) Find Contours of the Connected objects
    (d) Find the Bounding box of contours
    (d) Filter the Bounding Boxes. So that they point only to digits

  3. Resize the digits to (50,50) and convert it into floating point and reshape it to (1,1) Matrix

Storing Training Data

  1. COnvert the MAT objects type to 8UC1 and store the MAT objects in BMP file
  2. Store those bmp files in the drawable folder of resources
  3. Read the training bmp files using decodefactory

Issues with OpenCV on Android

  1. No FileStorage class to write and read XMl files form Mat Objects
  2. Edit the ASynchronousJavaHelper.class file in Opencv library to run the application on Android 5 versions

Network Administration and Service Hosting.

The basic duties in Network Administration for this project are to provide a common Network API for server – client communication. The basic requirement is to provide secured HTTPS connection over TCP between server and client.

Java XML Web Services (JAX-WS)

JAX-WS web services serve the purpose of secured HTTP communication between server and client. The main advantage of web services is, they can facilitate inter platform communication, i.e. a server (can be of Java, C, Python etc.,) can communicate with a client of any programming platform and vice versa.

Since we have a java server on Linux box, we hosted the required web service using Apache Tomcat 7, a java based web-hosting engine. The published web service will be in a XML format, called as Web Service Description Language (WSDL) can be accessed here. The clients (can be a Java, Android etc.,) get their implementation files by parsing this published WSDL into their own platform.

Apache Tomcat 7

As mentioned above this is a Java based web-hosting engine which is quite different from Apache. To host an HTTPS connection on Tomcat 7 we need too have a SSL security file mainly .kestore file generated by java keystore program. The basic way to generate the .keystore can be found here. Modifying the server.xml file on server as shown in here can now make Tomcat 7 support HTTPS.

Web Service

The server side code responsible for necessary database transactions is integrated with the web service files and a .war file is generated to facilitate hosting on Tomcat 7. The deployed/published web services can now serve the purpose of secured network connection between the server and client. The complete source code for server side code integrated with web services can be found here.

Log4j

Log4j API is used to log the errors that can occur on hosted web service. These logs are logged on to the Scoutout.log file on the server.

Client side network API

As already specified above, any programming platform developer can use our web services to develop their clients. Code for Java HTTPS Web Services client can be found here. Code for Android HTTPS Web Services client can be found here.

Issues

  1. Initially we faced lot of issues regarding HTTPS, but were solved by following the steps discussed above.
  2. To make SqLite db file writable from the Tomcat 7 we need to provide write permissions to the directory in which the file resides to facilitate creation of backup file (in plain words) before writing on to it.
  3. Android HTTPS connection gave lot of authentication issues which we bypassed by modifying the Trust manager to allow all HTTPS connections.

Data Integrity and Information Management

Team Members

  • Ian DeGroot

Overview

The primary goal of the data integrity and information team is to define the format of the data that is sent between the clients and the server. This was accomplished by defining the library used, deciding what messages should be sent, and writing java code to wrap and unwrap the messages.

Library

JSON messages were chosen to contain the information being sent across the network because it is easy to wrap and unwrap, while still containing enough information for all of the messages being passed. The JSON.Simple library is used by this application.

Messages

After defining the library used, the messages that are passed were defined. After many discussions with members from different teams six different client messages, along with their responses by the server, were decided upon. These messages are: Login, Logout, Add Friends, Add Check In, Get Recent Friends, and Get Recent Locations. These messages, along with the responses, can be found in their JSON formatting here.

Java Wrapping/Unwrapping

Using these set messages, java code was written for the wrapping and unwrapping of each of these JSON messages. The code is found [here] (https://github.com/CourseReps/ECEN489-Spring2015/tree/master/Students/iandegroot/Project3JSONInterface). This is used to generate JSON objects on the client side, and to unwrap these same JSON objects on the server so that the data can be accessed. It is also utilized for server-to-client messages.

Database Engine and Storage

Team Members:

  • Evelyn Cifuentes
  • Mandel Oats

Security and Authentication

Team Members:

  • Trevor Dennis
  • Nagaraj Janakiraman

Account Managment and Administration

Team Members:

  • Randy Neal

Overview

The account management and administration division is responsible for maintaining the user accounts. To accomplish this, a program has been developed to facilitate the seamless addition or deletion of users and locations. This is much more user friendly and straight forward than using SQLite commands from the Ubuntu terminal and is also not dependent on the Firefox plugin.

System Admin Program

The program is written in Java and is built upon Jswing and SQLite. The concept was to build a simple program that is easy to use, while implementing the basic functions of MYSQL and the SQLite plugin in Firefox. The PhysicAmigo System Admin Program consists of a main window that has a connect and exit button, a list of tables on the left, and the data of the selected table. Once the program is run, the only functions that are enabled are the connect and exit buttons.

#####Connection

The connection is established via the connect button. The administrator clicks the buttona, which brings up a credentials window and utilizes a set user name and password to login. If the either item is entered incorrectly, the administrator will be notified via a Joption dialog and will be required to re-enter the credentials. Once the connection is established, the logic of program communicates to other classes to close the credentials window. The tables list will be shown once the credentials is closed.

#####Tables List

The tables list shows the two tables in the database that are open to editing. The system administrator is only concerned with adding or removing users or locations. As such, these are the only tables that will appear. If the need arises, more tables can be implemented and shown in the list. The modular design of the application allows the easy modification and addition of more information. Once the table is selected in the list, either with the arrows/enter keys or with the mouse, the table data is then displayed automatically in the center window.

#####Table Data

Table data is not editable directly in the data panel. To modify the table, the administrator must select the appropriate table which will then enable the add/delete user or location buttons. Once the table is modified, the data is refreshed automatically, allowing any additions or deletions are immediately visible.

#####Add/Delete User

The add/delete user buttons only become available once the users table is selected. Once clicked, the add user button brings up a new window that has some text fields for user ID, user name, session ID, and password. The session ID and password are hashed using the standard hashing code implemented in the other parts of the project. If a mistake is made the administrator can delete all the data in the fields using the clear data button. If the info is correct, the administrator simply clicks the enter button and the user is added. To delete a user, the delete user button is clicked and the same functionality is implemented, however the system administrator just needs to note the number in the table that corresponds to that user and enters it into the field. Once enter button is clicked, the user is deleted both from the users table and from any corresponding entries in the friends table.

#####Add/Delete Location

Similar to users buttons, he add/delete location buttons only become available once the locations table is selected. The only data needed to add locations is the name of the location, the latitude, and longitude. Again, once the enter button is clicked, the table is updated. To delete a location, the same process is used; enter the int of the row and click the enter button to delete the location.

Special Projects

Team Members:

  • George Sullivan
  • Jeffery Jensen
  • Hong Pan

Business and Finance

Team Members:

  • Blade Roybal
  • Yajie Zeng

Public Relations and Web Presence

Team Members:

  • Benito Ramirez Jr.

Clone this wiki locally