All Projects → esseswann → graphql-binary

esseswann / graphql-binary

Licence: other
GraphQL binary protocol for smaller network traffic and parsing performance

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to graphql-binary

libcluon
libcluon is a small and efficient, single-file and header-only library written in modern C++ to power microservices.
Stars: ✭ 81 (+97.56%)
Mutual labels:  protobuf, msgpack
Cpp Serializers
Benchmark comparing various data serialization libraries (thrift, protobuf etc.) for C++
Stars: ✭ 533 (+1200%)
Mutual labels:  protobuf, msgpack
luban
你的最佳游戏配置解决方案 {excel, csv, xls, xlsx, json, bson, xml, yaml, lua, unity scriptableobject} => {json, bson, xml, lua, yaml, protobuf(pb), msgpack, flatbuffers, erlang, custom template} data + {c++, java, c#, go(golang), lua, javascript(js), typescript(ts), erlang, rust, gdscript, protobuf schema, flatbuffers schema, custom template} code。
Stars: ✭ 1,660 (+3948.78%)
Mutual labels:  protobuf, msgpack
Xresloader
跨平台Excel导表工具(Excel=>protobuf/msgpack/lua/javascript/json/xml)
Stars: ✭ 161 (+292.68%)
Mutual labels:  protobuf, msgpack
homebrew-extensions
🍻 Homebrew tap for PHP extensions
Stars: ✭ 264 (+543.9%)
Mutual labels:  protobuf, msgpack
ormsgpack
Msgpack serialization/deserialization library for Python, written in Rust using PyO3 and rust-msgpack. Reboot of orjson. msgpack.org[Python]
Stars: ✭ 88 (+114.63%)
Mutual labels:  msgpack
minipb
Mini Protobuf {,de}serializer
Stars: ✭ 34 (-17.07%)
Mutual labels:  protobuf
cq
Clojure Command-line Data Processor for JSON, YAML, EDN, XML and more
Stars: ✭ 111 (+170.73%)
Mutual labels:  msgpack
CSGO-Item-Floats-From-Inspect-Links
cuz bored as fuck, how to get the item floats from inspect links aka the market float "method"
Stars: ✭ 53 (+29.27%)
Mutual labels:  protobuf
pbkit
protobuf toolkit for typescript and others
Stars: ✭ 173 (+321.95%)
Mutual labels:  protobuf
odin
Data-structure definition/validation/traversal, mapping and serialisation toolkit for Python
Stars: ✭ 24 (-41.46%)
Mutual labels:  msgpack
protocol
The schemas for the Harmony protocol
Stars: ✭ 16 (-60.98%)
Mutual labels:  protobuf
bloomrpc-mock
Toolset library for working with GRPC mocks
Stars: ✭ 25 (-39.02%)
Mutual labels:  protobuf
pandas-msgpack
Pandas Msgpack
Stars: ✭ 22 (-46.34%)
Mutual labels:  msgpack
sisyphus
Sisyphus is the way how we provide backend services.
Stars: ✭ 59 (+43.9%)
Mutual labels:  protobuf
gosmparse
Processing OpenStreetMap PBF files at speed with Go
Stars: ✭ 55 (+34.15%)
Mutual labels:  protobuf
twjitm-core
采用Netty信息加载实现长连接实时通讯系统,客户端可以值任何场景,支持实时http通讯、webSocket通讯、tcp协议通讯、和udp协议通讯、广播协议等 通过http协议,rpc协议。 采用自定义网络数据包结构, 实现自定义网络栈。
Stars: ✭ 98 (+139.02%)
Mutual labels:  protobuf
zerorpc-dotnet
A .NET implementation of ZeroRPC
Stars: ✭ 21 (-48.78%)
Mutual labels:  msgpack
agentgo
Hi! Agentgo is a tool for making remote command executions from server to client with golang, protocol buffers (protobuf) and grpc.
Stars: ✭ 15 (-63.41%)
Mutual labels:  protobuf
protostuff-example
Experimenting protostuff
Stars: ✭ 13 (-68.29%)
Mutual labels:  protobuf

GraphQL Binary

GraphQL Binary protocol packs and unpacks GraphQL query into a schema-tied ByteArrays which allows up to 5x traffic reduction and significant parsing (unpack stage) performance boost

Moreover the response is also optimised by removing the keys, storing integers in bytes, having c-like strings\arrays and so on similarly to Protobuf in terms of schema and to MessagePack in terms of values encoding

For some developrs the most interesting feature is encoding\decoding custom types, e.g. Date type with seconds precision taking only 4 bytes

Stage

This project is currently in proof on concept stage. We have no intent on supporting Union and Interface types in the first release. Fragments will be inlined for multiple reasons

Concept

query BasicQuery {
  int
  float
  boolean
  string
  withArgs (
    int: 1
    boolean: true
    string: "string"
  )
  map {
    id
    map {
      id
      map {
        id
      }
    }
  }
}

is converted to this

Uint8Array(30) [
  0, 1, 2, 3, 5, 6, 1, 1, 8, 1,
  195, 9, 7, 166, 115, 116, 114, 105, 110, 103,
  4, 0, 1, 0, 1, 0, 255, 255, 255, 255
]

by using a GraphQL schema where each Field is assigned a 8-bit integer index starting from top level Type definitions and boiling down to each individual type. Obviously it can be optimised yet

Usage ⚗️

Clone repository and execute

yarn && yarn dev <file you want to be working on>

Then after you're finished

yarn test

Don't forget to force Jest to rerun tests by inputting a in the Jest console

Limitations

Currently the implementation will break if schema contains a type that has more than 255 fields

Support

All contributions are warmly welcome. Please follow issues section or consider these:

  • Test coverage compatible to graphql-js
  • Documentation
  • Ports for other languages

Please follow the Functional style

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].