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)?的更多相关文章

  1. JXTA 2: 具有高性能、海量伸缩性的 P2P 网络

    这是来自developerWorks的一篇文章,地址是 https://www.ibm.com/developerworks/cn/java/j-jxta2/ ———————————————————— ...

  2. Atitit JAVA p2p设计与总结  JXTA 2

    Atitit JAVA p2p设计与总结  JXTA 2 JXTA 2 是开放源代码 P2P 网络的第二个主要版本,它利用流行的.基于 Java 的参考实现作为构建基础.在设计方面进行了重要的修改,以 ...

  3. jxta 2.8x启动了

    http://chaupal.github.io/ ———————————————————————————————————————————————————————————————————— 至少两个月 ...

  4. 左侧带三角的Card css支持hover阴影

    <div class="inputReportIndex"> <div class="inner"> <div class=&qu ...

  5. cPage分页,asp.net自定义分页,url传值分页,支持datalist、gridview、Repeater等

    asp.net分页是最最常用的功能,实现方式也很多,使用不同的控件有不同的分页方式. 下面分享一个我们团队内部使用了多年的一个分页控件cPage,是自己设计编写,没有冗余,简单.快速. cPage,现 ...

  6. JavaScript验证

    <script type="text/javascript">    /*密码*/    function password()    {        var pas ...

  7. css3 --- 翻页动画 --- javascript --- 3d --- Action

    用css3和javascript做一个翻页动画<Action> 如有疑问请参照我的上一篇随笔:http://www.cnblogs.com/kodoyang/p/Html_Css3_Car ...

  8. ecshop开发日志之手机端虚拟商品自动发货

    在ecshop官方模版收,web端的虚拟商品购买后不能像pc端那般直接在付款后出现虚拟商品的卡号,密码,截止日期一下为让手机购买也可以在付款后自动显示发货并能显示卡号密码截止日期首 先找到pc端的fl ...

  9. Linux 内核模块编译 Makefile

    驱动编译分为静态编译和动态编译:静态编译即为将驱动直接编译进内核,动态编译即为将驱动编译成模块. 而动态编译又分为两种: a -- 内部编译 在内核源码目录内编译 b -- 外部编译 在内核源码的目录 ...

随机推荐

  1. proc_dir_entry

    struct proc_dir_entry {        unsigned int low_ino;        unsigned short namelen;        const cha ...

  2. CardView官方教程

    Create Cards CardView extends the FrameLayout class and lets you show information inside cards that ...

  3. BZOJ 2337 XOR和路径(高斯消元)

    题目链接:http://61.187.179.132/JudgeOnline/problem.php?id=2337 题意:给定一个带权无向图.从1号点走到n号点.每次从当前点随机(等概率)选择一条相 ...

  4. Android开发之定义app在手机的安装位置

    定义app在手机的安装位置,可以通过在清单文件中添加属性 android:installLocation="" 该属性有三个值:auto(自动),preferExternal(外部 ...

  5. 面试题_93_to_102_编程和代码相关的面试题

    93)怎么检查一个字符串只包含数字?(解决方案) 94)Java 中如何利用泛型写一个 LRU 缓存?(答案<) 95)写一段 Java 程序将 byte 转换为 long?(答案) 95)在不 ...

  6. SFMPQ打包工具完后小结

    硬盘上没有,第一次创建Archive的时候用SFileOpenArchiveForUpdate, 当打开一个已经存在archive的时候用SFileOpenArchive. MpqDeleteFile ...

  7. poj 3277 City Horizon (线段树 扫描线 矩形面积并)

    题目链接 题意: 给一些矩形,给出长和高,其中长是用区间的形式给出的,有些区间有重叠,最后求所有矩形的面积. 分析: 给的区间的范围很大,所以需要离散化,还需要把y坐标去重,不过我试了一下不去重 也不 ...

  8. poj3307

    可以证明,每个符合的数都由2,3,5,7相乘得到. 依据猜想:下一个出现的数是由前面某个数乘上这几个数之一得到的新的数. 假设之前的数均满足序列,则因为下一个数必有2,3,5,7相乘得到,而这个数之前 ...

  9. WDF模型驱动程序开发

    WDF驱动程序开发 1. 引言 设备驱动程序是硬件设备连接到计算机系统的软件接口,任何设备都必须有相应的驱动程序才能在计算机系统上正常工作.设备驱动程序的优劣直接关系到整个系统的性能和稳定性,因此,设 ...

  10. windows 下FFMPEG的编译方法 附2012-9-19发布的FFMPEG编译好的SDK下载

    经过一晚上加一上午的奋斗,终于成功编译出了最新版的FFMPEG,下面是我编译的心得,因为是最新的,应该会对大家有用,编译的FFMPEG的版本是0.11.2,2012-09-19新发布的版本 平台:WI ...