简体   繁体   中英

Bingo game Java server architecture

I am planning to develop a multi-player turn based web bingo card game using Flash for client UI and java based application for server. I need to decide whether I can use Sockets from Flash to communicate with Java or web service calls from the Flash Client. The requirement is that we need to send the random generated bingo card data to the browser based players from server and also need to store players data to the database.

Please suggest which architecture will be better like using Sockets or Web services invocation

Thanks

I prefer Web services because

  • not dependent on firewall rules for clients
  • no need of implementing of a low level protocol (necessary for sockets)
  • XML is easier to extend in the future
  • security infrastructure with HTTPS available and easy to implement

You might want to look at WebSockets (part of HTML5)

I would suggest RESTful web service. Use socket programming is surely a bad idea.

  1. If you implement an socket server, you'll have to deal with many of the scaling and performance issues already handled by the web servers, and session management issues too

  2. If you are using any port other than 80, it is quite likely be blocked by ISPs or firewalls especially cooperate firewalls.

But you mentioned you are using Flash, I have to remind you if you want to use web service that there is a bug which flash will only send IE cookies over even if the user is using firefox or chrome, so session management based on cookie could have problem with flash.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM