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.

211 lines
9.0 KiB

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