简体   繁体   English

克里昂可靠性

[英]Kryonet reliability

Is there anyone who has used the Java Kryonet library in a project willing to share their experience? 是否有人愿意在项目中使用Java Kryonet库来分享他们的经验? I've seen it recommended a few times, but haven't actually seen anybody talk about their experiences using it. 我看过几次,但实际上并没有看到任何人谈论他们使用它的经历。

Specifically, I want to make sure that it is reliable and relatively stable. 具体来说,我想确保它是可靠且相对稳定的。 Or should I consider using something like Google protocol buffers with custom networking code? 还是应该考虑使用带有自定义网络代码的Google协议缓冲区之类的东西?

Thanks! 谢谢!

I have discussed the kryonet and kryo in my master's thesis and compared it some of the contemporaries; 我已经在硕士论文中讨论了kryonet和kryo,并比较了一些同时代的人。 that should give some information and analysis about Kryo: http://de.scribd.com/doc/67084961/MasterArbeit 应该可以提供有关Kryo的一些信息和分析: http : //de.scribd.com/doc/67084961/MasterArbeit

I developed a game with kryonet and it works like a charm. 我用kryonet开发了一款游戏,它的魅力十足。 It is also very easy to use. 它也非常易于使用。

I am currently working with Kryonet and making a game. 我目前正在与Kryonet合作并制作游戏。 I have myself found it as a very helpful and easy to use library. 我自己发现它是一个非常有用且易于使用的库。 It has a very simple API which makes life very easy. 它有一个非常简单的API,使生活变得非常轻松。 I won't say it is as powerful as something like Netty or Apache Mina but it does all the required tasks. 我不会说它像Netty或Apache Mina一样强大,但是它可以完成所有必需的任务。 I personally love it and I will use it everywhere I can unless I require something more powerful or sending huge data as other libraries provide much more than KryoNet when it comes to sending data. 我个人喜欢它,并且会在任何地方使用它,除非我需要更强大的功能或发送大量数据,因为其他库在发送数据方面比KryoNet提供了更多的功能。

Answering the other half of your question that isn't addressed by the older one, Protocol Buffers have the advantage of being much more widely deployed, so you're less likely to run into major bugs. 回答较旧版本无法解决的问题的另一半,协议缓冲区具有可以更广泛地部署的优势,因此您不太可能遇到重大错误。 There are serious downsides, though, not least the facts that (1) you have to define your format using an IDL and then use PB's generated classes (meaning you may have to copy data in and out of your own back-end objects, which might result in lower performance) and (2) PB doesn't support polymorphism except through a variety of difficult-to-manage hacks. 但是,存在严重的不利影响,尤其是以下事实:(1)您必须使用IDL定义格式,然后使用PB的生成的类(这意味着您可能必须将数据复制进出自己的后端对象,可能会导致性能降低),并且(2)PB不支持多态,除非通过各种难以管理的黑客手段来实现。

So, if you're just looking for a straightforward way of transferring structured (but not object-oriented) data from one endpoint to another, Protocol Buffers is probably your best bet. 因此,如果您只是在寻找一种将结构化(而非面向对象)数据从一个端点传输到另一端点的简单方法,那么协议缓冲区可能是最好的选择。 More complex scenarios probably favour Kryonet. 更复杂的场景可能更适合Kryonet。

HTH HTH

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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