Monday, November 12, 2012

Achievements



  • Created TPC-C’s database schema in MySQL
  • Connected MySQL database by using ODBC
  • Implemented TPC-C’s database population by using JDBC
  • Implemented TPC-C’s transactions which interact with TPC-C’s database
  • Testing and debugging before deployment
  • Developed EJB by using JBoss to host the server for transactions
  • Connected local client with EJB server
  • Connected remote client with EJB server
  • Monitoring the result provided by EJB server
  • Developed Web Server by using Tomcat to host the server for transactions
  • Connected local client with Web Server
  • Monitoring the result provided
  • Integrate server with GUI
  • Designed the system structure
  • Implement TPC-C Benchmark GUI
  • Integrate server with GUI
  • Implement the EJB and Web Service to host transactions
  • Recorded all results as required and specified by TPC-C as closely as possible
  • Draw performance diagram for monitoring the TPC-C result

Project conclusion

     The computer is becoming more and more important. Therefore to find a best tool or framework for measuring performance is becoming essential work as well. Therefore the performance testing tools are widely use in industry.

     TPC does the good job in this area it helps user to measuring performance result for both hardware and software. But most of current TPC performance tools or frameworks are too expensive and very complicate. They are very hard to use. In order to provide the best result testers need a long time for training to learn how to use the tools. So performance testing become a costly and timing consuming activity in software development.
   
     Our TPC-C benchmark is aim to provide as open source tool for any users. With an easy to use interface provided therefore it can be used for any levels of users even the person who has no programming experience at all can use it as well. So it don’t need to take a long time to learn reduce time cost and because our TPC-C is open source free to use so it can be saved a lot of money by using our framework.

Wednesday, October 31, 2012

TPC-C Testing Result

Test on Single Computer

     Although one of the purposes of this project is to build a remote testing framework, it is very necessary to build a base line of each computer. The results of tests on each computer can be used to analysis the data in later stages. For example, if the response time of remote test is longer than response time on single computer, it is very possible that the internet limit the performance. But it is impossible to get such conclusion without the test each computer independently.
     First of all, the capacity of each compute had to be tested, since it could help to make decisions in the later stages. The usage rate of both CPUs and Memories were recorded with different number of threads ran. The table 4.6 is the record of all tests.

           Figure 4.5 was generated with the data from Table 4.6. It is clear that the increasing rate of usage rates of CPUs slow down with the increasing of number of simulated clients. Both CPUs are capable with the tests, and can afford very large number of clients.These independent tests indicate a start point for following tests. The computers can afford large number of client, it is not necessary to start the test with small numbers. One reasonable number of clients will be 20.



Project Achievements



  • Created TPC-Cˇs database schema in MySQL
  • Connected MySQL database by using ODBC
  • Implemented TPC-Cˇs database population by using JDBC
  • Implemented TPC-Cˇs transactions which interact with TPC-Cˇs database
  • Testing and debugging before deployment
  • Developed EJB by using JBoss to host the server for transactions
  • Connected local client with EJB server
  • Connected remote client with EJB server
  • Monitoring the result provided by EJB server
  • Developed Web Server by using Tomcat to host the server for transactions
  • Connected local client with Web Server
  • Monitoring the result provided
  • Integrate server with GUI

Thursday, October 11, 2012

ReadMe For Web Service

Today I was written the read me file for Web Service set up which contain the following features:


  • Tomcat set up
  • Add the JDK to the tomcat server
  • Import project to eclipse
  • Add project to Tomcat
  • Start Tomcat
  • run project
  • get result

Wednesday, October 3, 2012

Read Me file for EJB

Today I had finish the Read Me file for EJB component and sent both Read me files of EJB and DATA LOADING componets to Dr.Shi Ping Chen and he is very satisfied with these two files. Then I am going to start the report soon.

Tuesday, September 25, 2012

Read Me for database load

Today I finished the read me file for TPC LOADING DATA part which is introduced following features:
        1: Set up MySQL
        2: Use ODBC to connect java code and MySQL
        3: Create database tables
        4: Loading data into the database table.



Thursday, September 6, 2012

For next meeting

   -          An integration test, i.e. from the front GUI to the TPC-C Server;
