Coder Social home page Coder Social logo

hobbits's Introduction

Hobbits, or There and Back Again: A Lightweight, Multiclient Wire Protocol For Web3 Communications

Contributing

Please create issues to document your critiques, suggestions, improvements, etc. We will use it as a discussion funnel to refine this specification and move forward towards a stable 1.0

0.1 EWP (Ethereum Wire Protocol)

command

may contain any uppercase letter or digit or _ to describe the command

compression preference

the first preference field is describing the compression codec of the request headers & body in all lowercase letters or digits or _

the second preference field is the list of supported compression codecs for the response in order from most preferred to least preferred separated by commas and preferences in all lowercase letters or digits or _

none can be specified to indicate no compression is to be used on the header or body data.

headers and body

headers and body are both BSON data payloads which are separately compressed and encoded -- the idea is to keep the headers lightweight so packets can be partially processed without having to decode the whole body in every case.

examples

example of a wire protocol message

ping

# Request (empty headers and body)
EWP 0.1 PING none none 0 0

# Response
200 none 0 0

hello

# Request (empty headers, bson body)
EWP 0.1 HELLO deflate gzip,snappy 0 1234
<1234 bytes of deflate compressed binary bson body data>
# Response
200 gzip 321 1234
<321 bytes of gzip compressed binary bson header data>
<1234 bytes of gzip compressed binary bson body data>

# Request (no compression, bson headers, bson body)
EWP 0.1 HELLO none none 321 1234
<321 bytes of binary bson header data>
<1234 bytes of binary bson body data>
# Response
200 none 0 0

hobbits's People

Contributors

dreamcodez avatar n8wb avatar gregthegreek avatar

Watchers

James Cloos avatar Dean Eigenmann avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.