Network application protocol based on event and semantic message streams
Language: English | 中文
One user said, "Socket.D is to Socket what Vue is to Js and Mvc is to Http."
- Event-based, each message can be event-routed
- The so-called semantics is described by the meta-information
- Stream dependency, where related messages are strung together in a stream
- Language independent, binary transport (tcp, ws, udp) Support multi-language, multi-platform
- Disconnection reconnection, automatic connection restoration
- Multiplexing, allowing multiple request and response messages to run simultaneously on a single connection
- Two-way communication, single link two-way listening and sending
- Automatic sharding,Data over 16Mb (configurable) will be automatically split and reassembled (except udp)
- Simple interface, reactive but with callback interface
comparison | socket.d | http | websocket | rsocket | socket.io |
---|---|---|---|---|---|
Send (Qos0) | Yes | No | Yes | Yes | Yes |
SendAndRequest (Qos1) | Yes | Yes | No | Yes | No |
SendAndSubscribe (stream) | Yes | No | No | Yes | No |
Reply or respond | Yes | Yes | No | Yes | No |
Single connection two-way communication | Yes | No | Yes(trouble) | Yes | Yes(trouble) |
Data sharding | Yes | / | No | Yes | Yes |
Disconnection automatically reconnect | Yes | / | No | Yes | Yes |
Meta information | Yes | Yes | No | Yes | No |
Event(or path) | Yes | Yes | No | No | Yes |
StreamId (or message correlation) | Yes | No | No | Yes | No |
Broker pattern cluster | Yes | No | No | Yes | No |
Asynchronous | Async | Sync | Async | Async | Async |
Interface experience | Classic | Classic | Classic | Reactive(trouble) | Classic |
Basic transport protocol | tcp, udp, ws | tcp | http | tcp, udp, ws | ws |
It can be used for MSG, RPC, IM, MQ and other scenarios, and can replace Http, Websocket, gRpc and other protocols. Such as the connection between the mobile device and the server, such as some microservice scenarios, etc.
- Connection address style
sd:tcp://19.10.2.3:9812/path?u=noear&t=1234
sd:udp://19.10.2.3:9812/path?u=noear&t=1234
sd:ws://19.10.2.3:1023/path?u=noear&t=1234
- Frame code structure
//udp only <2k
[len:int][flag:int][sid:str(<64)][\n][event:str(<512)][\n][metaString:str(<4k)][\n][data:byte(<16m)]
QQ communication group:870505482 | Wechat Communication group (input: SocketD when applying) |
---|---|
In the communication group, "nanny level" support and help are provided. Technical training and consultancy services are also available if required