开发者

Java client/server architecture

I have some experience using JAVA EE 6 along with frameworks like Seam, I've used glassfish and Jboss AS. I want to develop a couple of games now and they have a client/server architecture, but u开发者_如何学Gosing an application server seems like an overkill as each party must set up their server to play, so I thought about going with plain Java SE. I've read about grizzly and nio.

My problem is, I've only found examples on how to implement this in a very simple case. Or they seemed unnecessarily complex. I was thinking about using MVC with observer so I have a clean separation between the game logic and the views, along with remote proxies to simulate that the other players are playing locally, so I don't need to duplicate logic if I ever want to add AI players.

Can you point me in the right direction? Is that a good idea? Resources on this? I understand the are a lot but I'm looking for best practices or a fancy approach on solving this.


IMHO, The simplest way to distribute game data is to use JMS Topics. This will ensure the same messages are distributed across your system. (And it will take care of the sockets)

I would use ActiveQ because its easy to get started, however HornetQ is a very fast free server.

This will allow you to distribute your application how you like.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