Skip to content

Commit

Permalink
Stub README file and update editorconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
tnajdek committed Jul 19, 2015
1 parent 8f845e9 commit 026be1f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,10 @@ indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true

[*.yml]
indent_style = space
indent_size = 2

[*]
indent_style = tab
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#Schema Messages

[![Build Status](https://travis-ci.org/tnajdek/schema-messages-python.svg?branch=master)](https://travis-ci.org/tnajdek/schema-messages-python)

Schema Messages creates binary representation of structured data that can be efficiently transmitted over network. Anticipated for use in applications where identical structure messages are transmitted repeatively, e.g. in games. For example sending the following message:

{
'player_id': 42,
'position_x': 123.45,
'position_y': 6789.21
}

Would take 64 bytes to transfer using raw json, 52 bytes using [msgpack](http://msgpack.org/) and only 10 bytes using Schema Messages which would look something like this:

01 2A 42 F6 E6 66 45 D4 29 AE

However bear in mind that to encode/decode the message on either end, one needs a schema which would look something like this:

{
"FrameMessage": {
"format": {
"position_x": "float",
"position_y": "float",
"player_id": "ubyte"
}
}
}

Schemas **must** be pre-shared on both ends for communication to works.

0 comments on commit 026be1f

Please sign in to comment.