netty-demo
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

213 lines
9.2 KiB

9 years ago
13 years ago
13 years ago
12 years ago
11 years ago
12 years ago
11 years ago
12 years ago
11 years ago
12 years ago
11 years ago
12 years ago
13 years ago
12 years ago
11 years ago
12 years ago
12 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
11 years ago
11 years ago
10 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
10 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
10 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
9 years ago
11 years ago
10 years ago
  1. Netty-socketio Overview
  2. ===
  3. [![Maven Central](https://img.shields.io/maven-central/v/com.corundumstudio.socketio/netty-socketio.svg?style=flat-square)](https://maven-badges.herokuapp.com/maven-central/com.corundumstudio.socketio/netty-socketio/)
  4. This project is an open-source Java implementation of [Socket.IO](http://socket.io/) server. Based on [Netty](http://netty.io/) server framework.
  5. Checkout [Demo project](https://github.com/mrniko/netty-socketio-demo)
  6. Licensed under the Apache License 2.0.
  7. Features
  8. ================================
  9. * Supports __0.7__...__0.9.16__ (netty-socketio 1.6.6) and __1.0+__ (netty-socketio latest version) version of [Socket.IO-client](https://github.com/LearnBoost/socket.io-client)
  10. * Supports xhr-polling transport
  11. * Supports websocket transport
  12. * Supports namespaces and rooms
  13. * Supports ack (acknowledgment of received data)
  14. * Supports SSL
  15. * Supports client store (Memory, [Redisson](https://github.com/mrniko/redisson), [Hazelcast](http://www.hazelcast.com/))
  16. * Supports distributed broadcast across netty-socketio nodes ([Redisson](https://github.com/mrniko/redisson), [Hazelcast](http://www.hazelcast.com/))
  17. * Supports OSGi
  18. * Supports Spring
  19. * Lock-free and thread-safe implementation
  20. * Declarative handler configuration via annotations
  21. Performance
  22. ================================
  23. Customer feedback in __2012__:
  24. CentOS, 1 CPU, 4GB RAM runned on VM:
  25. CPU 10%, Memory 15%
  26. 6000 xhr-long polling sessions or 15000 websockets sessions
  27. 4000 messages per second
  28. Customer feedback in __2014__:
  29. "To stress test the solution we run 30 000 simultaneous websocket clients and managed to peak at total of about 140 000 messages per second with less than 1 second average delay." (c) Viktor Endersz - Kambi Sports Solutions
  30. Projects using netty-socketio
  31. ================================
  32. AVOS Cloud: [avoscloud.com](https://avoscloud.com/)
  33. Bingo Crack: [bingocrack.com](http://bingocrack.com/)
  34. Kambi Sports Solutions: [kambi.com](http://kambi.com/)
  35. ARSnova: [arsnova.eu](https://arsnova.eu)
  36. Zipwhip: [zipwhip.com](https://zipwhip.com/)
  37. Recent Releases
  38. ================================
  39. ####Please Note: trunk is current development branch.
  40. ####30-Nov-2015 - version 1.7.8 released
  41. Improvement - `WebSocketServerHandshaker.allowExtensions` is `true` now
  42. Improvement - SessionID cookie implementation (thanks to @ryandietrich)
  43. Fixed - clientRooms leak (thanks to @andreaspalm)
  44. Fixed - ExceptionListener not used for errors in JSON parsing
  45. Fixed - "silent channel" attack
  46. ####26-Mar-2015 - version 1.6.7 released
  47. Improvement - `useStrictOrdering` param added for websocket packets strict ordering
  48. Improvement - `FAIL_ON_EMPTY_BEANS = false` option setted in json decoder
  49. ####18-Feb-2015 - version 1.7.7 released
  50. Improvement - no need to add jackson lib if you use own JsonSupport impl
  51. Fixed - SocketIO client 1.3.x support
  52. Fixed - Charset encoding handling (thanks to alim-akbashev)
  53. ####17-Jan-2015 - version 1.7.6 released
  54. Improvement - `SocketIONamespace.getName()` added
  55. Fixed - WebSocket frames aggregation
  56. Fixed - WebSocket buffer release
  57. Fixed - `Unexpected end-of-input in VALUE_STRING` error
  58. Fixed - Access-Control-Allow-Credentials is TRUE for requests with origin header
  59. ####05-Dec-2014 - version 1.7.5 released
  60. Feature - `Configuration.sslProtocol` param added
  61. Fixed - BinaryEvent ack handling
  62. Fixed - BinaryEvent non b64 encoding/decoding
  63. Fixed - buffer leak during packet encoding
  64. ####15-Nov-2014 - version 1.7.4 released
  65. Fixed - packet encoding
  66. Fixed - BinaryEvent encoding/decoding
  67. Fixed - unchallenged connections handling
  68. ####29-Sep-2014 - version 1.6.6 released
  69. Feature - `origin` setting added
  70. Feature - `crossDomainPolicy` setting added
  71. Feature - `SocketIOServer.startAsync` method added
  72. ####24-Sep-2014 - version 1.7.3 released
  73. Feature - Epoll support
  74. Improvement - BinaryEvent support
  75. Fixed - SocketIOClient disconnect handling
  76. Fixed - broadcast callback
  77. Fixed - NPE then no transport defined during auth
  78. Fixed - ping timeout for polling transport
  79. Fixed - buffer leak in PacketEncoder
  80. ####22-Aug-2014 - version 1.7.2 released
  81. Fixed - wrong outgoing message encoding using websocket transport
  82. Fixed - NPE in websocket transport
  83. Fixed - multiple packet decoding in polling transport
  84. Fixed - buffer leak
  85. ####07-Jul-2014 - version 1.7.1 released
  86. Feature - ability to set custom `Access-Control-Allow-Origin` via Configuration.origin
  87. Fixed - connection via CLI socket.io-client
  88. ####28-Jun-2014 - version 1.7.0 released
  89. Feature - Socket.IO 1.0 protocol support. Thanks to the new protocol decoding/encoding has speedup
  90. __Dropped__ - `SocketIOClient.sendMessage`, `SocketIOClient.sendJsonObject` methods and corresponding listeners
  91. __Dropped__ - Flashsocket transport support
  92. __Dropped__ - protocol version 0.7 ... 0.9.16
  93. ####13-May-2014 - version 1.6.5 released
  94. Improvement - single packet encoding optimized, used mostly in WebSocket transport. Encoding time reduced up to 40% (thanks to Viktor Endersz)
  95. Improvement - rooms handling optimized
  96. Improvement - ExceptionListener.exceptionCaught method added
  97. __Breaking api change__ - Configuration.autoAck replaced with ackMode
  98. Feature - trustStore setting added
  99. Feature - maxFramePayloadLength setting added
  100. Feature - getAllClients and getClient methods added to SocketIONamespace
  101. Fixed - SocketIOServer.getAllClients returns wrong clients amount
  102. ####25-Mar-2014 - version 1.6.4 released
  103. Fixed - message release problem
  104. Fixed - problem with exception listener configuration redefinition
  105. __Breaking api change__ - DataListener.onData now throws Exception
  106. Improvement - data parameter added to exception listener
  107. Improvement - ability to setup socket configuration
  108. Improvement - Configuration.autoAck parameter added
  109. ####06-Mar-2014 - version 1.6.3 released
  110. Fixed - AckCallback handling during client disconnect
  111. Fixed - unauthorized handshake HTTP code changed to 401
  112. __Breaking api change__ - Configuration.heartbeatThreadPoolSize setting removed
  113. Feature - annotated Spring beans support via _SpringAnnotationScanner_
  114. Feature - common exception listener
  115. Improvement - _ScheduledExecutorService_ replaced with _HashedWheelTimer_
  116. ####08-Feb-2014 - version 1.6.2 released
  117. Fixed - wrong namespace client disconnect handling
  118. Fixed - exception in onConnect/onDisconnect/isAuthorized methods leads to server hang
  119. __Breaking api change__ - SocketIOClient.sendEvent methods signature changed
  120. Improvement - multi type events support via _MultiTypeEventListener_ and _OnEvent_ annotation
  121. Improvement - multi type events ack support via _MultiTypeAckCallback_
  122. Improvement - SocketIOClient.getHandshakeData method added
  123. Improvement - Jedis replaced with [Redisson](https://github.com/mrniko/redisson)
  124. ####14-Jan-2014 - version 1.6.1 released
  125. Fixed - JDK 1.6+ compatibility
  126. Feature - authorization support
  127. ####19-Dec-2013 - version 1.6.0 released
  128. Fixed - XHR-pooling transport regression
  129. Fixed - Websocket transport regression
  130. Fixed - namespace NPE in PacketHandler
  131. Fixed - executors shutdown during server stop
  132. Feature - client store (Memory, [Redis](http://redis.io/), [Hazelcast](http://www.hazelcast.com/)) support
  133. Feature - distributed broadcast across netty-socketio nodes ([Redis](http://redis.io/), [Hazelcast](http://www.hazelcast.com/)) support
  134. Feature - OSGi support (thanks to rdevera)
  135. Improvement - XHR-pooling optimization
  136. Improvement - SocketIOClient.getAllRooms method added
  137. ####07-Dec-2013 - version 1.5.4 released
  138. Fixed - flash policy "request leak" after page reload (thanks to ntrp)
  139. Fixed - websocket swf loading (thanks to ntrp)
  140. Fixed - wrong urls causes a potential DDoS
  141. Fixed - Event.class package visibility changed to avoid direct usage
  142. Improvement - Simplified Jackson modules registration
  143. ####24-Oct-2013 - version 1.5.2 released
  144. Fixed - NPE during shutdown
  145. Improvement - isEmpty method added to Namespace
  146. ####13-Oct-2013 - version 1.5.1 released
  147. Fixed - wrong ack timeout callback invocation
  148. Fixed - bigdecimal serialization for JSON
  149. Fixed - infinity loop during packet handling exception
  150. Fixed - 'client not found' handling
  151. ####27-Aug-2013 - version 1.5.0 released
  152. Improvement - encoding buffers allocation optimization.
  153. Improvement - encoding buffers now pooled in memory to reduce GC pressure (netty 4.x feature).
  154. ####03-Aug-2013 - version 1.0.1 released
  155. Fixed - error on unknown property during deserialization.
  156. Fixed - memory leak in long polling transport.
  157. Improvement - logging error info with inbound data.
  158. ####07-Jun-2013 - version 1.0.0 released
  159. First stable release.
  160. ### Maven
  161. Include the following to your dependency list:
  162. <dependency>
  163. <groupId>com.corundumstudio.socketio</groupId>
  164. <artifactId>netty-socketio</artifactId>
  165. <version>1.7.8</version>
  166. </dependency>
  167. ### Supported by
  168. YourKit is kindly supporting this open source project with its full-featured Java Profiler.
  169. YourKit, LLC is the creator of innovative and intelligent tools for profiling
  170. Java and .NET applications. Take a look at YourKit's leading software products:
  171. <a href="http://www.yourkit.com/java/profiler/index.jsp">YourKit Java Profiler</a> and
  172. <a href="http://www.yourkit.com/.net/profiler/index.jsp">YourKit .NET Profiler</a>.