Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

simulating multiple clients with RMI

 
Peter Aarum
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all!

First I made a socket implementation and then I decided that in order to choose between the two I must implement a RMI solution. I have now done that. And now to my question:
when I try to simulate multiple clients (by creating threads in a loop) and try to book a room it seems to work fine when I try it with 500 threads. Ant then I tried it with 700 I got alot of
java.rmi.ConnectException: Connection refused to host: xx.xxx.xxx.x; nested exception is:
java.net.ConnectException: Connection refused: connect

This is ofcourse from the client threads. The server does not throw any exceptions. Is this something that I need to worry about? With my socket solution I could run it with 10.000 threads.....

Any thoughts?

Have a great saturday folks!
/Peter
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I never tested my RMI solution with that amount of threads, so I don't have any idea (but it seems a bit odd to me). Maybe you could try to simulate the issue with a very easy RMI example (like this one)
 
Peter Aarum
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply Roel!

I will try that and post the result when I got time..... going on a short holiday.

Cheers!
Peter

 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peter Aarum wrote:going on a short holiday.

Enjoy! Don't forget your and have a once in a while
 
Peter Aarum
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

Back after alot of

I have now tested the simple RMI example and here are the results.

500 threads - no problem.
700 threads - no problem
1000 threads - multiple exceptions like above.

Since this worked with 700 I run the URLyBird test again and it worked with both 700 and 900 and it worked fine but not with 1000..... hmmm I dont know what to think about this. Otherwise I like the RMI solution a little better than the socket.....

Any thoughts/ideas?

Cheers!
Peter

 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well champ, you can stay with the RMI solution. A super powerful server is not a must requirement, so I'd say that what you have is certainly enough. You can even mention what they can expect from your solution, and since it wasn't mentioned how many requests the server has to handle concurrently, then you concluded that what you built was enough.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I experience exactly the same behavior: when you start 750 threads accessing the RMI server (with the simple example) you get a lot of "connection refused" exceptions. No need to say I didn't test my RMI server with that many concurrent requests. I tested it with maximum 35 threads.
 
Peter Aarum
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Roberto and thanks for the reply!

Yeah I suspect that this test does not really test a reasonable scenario. What are the odds that 1000 clients connects almost simultaneously?

Cheers!
Peter
 
Oricio Ocle
Ranch Hand
Posts: 284
Debian Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.
this is classic: More than 17 clients CRASH
But seems not to find an explanation.

Maybe the problem is caused at a lower level, an antivirus, or even the OS, identifying a threat as DoS attack.

Increasing heap space (server/client) changes the result?

┬┐What jre version is?

Regards!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic