uWebSockets 0.10.0,可扩展的WebSocket服务器库

发布于 2016年10月06日
收藏 18

JEPaaS 适用于搭建ERP、MRP、OA、MES...系统,也可实现SAAS部署。【适配国产化软硬件】>>>

uWebSockets 0.10.0 发布了,v0.10.0是一个完全重写的库,包括性能提升和bug修复。uWebSockets,是一款高度可拓展的最轻量级、效率最高的WebSocket服务器库之一。它具有易于使用的,完全异步面向对象的接口和与其他竞品对比扩展到数百万连接只使用一小部分内存的特点。详细更新如下:


  • Node.js:

    • Greatly improved memory scalability. One million connections require 1.3 GB of user space memory - 65% of what v0.9.0 required and 8% of what ws 1.1.0 requires.

    • Slight throughput performance gain (up to 27x faster than ws 1.1.0, up from 24x with v0.9.0).

    • New optional (subject-to-change) low-level C-like interface exposed as require('uws').native - for those who don't mind trading a bit of productivity for improved efficiency.

  • Node.js and/or C++

    • Throughput has been improved ~20% despite the increased level of abstraction (up to 5 million messages echoed per second using the C++ interface and one Intel i5 CPU core).

    • Permessage-deflate requires way less memory per connection (1 byte) due to shared z_stream by default.


  • Node.js and C++

    • Client support - thanks to @jimmyt857 for work on the early prototype!

    • Basic subprotocol support (it will simply accept any subprotocol).

  • C++

    • Greatly improved code quality.

    • Plenty of automatic test cases have been added, all passing cleanly under Valgrind.

    • Simplified threading, transfer connections between CPU cores "dynamically" during the connection lifetime.

    • SO_REUSEPORT support (goes well together with connection transferring).

    • Path routing (GET /whateverPath).

    • Concept of groups, one group share callbacks and broadcast scope.

    • New interface allows more complex set-ups (one group can listen to many ports, be it SSL or non-SSL or both)

Bug 修复:

  • Adds proper bounds checking to UTF-8 check.

  • Fixes a potential bug with short writes over SSL connections.

  • Proper SSL renegotiation support (SSL_read might need to write, etc).

  • IPv6 & IPv4 support.



转载请注明:文章转载自 OSCHINA 社区 [http://www.oschina.net]
本文标题:uWebSockets 0.10.0,可扩展的WebSocket服务器库
此新闻有 1 条评论,请先登录后再查看。