nano: A game server network library that was written with Go

xuanbao · · 614 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Hi, all</p> <p>I used Go to write a game server network library, the transport layer supports TCP and WebSocket, it is very easy to use, the initial inspiration comes from Pomelo(<a href="https://github.com/NetEase/pomelo/">https://github.com/NetEase/pomelo/</a>) but some difference, I conducted a rough benchmark test, IOPS 10W+ on my computer(Windows10, i5-6700, 3.2GHz 4Core), I need someone help me review it, some advice is better.</p> <p>Thanks</p> <p>PS: <a href="https://github.com/lonnng/nano">https://github.com/lonnng/nano</a></p> <hr/>**评论:**<br/><br/>tiberiousr: <pre><p>given that nano is also one of the most commonly used editors on *nix systems these days that name may be some cause for confusion.</p></pre>longtaitou: <pre><p>Orz, did not take this issue into account at that time</p></pre>The_Jare: <pre><p>Maybe nanonet is still available! :)</p></pre>: <pre><p>[deleted]</p></pre>tiberiousr: <pre><p>I said commonly used, as in, doing a base install will almost always include nano. I believe Ubuntu&#39;s docs almost exclusively use nano as an editor by default when explaining how to edit config files by hand. </p> <p>Don&#39;t get me wrong. I fucking hate nano. Vim4lyfe and all that. But nano is a common editor.</p></pre>George3d6: <pre><p>I did not read the &#34;one of the&#34; part and though the comment would come be funny, nvm it :p</p></pre>lstep: <pre><p>Looks nice. In the example HTML part, the client uses some StarX client, which looks like from another backend/server implementation of nano (also done by you). What is the difference between nano and starX?</p></pre>longtaitou: <pre><p>StarX(<a href="https://github.com/lonnng/starx" rel="nofollow">https://github.com/lonnng/starx</a>) was a complete clone from Pomelo(<a href="https://github.com/NetEase/pomelo/" rel="nofollow">https://github.com/NetEase/pomelo/</a>) but use multiple threads(goroutine), which was distributed, multiple threads model.</p> <p>Nano is a standalone, single-threaded model, which more easy to use. In most usage scenarios, the performance will not be a bottleneck, and GRPC could be used to implement distributed to gain better performance.</p></pre>longtaitou: <pre><p>Nano compatible with pomelo protocol, all versions of the client SDK could be used for nano.</p> <h2>Clients</h2> <ul> <li><p><strong>Javascript</strong></p> <ul> <li>Websocket version: <a href="https://github.com/pomelonode/pomelo-jsclient-websocket" rel="nofollow">pomelonode / pomelo-jsclient-websocket</a></li> <li>Socket.io version: <a href="https://github.com/pomelonode/pomelo-jsclient-socket.io" rel="nofollow">pomelonode / pomelo-jsclient-socket.io</a></li> </ul></li> <li><p><strong>C</strong></p> <ul> <li>Socket vesion: <a href="https://github.com/NetEase/libpomelo/" rel="nofollow">NetEase / libpomelo</a></li> </ul></li> <li><p><strong>iOS</strong></p> <ul> <li>Socket.io version: <a href="https://github.com/NetEase/pomelo-iosclient" rel="nofollow">NetEase / pomelo-iosclient</a></li> <li>Socket version: <a href="https://github.com/ETiV/PomeloClient-iOS-WebSocket" rel="nofollow">ETiV / PomeloClient-iOS-WebSocket</a></li> <li>WebSocket version: <a href="https://github.com/GeforceLee/Websocket-Pomelo" rel="nofollow">GeforceLee / Websocket-Pomelo</a></li> </ul></li> <li><p><strong>Android &amp; Java</strong></p> <ul> <li><a href="https://github.com/NetEase/pomelo-androidclient" rel="nofollow">NetEase / pomelo-androidclient</a></li> <li><a href="https://github.com/jzsues/pomelo-websocket-java-client" rel="nofollow">Jzsues / pomelo-websocket-java-client</a></li> </ul></li> <li><p><strong>Unity3d</strong></p> <ul> <li>Socket.io version: <a href="https://github.com/NetEase/pomelo-unityclient" rel="nofollow">NetEase / pomelo-unityclient</a></li> <li>Socket version: <a href="https://github.com/NetEase/pomelo-unityclient-socket" rel="nofollow">NetEase / pomelo-unityclient-socket</a></li> </ul></li> <li><p><strong>Flash</strong></p> <ul> <li>Socket.io version: <a href="https://github.com/stokegames/pomelo-flashclient" rel="nofollow">stokegames / pomelo-flashclient</a></li> <li>Socket version: <a href="https://github.com/D-Deo/pomelo-flash-tcp" rel="nofollow">D-Deo / pomelo-flash-tcp</a></li> </ul></li> <li><p><strong>Cocos2dx</strong></p> <ul> <li>C++: <a href="https://github.com/NetEase/pomelo-cocos2dchat" rel="nofollow">NetEase / pomelo-cocos2dchat</a></li> </ul></li> </ul></pre>George3d6: <pre><p>I&#39;d add a few more code examples if I were you, otherwise this seems nicely done assuming it&#39;s performance is ok... which brings me to my second point, add some benchmarks, those would help a lot, especially since I assume there are people that want to switch from pomelo due to the overall average performance of node and a faster drop in replacement might be very welcome as far as they are concerned.</p></pre>longtaitou: <pre><p>More demo and docs coming.</p></pre>mofirouz: <pre><p>What was the motivation behind this? Are you planning to add more stuff to this, or are you aiming this to be just a framework library and not a standalone server?</p></pre>longtaitou: <pre><p>The core library will be streamlined, a complete framework should be accomplished with a new REPO.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

614 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传