-          Tell me how to generate the random ‘runtime arguments’ during the tests according to the TPC-C rules (please refer to the TPC-C specification and the C# code that I gave you)

There are two main points we will discuss with Dr.ShiPing Chen at next meeting.


PROJECT MEETING


During last week project meeting I was showing the completed web service TPC to Dr.ShiPing Chen. And he is very satisfied with my work.

Work for coming weeks:

  •           Write the ReadMe file -> about how to set up TPC back-end.
  •           Help front-end
  •           Integration

Monday, August 20, 2012

Developing for web service

After research and studying on the concept of web service Im now starting to develop the web service by using Tomcat and CXF to host the TPC-C transactions in the service.


And there are some useful tutorial on the web link below:

http://www.youtube.com/watch?v=o2Vjs8ylmFM&feature=relmfu
http://www.mkyong.com/webservices/jax-ws/deploy-jax-ws-web-services-on-tomcat/
http://stackoverflow.com/questions/2511547/how-to-manually-deploy-a-web-service-on-tomcat-6

Web Service learning

A Web service is a method of communication between two electronic devices over the Web The W3C defines a "Web service" as "a software system designed to support interoperable machine-to-machine interaction over a network". It has an interface described in a machine-processable format (specifically Web Services Description Language, known by the acronym WSDL). Other systems interact with the Web service in a manner prescribed by its description using SOAP messages, typically conveyed using HTTP with an XML serialization in conjunction with other Web-related standards.

The W3C also states, "We can identify two major classes of Web services, REST-compliant Web services, in which the primary purpose of the service is to manipulate XML representations of Web resources using a uniform set of "stateless" operations; and arbitrary Web services, in which the service may expose an arbitrary set of operations."[2]




Tuesday, August 14, 2012

Work done so far and distribution



This figure is our project system structure diagram shows what we need to do throughout this project. As the figure shows above my part is to develop TPC-C system’s back-end which is at the right hand side of the dotted line. My job is to create database table load data input tables, implement transactions’ method, put transactions’ input EJB to host service and implement client to call method inside EJB. So that can allow front-end system to call transaction’s method concurrently.
So far I have done:
1.       database table load data input tables
2.       implement transactions’ method
3.       put transactions’ input EJB
4.       Implement client calls EJB’s method

Because I am finished the EJB part earlier so I am going to develop the optional part Web-Service.

Group Meeting

Last week we went to CSIRO office to meet with Dr. ShiPing Chen and I show him my back-end system EJB parts. He's very satisfied with what I did so far then ask me to quickly move on to the optional part which is to develop Web-Server.


System Integration


As the back-end system is ready for work. We are now trying to integrate the back-end system with the front-end GUI to test the back-end system by calling it methods from GUI and to simulate real world environment which create many clients to use our system concurrently.
Because this is the first time to integrate the front-end and back-end system there are some errors occurred during integration. We are spending one day on how to figure out the problem and finally the system works fine.

Thursday, August 2, 2012

Group Meeting

Today's group meeting I showed my EJB class to Dr. ShiPing Chen and he gave me some valuable advises. The most of the features are working find but still need some improvement when calling serve functions from client side.


Improvement before next meeting what I need to do is:

           1. Instead of automatic set up data in server side I need to generate input data at client side then stored them into an object pass to EJB server.

           2. Store EJB return data into an object return to the Client side.

           3. Only print return data when it is needed.
         

Monday, July 30, 2012

JBOSS HELLO WORLD TUTORIAL

I found a very useful EJB tutorial online which is using JBOSS here is the link:

Follow this tutorial step by step I created my first hello world EJB project by using JBOSS successfully.

Then after that I was successfully to put the TPC-C transactions' methods into EJB and called the method from remote client through JBOSS server.

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:

Tuesday, March 27, 2012

Set up MYSQL and JDBC

Installing MySQL on my local computer and then using Connector/ODBC to connect java code with MySQL database using JDBC.
Also I installed the MySQL workbench witch is used to manage the database of MySQL.

And then test to created, insert, retrieve data from database.

Here is the tutorial for how to connect MYSQL:
http://www.youtube.com/watch?v=wOCSAXLPLXw

Self Study on EJB

   
Because we may build all the TPC-C business using POJO and then you can use either a session EJB or web service to host the ‘TPC-C POJO’; So today I did some researches on what is EJB then got a basic understanding of how it works; Here is a introduction of what is EJB  and RMI :
 http://www.youtube.com/watch?v=3YwSY8joz20
 http://en.wikipedia.org/wiki/Enterprise_JavaBeans



Introduction of project

                 Introduction For TPC-C Benchmark Project

  • Backgroud 

  After first few weeks reading of TPC-C benchmark's materials I get a initial understanding what is TPC-C about.
  TPC-C(The Transaction Processing Performance Council) is about to approve the third in its series of benchmarks which measure the performance and price/performance of transaction processing systems. Like TPC-A, the TPC's first benchmark, the new TPC Benchmark C, or TPC-C, is an on-line transaction processing (OLTP) benchmark. However, TPC-C is different and more complex than TPC-A because of its multiple transaction types, more complex database, and overall execution structure. 
  The TPC-C benchmark is a popular yardstick for comparing OLTP performance on various hardware and software configurations.



  • Goal

The goal of TPC benchmarks is to define a set of functional requirements that can be run on any transaction processing system, regardless of hardware or operating system.
It’s different to most other benchmarks where test sponsors are limited to comparing machines that run on just one operating system or benchmarks that execute the same set of software instructions.



  • The benchmark model

As an OLTP system benchmark, TPC-C simulates a complete environment where a population of terminal operators executes transactions against a database.The benchmark is centered around the principal activities (transactions) of an order-entry environment.
These transactions include 

  1.      New Oder transaction(~45%) : a new order entered into the database
  2.      Payment transaction (~43%) : a payment recorded as received from a customer
  3.      Order Status transaction(~5%) : an inquiry as to whether an order has been processed.
  4.      Stock Level transaction(~5%): an inquiry as to what stocked items have a low inventory
  5.      Delivery transaction(~5%) : an item is removed from inventory and the status of the order is updated




  • Database sizing
The TPC-C database is scaled according to the number of warehouses that a simulated corporation
maintains, which is represented by the “warehouse” table in the database. The rest of the TPC-C
database (with the exception of the item table) is scaled based upon the number of rows in the
warehouse table. The number of simulated users running transactions against the TPC-C database is
10 times the number of rows in the warehouse table.
The total disk space required for a TPC-C database is usually several hundred or even several
thousand gigabytes, and the TPC-C specification requires that enough space be present on the system
for 60 days of growth at top throughput. A typical TPC-C system will have many times over the
required disk space since more disk spindles result in higher database I/O performance.
 





  • Conclusion

The TPC-C benchmark is an ideal benchmark for measuring system OLTP performance. Simple metrics and an easily understandable workload using only 5 transactions and 9 database tables make it easy to use the TPC-C benchmark to compare systems, platforms, DBMS systems and Operating Systems.Benchmark results are audited by a third party to insure compliance with the TPC-C specification and are further reviewed by the Transaction Processing Performance Council. The TPC-C benchmark has a scalable workload from 1 processor to above 64 processors, making it the industry standard benchmark to measure system OLTP performance.



  • For more information:


      www.tpc.org