42 Star 420 Fork 98

GVPnoear / socket.d

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README_EN.md 5.65 KB
一键复制 编辑 原始数据 按行查看 历史
西东 提交于 2024-05-12 10:23 . README

Network application protocol based on event and semantic message streams

https://socketd.noear.org

Latest-Version Apache 2.0 Java-8~22 Kotlin-8+ JavaScript-es6+ Python-3.10+
gitee star github star


Language: English | 中文

One user said, "Socket.D is to Socket what Vue is to Js and Mvc is to Http."

Main Features

  • 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

Simple comparison with other protocols

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

Applicable scene

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.

Simple protocol description( See more here:official website )

  • 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)]

Join a community exchange group

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

Official website

https://socketd.noear.org

Special thanks to JetBrains for supporting the open source project

JetBrains
Java
1
https://gitee.com/noear/socket.d.git
git@gitee.com:noear/socket.d.git
noear
socket.d
socket.d
main

搜索帮助