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 -- 外部编译 在内核源码的目录 ...
随机推荐
- android bitmap out of memory总结、心得
setImageBitmap或setImageResource或BitmapFactory.decodeResource来设置一张大图,这些函数在完成decode后,最终都是通过java层的creat ...
- SQL 分组排序分页(大神帮写的膜拜一下)
查询全部: SELECT P3.ID, P3.Name, P3.AddTimeFROM (SELECT Name, MAX(AddTime) AS MaxAddTime FROM Product AS ...
- 安卓学习之--如何关闭所有的activity
根据Activity的声明周期 方法1 我们知道Android的窗口类提供了历史栈,我们可以通过stack的原理来巧妙的实现,这里我们在A窗口打开B窗口时在Intent中直接加入标志 Intent ...
- UVA 10765 Doves and bombs(双连通分量)
题意:在一个无向连通图上,求任意删除一个点,余下连通块的个数. 对于一个非割顶的点,删除之后,原图仍连通,即余下连通块个数为1:对于割顶,余下连通块个数>=2. 由于是用dfs查找双连通分量,树 ...
- dos文件批量转换成unix文件
对于经常在windows环境下和linux环境同时使用的文件(如在windows系统下编写,在linux环境下编译的文件), 常常存在这样的问题:由于两种系统的格式文件格式不同,导致程序出现不期望的问 ...
- ecshop init.php文件分析
1. ecshop init.php文件分析 2. <?php 3. 4. /** 5. * ECSHOP 前台公用文件 6. * ===================== ...
- hdu 2457(ac自动机+dp)
题意:容易理解... 分析:这是一道比较简单的ac自动机+dp的题了,直接上代码. 代码实现: #include<stdio.h> #include<string.h> #in ...
- User Agent
Android: Mozilla/5.0 (Linux; U; Android 2.3.5; zh-cn; MI-ONE Plus Build/GINGERBREAD) AppleWebKit/533 ...
- 【Mongo】Linux安装MongoDB
呵呵哒,每天都是小惊喜. 一 下载 https://www.mongodb.org/downloads可进行下载,根据需要选择合适的版本和操作系统 二 上传服务器 1 上传服务器路径并解压 2 创建数 ...
- IOS 屏幕截图 UIScrollview
//截图UIView:截全图 -(UIImage*)captureView:(UIView *)theView{ CGRect rect = theView.frame; if ([theView i ...