Monday, July 30, 2012

Research for JBOSS

There are some strange errors continuing occurred when I was trying to run glassfish in my local computer. At the end I decided to use JOBSS server to replace glassfish.

I was doing the research for JBOSS during the winter vacation then I found the JBOSS is more flexible than glassfish. JBoss offers many services and features, including:
  • Servlet/JSP container
  • JNDI
  • EJB
  • JTA
  • clustering
  • caching
  • JMS
  • Datasource / Resource management
  • JMX integration
  • OSGi support
  • web services
  • portals
  • Web Beans (Seam)
  • Some administrative consoles
  • an IoC container
  • etc  

Monday, May 21, 2012

Problem with Glassfish

When I installed Eclipse for EE developers and Glassfish v3. The IDE detected the server and registered it, but when it comes to run the applications I get the following error message:

GlassFish v3 requires a JDK 1.6 and not a JRE. Please add/select the correct JDK in the Server properties 'Runtime Environment' section.


Then I do research for this problem I find because I am using a new computer so I forgot to install JDK on my computer then I fix the problem by:



  1.  grab just the jdk fromhttp://java.sun.com/javase/downloads/index.jsp
  2.  This is where the error message kinda foobars ya... 
    - Get eclipse started, ignore the message. 
    - Go to Window>Preferences 
    - Then under +Java+Installed JREs hit Add.
    - Select 'Standard VM' then Next
    - JRE Home = C:\Program Files\Java\jdk1.6.XXXX the rest should fill in automagically. Hit Finish.
    - MOST IMPORTANT!!! Click the check box back in the Preferences Window for the new jdk runtime...I don't know why it's necessary, but it definitely is..

Continuing work

After last meeting I am focusing on how to implement glassfish with Eclipse:

There are some helpful links:

http://glassfishplugins.java.net/eclipse36/
http://www.youtube.com/watch?v=9Kf5m7bMu74


Friday, May 4, 2012

Project Meeting for first demo

Today we had a first Demo after Dr.ShiPing Chen came back from oversea.


For back-end system I showed Dr.ShiPing Chen how can I use the JDBC to create TPC-C tables and how to automatically generate input data with given warehouse number. This is working very good for MySQL database. 


However create table format for each database platform are different so this code can only work for MySQL database platform. After everything working fine with MySQL we may improve the code later on so it can work in other database platform as well (for example sql server, Oracle...)


Also I showed him 5 main transactions as well, each one is done by following the transaction's specification and I did unit testing for every single function which I had created in order to make sure functions are working as it is intended. However I did not do the unit test for the hold transaction so I will to test it and show him next time. 


For next following weeks I need to put 5 transactions into glassfish container so it can allow simulate users to access my function concurrently.


Before I didn't learn anything relate to glassfish and the EJB things so I think this will be a big challenge for me and need taking time to learn it.

Saturday, April 14, 2012

Some Normally Question and Answers for TPC-C


Q1 Why choosing java to implement TPC-C Benchmark system?
A1 Java has ability to run the same program on many different systems, by using java TPC-C can easily testing performance for any software systems. Also java allows us to use EJB to provide a standard way to implement the back-end business code typically found in enterprise applications (as opposed to ‘front-end’ interface code). EJB are intended to handle such common concerns as persistence, transactional integrity and security in a standard way, leaving programmers free to concentrate on the particular problem at hand. Java is simply to use: It automatic memory allocation and garbage collection. Easier to compile and debug.

Q2  What components are including in the front- end system to handle users’ inputs and why these components are needed?
A2 There are two major components invade in the front-end system. One is GUI (Graphical user interface) written by java swing. Other one is command line input by java scanner. We design to use these two components because some users may more familiar with using good looking interface and some users may think command line input is easier than using GUI.

Q3 How can we simulate the transactions to measure the system performance?
A3 The TPC-C workload simulates a tiered environment wherein users interact with TPC-C application to enter business transactions (New-Order transaction, Payment transaction, Order Status transaction, Stock Level transaction, Delivery transaction). Transactions are entered by simulated users, business logic and queuing of the transactions are handled by a middle tier server, and then the transactions are passed to the TPC-C database server for processing. By calculate the tpmC value (Transactions-per-Minutes-C) this is the average number of new-order transactions that the system processes per minute and comparing tpmC we can compare the system’s performance.

Q4 How can we calculate the TPC-C throughput (tpmC) and what is throughput used for?
A4  TPC-C throughput = Total New-Order Transaction/Total time taken (in minute) this throughput is also call tpmC means how many new-order transaction that system can handle per minute. Normally we compare system’s performance by comparing their tpmC rates and price/performance scores. However for our project we don’t need to consider about the price/performance scores so we can compare system’s performance easily by just comparing their tpmC.

Q5 How can we associate with Database?
A5 Firstly we got two ideas about how to connect database and retrieve data. One is using JDBC and another is using Himinte. After discuss with Dr. ShiPing Chen on weekly meeting we found JDBC is more familiar for us and we used it a lot before.  And it has been designed to allow java developers to maintain the industry- standard independent connectivity between java applications and database server. 
 

Second System Structure

During the weekly meeting with Dr.ShiPing Chen. We showed him our initial design for the TPC-C System Structure. Most of our initial design are good but some part of the structure are not meet the project requirements. And he gives us some very valuable opinions such as automatically log result inside TPC-C back-end server is not necessary in stead of to log result if we get more time left at the end we can do the optional part to develop web Service to hold the TPC-C server.And it should be done the same job as EJB to send users' transaction requires to the TPC-C server associate with database.
The illustrate shows below is our Second System Structure after meeting:

The First System structure

After our few weeks research  we found the TPC-C's system structure is comprised of two major part. One is Front-End GUI/COMMAND LINE input interface and other one is TPC-C back-end server.
Here is our initial design for the System structure diagram: