Can jxta be used to develop online card game (p2p style)?
Can jxta be used to develop online card game (p2p style)?
https://www.java.net//node/677134
I am new to jxta.
The game need 4 players, so 4 peers in a group can play it.
There will be no additional server.
Can jxta support it?
When the group has 3 peers, and the 4th peer join, the game should start on all 4 peers.
Can all 3 peers learn the 4th peer's joining at the same time?
My worry is synchronization
————————————————————————————————————————————————
Technically speaking, JXTA can allow 4 peers to play together. No issue with that.
Regarding synchronization, the solution I would suggest is to centralize registration within one peer (for example, that peer creates a 4 player tables) and have other peers request to join that table. The central peer would grant such a request (or not) and notify the three other peers when the table is full to start playing.
Cheers,
J.
——————————————————————————————————————————————
If a peer act as central server, it'll be easy to program
but it'll be far less robust
what if the central server fail?
————————————————————————————————————————————————
Hi,
No. No peer as to act as a central server. Any peer can offer to create a table and any other peer can as to join. The peers who create a table just notify other peers in the group.
Cheers,
J.
Can jxta be used to develop online card game (p2p style)?的更多相关文章
- JXTA 2: 具有高性能、海量伸缩性的 P2P 网络
这是来自developerWorks的一篇文章,地址是 https://www.ibm.com/developerworks/cn/java/j-jxta2/ ———————————————————— ...
- Atitit JAVA p2p设计与总结 JXTA 2
Atitit JAVA p2p设计与总结 JXTA 2 JXTA 2 是开放源代码 P2P 网络的第二个主要版本,它利用流行的.基于 Java 的参考实现作为构建基础.在设计方面进行了重要的修改,以 ...
- jxta 2.8x启动了
http://chaupal.github.io/ ———————————————————————————————————————————————————————————————————— 至少两个月 ...
- 左侧带三角的Card css支持hover阴影
<div class="inputReportIndex"> <div class="inner"> <div class=&qu ...
- cPage分页,asp.net自定义分页,url传值分页,支持datalist、gridview、Repeater等
asp.net分页是最最常用的功能,实现方式也很多,使用不同的控件有不同的分页方式. 下面分享一个我们团队内部使用了多年的一个分页控件cPage,是自己设计编写,没有冗余,简单.快速. cPage,现 ...
- JavaScript验证
<script type="text/javascript"> /*密码*/ function password() { var pas ...
- css3 --- 翻页动画 --- javascript --- 3d --- Action
用css3和javascript做一个翻页动画<Action> 如有疑问请参照我的上一篇随笔:http://www.cnblogs.com/kodoyang/p/Html_Css3_Car ...
- ecshop开发日志之手机端虚拟商品自动发货
在ecshop官方模版收,web端的虚拟商品购买后不能像pc端那般直接在付款后出现虚拟商品的卡号,密码,截止日期一下为让手机购买也可以在付款后自动显示发货并能显示卡号密码截止日期首 先找到pc端的fl ...
- Linux 内核模块编译 Makefile
驱动编译分为静态编译和动态编译:静态编译即为将驱动直接编译进内核,动态编译即为将驱动编译成模块. 而动态编译又分为两种: a -- 内部编译 在内核源码目录内编译 b -- 外部编译 在内核源码的目录 ...
随机推荐
- Hearthstone-Deck-Tracker汉化处理技巧
https://github.com/chucklu/Hearthstone-Deck-Tracker 首先本地需要有自己的远端chucklu以及作者的远端epix37 $ git remote -v ...
- MyBatis学习总结4--解决字段名与实体类属性名不相同的冲突
在平时的开发中,我们表中的字段名和表对应实体类的属性名称不一定是完全相同的,如果直接在xml映射文件中使用sql进行映射,会造成返回值为空的情况,下面阐述解决方案: 测试所用表和数据 create t ...
- bzoj2241: [SDOI2011]打地鼠
暴力. O(n^6)暴力卡过,72ms. 莫名其妙做这道题时感觉十分烦躁,难受,只能这样了. O(n^4)的方法是这样差分一下.判断的时候tmp=t[i][j],t[i][j]-=tmp,t[i+r] ...
- Darwin Streaming Server 简介
Darwin Streaming Server 概要 Darwin Streaming Server简称DSS.DSS是Apple公司提供的开源实时流媒体播放服务器程序.整个程序使用C++编写 ...
- Delphi Waring 的信息
Display PreferencesWarning messages (Delphi)Go Up to Delphi Compiler Directives (List) Index TypeSwi ...
- 【转】C++ 内存分配(new,operator new)详解
本文主要讲述C++ new运算符和operator new, placement new之间的种种关联,new的底层实现,以及operator new的重载和一些在内存池,STL中的应用. 一 new ...
- HDU 5874 Friends and Enemies
Friends and Enemies Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Othe ...
- MyBatis 入门到精通(二) SQL语句映射XML文件
MyBatis 真正强大之处就在这些映射语句,也就是它的魔力所在.对于它的强大功能,SQL 映射文件的配置却非常简单. 如果您比较SQL 映射文件配置与JDBC 代码,您很快可以发现,使用SQL 映射 ...
- HDU 4911 Inversion
http://acm.hdu.edu.cn/showproblem.php?pid=4911 归并排序求逆对数. Inversion Time Limit: 2000/1000 MS (Java/ ...
- IOS UINavigationController 操作相关集合
1.修改中间Title字体以及大小 [self.navigationController.navigationBar setTitleTextAttributes:[NSDictionary dict ...