All Projects → discord → Loqui

discord / Loqui

Licence: mit
RPC Transport Layer - with minimal bullshit.

Programming Languages

python
139335 projects - #7 most used programming language
rust
11053 projects
golang
3204 projects
elixir
2628 projects

Labels

Projects that are alternatives of or similar to Loqui

Elixir Thrift
A Pure Elixir Thrift Implementation
Stars: ✭ 182 (-10.34%)
Mutual labels:  rpc
Swoft Im
基于swoft-cloud的微服务架构,最小化拆分粒度,PHP7、多进程、协程、异步任务、mysql连接池、redi连接池、rpc连接池、服务治理、服务注册与发现、Aop切面、全注解
Stars: ✭ 189 (-6.9%)
Mutual labels:  rpc
Deepr
A specification for invoking remote methods, deeply!
Stars: ✭ 200 (-1.48%)
Mutual labels:  rpc
Doe
自己编写dubbo客户端实现rpc调用,在线调试dubbo接口、dubbo接口可视化测试、自动化测试工具。
Stars: ✭ 183 (-9.85%)
Mutual labels:  rpc
Magiconion
Unified Realtime/API framework for .NET platform and Unity.
Stars: ✭ 2,505 (+1133.99%)
Mutual labels:  rpc
Erpc
An efficient, extensible and easy-to-use RPC framework.
Stars: ✭ 2,274 (+1020.2%)
Mutual labels:  rpc
Nanorpc
nanorpc - lightweight RPC in pure C++ 17
Stars: ✭ 177 (-12.81%)
Mutual labels:  rpc
Autobahn Python
WebSocket and WAMP in Python for Twisted and asyncio
Stars: ✭ 2,305 (+1035.47%)
Mutual labels:  rpc
Buttonrpc cpp14
几百行代码实现的modern c++ rpc library
Stars: ✭ 187 (-7.88%)
Mutual labels:  rpc
Iot Dc3
IOT DC3 is an open source, distributed Internet of Things (IOT) platform based on Spring Cloud. It is used for rapid development of IOT projects and management of IOT devices. It is a set of solutions for IOT system.
Stars: ✭ 195 (-3.94%)
Mutual labels:  rpc
Activej
ActiveJ is an alternative Java platform built from the ground up. ActiveJ redefines web, high load, and cloud programming in Java, featuring ultimate performance and scalability!
Stars: ✭ 183 (-9.85%)
Mutual labels:  rpc
Bigfile
Bigfile -- a file transfer system that supports http, rpc and ftp protocol https://bigfile.site
Stars: ✭ 186 (-8.37%)
Mutual labels:  rpc
Rpc
Simple RPC style APIs with generated clients & servers.
Stars: ✭ 192 (-5.42%)
Mutual labels:  rpc
Deepr
A specification for invoking remote methods, deeply!
Stars: ✭ 181 (-10.84%)
Mutual labels:  rpc
Scpcb
SCP - Containment Breach
Stars: ✭ 199 (-1.97%)
Mutual labels:  rpc
Go Grpc Examples
This repo contains examples and implementations of different types of GRPC services and APIs using Golang.
Stars: ✭ 180 (-11.33%)
Mutual labels:  rpc
Fps Creator Classic
Source code and files for FPS Creator Classic
Stars: ✭ 188 (-7.39%)
Mutual labels:  rpc
Asio2
Header only c++ network library, based on asio,support tcp,udp,http,websocket,rpc,ssl,icmp,serial_port.
Stars: ✭ 202 (-0.49%)
Mutual labels:  rpc
Kekkonen
A remote (CQRS) API library for Clojure.
Stars: ✭ 201 (-0.99%)
Mutual labels:  rpc
Xian
reactive风格的微服务框架
Stars: ✭ 196 (-3.45%)
Mutual labels:  rpc

Loqui

Loqui is a transport that implements a very simple framing protocol over a raw socket. The framing protocol is similar to http2, except that we've chosen deliberately to not implement a bunch of stuff, like flow control. Instead, the RPC implements very simple request and response semantics. For our purposes, requests and responses are both adequately small so we can just send the entire payload in one frame, instead of having streams (like http2 does).

The RPC protocol does not care how you encode your data - treating all data passed through it as opaque binaries. However, the protocol does support encoding negotiation, and compression where the client sends the server a list of encodings it can speak and compression algos it can use, and the server picks the encoding and compression it wants to use. Compression can be toggled on a per frame basis with frame flags.

The protocol

The protocol is 9 opcodes, with a binary frame format.

Each frame starts with the opcode as an unsigned 8 bit integer (uint8). The opcodes are:

Name Value Client or Server Has Payload ?
HELLO 1 Client Yes
HELLO_ACK 2 Server Yes
PING 3 Both No
PONG 4 Both No
REQUEST 5 Client Yes
RESPONSE 6 Server Yes
PUSH 7 Both Yes
GOAWAY 8 Server Yes
ERROR 9 Server Yes

Following the opcode is the frame header - and then if applicable - the payload. All integers are encoded in Big Endian format.

Hello

The hello opcode is sent by the client to the server upon connecting. It advertises the client's Loqui version and a payload containing a a list of connection settings. Settings are in order and split by |and a specific setting can have a list of values split by ,. In our current version the 2 settings are supported encodings and supported compressions.

Offset Type Description
0 uint8 opcode
1 uint8 flags
2 uint8 Loqui Version
3 uint32 Payload Size
7 binary Payload Data

HelloAck

The helloAck opcode is sent by the server upon receiving hello from the client. It contains the interval in which the server will ping (and that it expects the client to ping the server) - and the supported encodings within the payload data, contains the encoding and compression separated by |.

Offset Type Description
0 uint8 opcode
1 uint8 flags
2 uint32 Ping Interval(ms)
6 uint32 Payload Size
10 binary Payload Data

Ping/Pong

Ping and pong are sent back between the client and server. Either end can initiate a ping - and both ends are expected to reply to a ping with a pong, with the seq that the remote end pinged with.

Offset Type Description
0 uint8 opcode
1 uint8 flags
2 uint32 Sequence Num

Request/Response

The client can send requests to the server. The server is expected to reply with a RESPONSE payload with the sequence set to request sequence.

Offset Type Description
0 uint8 opcode
1 uint8 flags
2 uint32 Sequence Num
6 uint32 Payload Size
10 binary Payload Data

Push

The client and server can send pushes to their remote connection. These are good for one off messages to the service that do not need to be acknowledged.

Offset Type Description
0 uint8 opcode
1 uint8 flags
2 uint32 Payload Size
6 binary Payload Data

Go Away

The server is getting ready to shut down the connection. It sends this opcode to tell the client end to finish sending requests and to disconnect. The payload data can be empty, or a string with an error message. Or whatever else you want it to be.

Offset Type Description
0 uint8 opcode
1 uint8 flags
2 uint16 close code
4 uint32 Payload Size
8 binary Payload Data

Error

The server had an internal error processing a given request for a specific seq.

Offset Type Description
0 uint8 opcode
1 uint8 flags
2 uint32 Sequence Num
6 uint16 error code
8 uint32 Payload Size
12 binary Payload Data
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].