File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes Java sockets and RMI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Java sockets and RMI" Watch "Java sockets and RMI" New topic
Author

Java sockets and RMI

Sumit Kumar Yadav
Greenhorn

Joined: Aug 25, 2013
Posts: 23
sir, i have to develop a testing tool for the evaluation of java RMI and compare it with the java socket programming. im aware of these two technologies and also developed simple programs also but im confused on how and on what parameters i can evaluate the performance of these two technologies.
please help....
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 1963
    
    7

Welcome to the Ranch.

Interesting study. Well first off is the concept then amount of code to implement each. How much knowledge about sockets or RMI do you need to get started? Once you start programming, how easy is each one to do (number of lines, method/class count).

Beyond that, if you really want to test the performance then have a several threads/users connect to the server and do exactly the same thing.

That's a start. Hope this help.


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7
Sumit Kumar Yadav
Greenhorn

Joined: Aug 25, 2013
Posts: 23
Thanks for help sir.
Did you mean that i have to build a multi user chatting application using both of these technologies(RMI and Sockets).
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 1963
    
    7

Sumit Yaduvanshi wrote:Thanks for help sir.
Did you mean that i have to build a multi user chatting application using both of these technologies(RMI and Sockets).


If you don't have/build both, how can you compare?

EDIT: It doesn't need to be complex like a chat server. Do something simple like random number generation and return to client. Or loop x (a really big number) times before returning a message to client. Anything that can measure performance really.
Sumit Kumar Yadav
Greenhorn

Joined: Aug 25, 2013
Posts: 23
ok sir,..can you provide me some online sources related to this topic
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 1963
    
    7

Have you check out the tutorials Networking and RMI?
Sumit Kumar Yadav
Greenhorn

Joined: Aug 25, 2013
Posts: 23
yes sir, im working on it.
I am trying to send messages of different size (10,15,20....Kb's) from client side to the server side(in a loop) using UDP/TCP as well as RMI. But i stuck on this..... how to record the duration of sending each message packets (i.e starting time and ending time).
Since i have to calculate the throughput so it is necessary to calculate the time duration in sending each packet.
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 1963
    
    7

Sumit Yaduvanshi wrote:yes sir, im working on it.
I am trying to send messages of different size (10,15,20....Kb's) from client side to the server side(in a loop) using UDP/TCP as well as RMI. But i stuck on this..... how to record the duration of sending each message packets (i.e starting time and ending time).
Since i have to calculate the throughput so it is necessary to calculate the time duration in sending each packet.


You can first get a java.util.Date#getTime before the loop or logic. At the end do the same. Then calculate the difference.


Sumit Kumar Yadav
Greenhorn

Joined: Aug 25, 2013
Posts: 23
ok sir i got it...thanks for helping me
Sumit Kumar Yadav
Greenhorn

Joined: Aug 25, 2013
Posts: 23
sir, can you tell me some more parameters except throughput and latency that i can use for performance evaluation.
please help
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Java sockets and RMI
 
Similar Threads
Is NIO API really worth a try?
JMS , RMI etc
networked file reading and writing
Did SCJA yesterday
SCWCD or OCP??