🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.api
2 messages
2 total messages Started by Marcia Rendlo Tue, 25 Mar 2003 17:20
Making application run online
#653
Author: Marcia Rendlo
Date: Tue, 25 Mar 2003 17:20
14 lines
2086 bytes


 I wrote a game of Black Jack that someone can play in a Java applet. I would like to extend this game to be used online via the internet/http. There are some design issues that I still need to resolve though.

Basically I need to figure out if the "dealer" of the cards (dealer=Random number generator and addittional logic) should reside on the server?, or instead in the Java client application(Web Browser).

-Thoughts on dealer residing on the server:
-If random numbers are generated on the server and then sent to the client application, I am worried that there might be issues related to speed. Can the dealer on the server send random numbers quick enough to the client application in order for the game to not be affected by being too slow? Also the game results will need to be sent back to the server.

-Thoughts on dealer residing on the Cleint(Java applet):
-Should the game information and results be saved or cached to a local datafile on the client machine? The concern here is that the game data file might be hacked into, or the server might go down/disconnect. 

I would appreciate help from someone who might have had to deal with a similar problem in the past, or with someone who has a good idea about this.
Re: Making application run online
#657
Author: Kevin Dean
Date: Tue, 01 Apr 2003 18:22
20 lines
2083 bytes
The answer really depends on what you intend to do with the results.  If
users are just playing for fun, bundling everything into the client poses no
security issues.  If, on the other hand, there is some benefit to winning
(e.g. an online points tally showing the top 10 players) then you need to
maintain the entire state on the server and have the applet present the
state to the user; you can't trust the client to preserve the state because
doing so would open you up to hacking as you have just described.  The
requests to the host to update the state (e.g. split, hit, stand, etc.)
could be done through HTTP, Web Services, or (if you're really masochistic)
EJB access.  The host would take the request, match it to the internal
state, update the state, and return the updated state to the client.
--
Check out our latest white papers at
http://www.datadevelopment.com/papers/index.html

BladeNET Scores With Borland Enterprise Tools
Team Development with JBuilder and Borland Enterprise Server

Dolphin Data Development Ltd.
http://www.datadevelopment.com/
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads