Archived

This topic is now archived and is closed to further replies.

[java] Multiplayer and servlets

This topic is 5398 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've been thinking of hosting multiplayer games on a servet with open connections to applets, does anybody know is this is feasable or if it could be too much of a strain on the server? EDIT: I guess the servlet would have to output 20-30kps total to concurrent users. [edited by - Neoteric on March 1, 2003 1:19:31 PM]

Share this post


Link to post
Share on other sites
Hi,

if you plan to implement a server, that should handle multiple incoming requests in real-time (as an opposite to request-response), I strongly suggest NOT TO implement it as a servlet.

You would just add a layer (the servlet container) in between your application logic and the clients and you would not gain anything by this approach.

Guessing from the I/O throughput you stated (~20-30kbps) you don't plan to implement multiplayer tic-tac-toe (where the servlet could be a feasible solution). So a standard RMI (or even sockets) solution could be ok for you.

But always evaluate any technology you're gonna use before you start implementing!

and don't forget to have fun

Petr Stedry

edit: typos corrected ...


[edited by - Petr Stedry on March 3, 2003 10:59:07 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by Petr Stedry
Hi,

if you plan to implement a server, that should handle multiple incoming requests in real-time (as an opposite to request-response), I strongly suggest NOT TO implement it as a servlet.

You would just add a layer (the servlet container) in between your application logic and the clients and you would not gain anything by this approach.

Guessing from the I/O throughput you stated (~20-30kbps) you don't plan to implement multiplayer tic-tac-toe (where the servlet could be a feasible solution). So a standard RMI (or even sockets) solution could be ok for you.

But always evaluate any technology you're gonna use before you start implementing!

and don't forget to have fun

Petr Stedry

edit: typos corrected ...


[edited by - Petr Stedry on March 3, 2003 10:59:07 AM]


Thanks,

I am using RMI over socket connections at the moment, 20-30k was a typo it was supposed to be 2-3kps, for my first attempt I'll be doing only 500bps with two users per instance and that evaluation should be up in a couple of weeks (lot's of work on). It shouldn't demand much more than a standard servlet chat room.

I'm only using a servlet because I don't have access to my own server to run on, otherwise I would definately be using that, so I'm not looking to gain anything as much as just get something .

I'll post the test version here when I have one.



[edited by - Neoteric on March 3, 2003 1:39:43 PM]

Share this post


Link to post
Share on other sites
Well,

a typo explains it all

In this light, the servlet would be an appropriate solution.

Aaaaah, how delightfull it would be to code a simple chat servlet .... instead of those overly complicated "nobody-really-needs-those-features" types of systems I''m forced (paid for) to create.

P.S.: If you don''t already, use the XSLT transformations (even client-side) to get the final HTML page. It''s quite easier to write such code (and XSLT is not so complicated to learn on the fly ).

have fun, I envy you

Share this post


Link to post
Share on other sites
quote:
Original post by Petr Stedry
Well,

a typo explains it all

In this light, the servlet would be an appropriate solution.

Aaaaah, how delightfull it would be to code a simple chat servlet .... instead of those overly complicated "nobody-really-needs-those-features" types of systems I'm forced (paid for) to create.

P.S.: If you don't already, use the XSLT transformations (even client-side) to get the final HTML page. It's quite easier to write such code (and XSLT is not so complicated to learn on the fly ).

have fun, I envy you


Hopefully you can help me out with a question that my sevlets book does not cover...

I'm using www.mycgiserver.com to host my rmi servlet but I need to set some kind of security permissions, are these set by mycgiserver or can I grant them myself?

Lot's of articles don't seem to cover this very well at all, it seems i need to set SocketPermission but I;m not sure how and where to do it.





[edited by - Neoteric on March 5, 2003 8:09:19 AM]

Share this post


Link to post
Share on other sites