File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Questions regarding to the project development

 
Helen Ma
Ranch Hand
Posts: 451
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, before I work on the assignment, I would like to make sure the following steps for the developments are true and recommended :
1. Develop the DB layer (just like sampleproject.db) to finish the locking mechanism first. Develop the standalone application.

2. Run Roberto's test for Data class. His test is to test the DB layer operations in multiple threads environment. If the test passes, that means it will work for the RMI environment. Roberto's test is to simulate multiple clients requesting for data in RMI.
Is it true?

3. Develop RMI or socket layer. Do I need to write specific tests for the operation in RMI environment even though test pass in step 2?

4. Enhance or develop the GUI layer at the end.

So, basically, if test for the locking mechanism passes in step 2, that means things will work in step 3 and 4.Is it true?


 
Roel De Nijs
Sheriff
Posts: 9091
73
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I followed a complete other approach. The GUI was the final and last part I developed. First I developed Data class, then service implementation (which was exposed by rmi) and finally the GUI.

For both Data class and service implementations I wrote tests (using JUnit) to make sure everything worked as expected. And also wrote some tests (and used Roberto's Data class test) to make sure classes behave flawless in multi-threaded environment. I didn't started with developing service implementation until Data class was completely finished.

So, basically, if test for the locking mechanism passes in step 2, that means things will work in step 3 and 4.Is it true?

That's only true if you use the API (Data class) correctly. So if you never unlock a record in your rmi/socket layer then you'll have a problem.
 
Helen Ma
Ranch Hand
Posts: 451
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, do I need to create a multiple thread program maybe called it TestRMIApp.java:
create multiple threads that start the RMI server, and then start two clients and then clients invoke remote methods and test the result?

It seems to me that running Roberto's Data class test is not good enough.
 
Roel De Nijs
Sheriff
Posts: 9091
73
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see why you would start multiple RMI servers 1 RMI server with a bunch of clients will be more than enough.
 
Helen Ma
Ranch Hand
Posts: 451
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe, my wording was confusing in the previous post.

I am thinking of creating a multiple thread program that starts multiple clients. For the server side, I can start it manually.
In this multiple thread program, the threads start clients and clients can request remotely invoke methods on the running server.

I am not sure if that is feasible in JUnit test framework. If not, I can develop a test just like Roberto's Data class test.
 
Roel De Nijs
Sheriff
Posts: 9091
73
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Helen Ma wrote:I am not sure if that is feasible in JUnit test framework. If not, I can develop a test just like Roberto's Data class test.

For the multi-threaded approach I also created similar small programs like Roberto's Data class test (using org.junit.Assert to evaluate the results)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic