GraphQL | ion | proto bufs | json | capnproto | jsonschema | cbro | MsgPack | avro | thrift | lave | ljson | jsonet | flatbuffers | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
type | plain/binary | binary | plain | binary | plain | binary | binary | binary | binary | plain | plain | plain | binary | |
schema | + | - | + | + | - | - | + | + | ||||||
Zero-copy | - | - | + | - | +/- | - | - | - | + | |||||
Random-access reads | - | - | + | - | - | - | - | + | ||||||
Safe against malicious input | + | + | + | |||||||||||
Schema language | + | custom | - | custom | JSON | - | - | Avro IDL | - | - | - | custom | ||
Null | + | + | + | + | + | + | + | + | ||||||
Not null | + | |||||||||||||
ineteger | + | + | + | + | + | + | + | + | + (32, 64) | + | + | + | + | + |
string | + | + | + | + | + | + | + | + | + | |||||
float | + | + | + | + | + | + (32, 64) | + | + | + | |||||
bigdecimal | - | + | -(ext) | + | - | - | - | |||||||
timestamp | + | - | + | -(ext) | + | - | - | |||||||
binary | + | - | + | + | - | - | ||||||||
s-exp | + | - | - | - | - | - | - | - | ||||||
array | + | + | + | + | + | + | + | + | ||||||
object/map | + | + | + | + | + | + | + | + | ||||||
boolean | + | + | + | + | + | + | + | + | ||||||
functions | - | - | - | + | + | - | ||||||||
Graph/Circular/Relational data | + (s-exp) | - | - | - | + | + | ||||||||
Enum | + | + | ||||||||||||
Union | + | |||||||||||||
ID | + | |||||||||||||
URI | + | |||||||||||||
Regexp | + | |||||||||||||
comments | - | - | - | - | - | - | - | - | ||||||
human-readable | + | - | + | - | + | - | - | - | - | + | + | + | - | |
human-writable | - | - | - | - | - | - | - | - | - | - | - | - | - | |
streaming | +/- | +/- | +/- | +/- | +/- | |||||||||
user defined types | + | - | + |
Last active
October 24, 2017 15:52
-
-
Save stereobooster/6111b0f9c42ca9a6e3a53f5c56059333 to your computer and use it in GitHub Desktop.
REST-GRPC-GraphQL-etc
- https://github.com/multiformats
- https://mjambon.github.io/atdgen-doc/
- https://github.com/deanlandolt/typewise
- https://amzn.github.io/ion-docs/index.html
- https://developers.google.com/protocol-buffers/
- http://avro.apache.org/docs/current/spec.html
- https://capnproto.org/encoding.html
- https://capnproto.org/news/2014-06-17-capnproto-flatbuffers-sbe.html
- http://cbor.io/spec.html
- https://github.com/msgpack/msgpack/blob/master/spec.md
- http://bert-rpc.org/
- http://bsonspec.org/
- http://ubjson.org/
- https://en.wikipedia.org/wiki/Comparison_of_data_serialization_formats
- https://indico.cern.ch/event/495700/contributions/2015963/attachments/1227460/1797761/ser.pdf
- https://www.sitepoint.com/choosing-right-serialization-format/
- https://github.com/MaiaVictor/LJSON
- https://github.com/jed/lave
- http://jsonnet.org/
- https://github.com/benjamn/arson
- http://json-schema.org/
- https://spacetelescope.github.io/understanding-json-schema/
- https://tools.ietf.org/html/rfc4627
- http://zeromq.org/blog:zero-copy
- http://nanomsg.org/documentation.html
- https://hguemar.fedorapeople.org/slides/nanomsg/presentation.html#slide16
- https://blog.ometer.com/2015/09/07/json-like-config-a-spectrum-of-underoverengineering/
- https://hjson.org/
- http://www.yaml.org/spec/1.2/spec.html
- https://github.com/toml-lang/toml#user-content-spec
- https://olegilyenko.github.io/presentation-graphql-type-system-for-your-api/#/19
- https://blog.runscope.com/posts/you-might-not-need-graphql
- https://dev-blog.apollodata.com/new-features-in-graphql-batch-defer-stream-live-and-subscribe-7585d0c28b07
- https://www.howtographql.com/basics/2-core-concepts/
- https://github.com/sangria-graphql/sangria-msgpack
- https://github.com/OlegIlyenko/sangria-tcp-msgpack-example
- https://gist.github.com/OlegIlyenko/a5a9ab1b000ba0b5b1ad
- graphql/graphql-js#585 (comment)
- https://grpc.io/
- https://github.com/grpc-ecosystem/grpc-gateway
- https://github.com/Helmsen/gRPC-to-GraphQL-Adapter
- https://github.com/improbable-eng/grpc-web
- https://godoc.org/google.golang.org/grpc/codes
- https://apievangelist.com/2017/03/31/rest-linked-data-hypermedia-graphql-and-grpc/
- http://jsonapi.org/
- http://jsonapi.org/faq/
- http://stateless.co/hal_specification.html
- https://jwt.io/
- https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm
- https://tools.ietf.org/html/rfc6901
- https://mmikowski.github.io/json-pure/
- https://thrift.apache.org/docs/concepts
- https://http2.github.io/
- https://www.chromium.org/quic
- https://github.com/google/brotli
- https://google.github.io/snappy/
- https://github.com/interagent/http-api-design/blob/master/en/SUMMARY.md
- https://github.com/gocardless/http-api-design
- https://github.com/18F/api-standards
- https://brandur.org/heroku-values
- https://www.confluent.io/blog/turning-the-database-inside-out-with-apache-samza/
- http://nathanmarz.com/blog/how-to-beat-the-cap-theorem.html
- https://www.oreilly.com/ideas/questioning-the-lambda-architecture
- https://www.coursera.org/learn/cloud-applications-part2/lecture/c5L4Y/3-4-2-lambda-and-kappa-architecture
- https://martinfowler.com/bliki/CQRS.html
- Trees - special case of Directed Acyclic Graphs (DAG), node can have only one parrent
- Directed Acyclic Graphs
- General cyclic graphs
- Embeding everything, like HAL. Not able to represent cyclic graphs
- Flattening strategy plus path/IDs, like JSON API, jsonet, lave, arson
- http://www.opencypher.org/
- http://pgql-lang.org/
- https://arxiv.org/abs/1610.06264
- http://react-etc.net/entry/graph-query-languages-graphql-opencypher-gremlin-and-sparql
- https://docs.dgraph.io/master/query-language/ graph query vaersion of GraphQL
- also http://www.andl.org/2016/04/postgres-meet-andl/
- https://qconnewyork.com/system/files/presentation-slides/graphql-qcon-pdf.pdf
REST | GraphQL | GRPC | JSON API | SQL' | |
---|---|---|---|---|---|
concept | CRUD | R from CRUD + RPC | RPC | CRUD | CRUD |
single/multiple entry points | multiple | single | single | multiple | single |
data format | not spec | any extensible | protobuf | json | custom |
data transport | HTTP | any | HTTP2 | HTTP | TCP |
Fetching Relationships | not specified | + | + | + | |
Inclusion of Related Resources | not specified | + | + | +/- | |
Sparse Fieldsets | not specified | + | + | + | |
Sorting | not specified | + | + | ||
Pagination | not specified | +/- | + | + | |
Filtering | not specified | + | + | + | |
Idempotence | not specified | - | |||
Schema | not specified | ? | + | JSONSchema | SQL |
Streaming | - | - | |||
Caching | + | - | |||
Authentication | basic/OAuth/etc | basic/OAuth/etc | basic/OAuth/etc | basic | |
Authorization | |||||
Transactions | - (stateless) | + | |||
Metadata" | headers | headers/? | + | ||
Browser support | + | + | +/- | + | - |
N+1 problem | + | - | +/- | - | +/- |
Graph querying | -? | -("GraphQL+-") | +/- | -? | - |
Data | not specified | graph | graph | tuples | |
Reactiveness | - | -(not yet) | - | - | - |
Not null | + |
' SQL is for comparison. The point is that we just keep reinventing SQL agaian and again
" Metadata - Request-Id, info about rate limit, etc.
Resourcefull API is like SQL, as soon as you define resource you get CRUD and all other goodnes like, pagination, sparse fields, etc
- CRUD
CREATE
,SELECT
,UPDATE
,DELETE
- sparse fileds:
SELECT a,b
- pagination
LIMIT
, or cursors - sorting
SORT BY
- filtering
WHERE
- schema
CREATE TABLE
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment