MessagePack
FlatBuffers
Our great sponsors
MessagePack | FlatBuffers | |
---|---|---|
22 | 44 | |
1,336 | 20,074 | |
0.6% | 1.5% | |
7.5 | 9.3 | |
1 day ago | about 20 hours ago | |
Java | C++ | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
MessagePack
-
What is the fastest way to encode the arbitrary struct into bytes?
so appreciate such a detailed reply, thanks. btw, why did you choose tinylib/msgp from 4 available go-impls?
-
Using Arduino as input to Rust project (help needed)
If you find you're running the serial connection at maximum speed and it's still not fast enough, try switching to a more compact binary encoding that has both Serde and Arduino implementations, like MsgPack... though I don't remember enough about its format off the top of my head to tell you the easiest way to put an unambiguous header on each packet/message to make the protocol self-synchronizing.
-
Java Serialization with Protocol Buffers
The information can be stored in a database or as files, serialized in a standard format and with a schema agreed with your Data Engineering team. Depending on your information and requirements, it can be as simple as CSV, XML or JSON, or Big Data formats such as Parquet, Avro, ORC, Arrow, or message serialization formats like Protocol Buffers, FlatBuffers, MessagePack, Thrift, or Cap'n Proto.
-
Multiplayer Networking Solutions
MessagePack Similar to JSONs, just more compact, although not as much as the ones above. Still, it's usefull to retain some readability in your messages.
-
GitHub - realtimetech-solution/opack: Fast object or data serialize and deserialize library
First of all, you're comparing this to GSON and Kryo, how does it compare to Msgpack, fast-serialization, but also Elsa and I'm sure, many others? Are there any limitations and/or trade-offs?
-
Optimal dispatcher for json messages ?
Upvote for msgpack, one of the great undervalued message protocols available.
-
Rust is just as fast as C/C++
I have two suggestions Capnproto, MessagePack (those are only the two examples that came to mind first, i bet there are even one or two especially developed for rust). Both of these are better than json in nearly every way.
-
msgspec - a fast & friendly JSON/MessagePack library
Encode messages as JSON or MessagePack.
-
Advanced MessagePack capabilities
If you've ever inquired about MessagePack before, you probably know the phrase from its official website, msgpack.org: "It's like JSON, but fast and small." In fact, if you compare how much memory space the same data occupies in JSON and MessagePack, you'll see why the latter is a much more compact format. For example, the number 100 takes 3 bytes in JSON and only 1 in MessagePack. The difference becomes more significant as the number's order of magnitude grows. For the maximum value of int64 (9223372036854775807), the size of the stored data differs by as much as 10 bytes (19 against 9)! The same is true for boolean values---4 or 5 bytes in JSON against 1 byte in MessagePack. It is also true for arrays because many syntactic symbols---such as commas separating the elements, semicolons separating the key-value pairs, and brackets marking the array limits---don't exist in binary format. Obviously, the larger the array is, the more syntactic litter accumulates along with the payload. String values, however, are a little more complicated. If your strings don't consist entirely of quotation marks, line feeds, and other special symbols that require escaping, then you won't see a difference between their sizes in JSON and in MessagePack. For example, "foobar" has a length of 8 bytes in JSON and 7 in MessagePack. Note that the above only applies to UTF-8 strings. For binary strings, JSON's disadvantage against MessagePack is obvious.
-
LIVE: Otimizando aplicações .NET com MessagePack.
Site oficial do MessagePack
FlatBuffers
- QuickBuffers 1.1 released
-
Choosing a protocol for communication between multiple microcontrollers
Or, as an alternative to protobuffers, there's also flatbuffers, which is lighter weight and needs less memory: https://google.github.io/flatbuffers/
-
Ask HN: What happened to flatbuffers? Are they being used?
A few years ago, their was a talk about flatbuffers[0] being a memory efficient and quicker method than JSON.
Anyone have any real world experience with it?
[0] https://github.com/google/flatbuffers
-
HOW TO: Extract Game Files for Scarlet/Violet!!!
Click HERE and HERE. Download both files, and extract the .ZIPs anywhere.
-
Java Serialization with Protocol Buffers
The information can be stored in a database or as files, serialized in a standard format and with a schema agreed with your Data Engineering team. Depending on your information and requirements, it can be as simple as CSV, XML or JSON, or Big Data formats such as Parquet, Avro, ORC, Arrow, or message serialization formats like Protocol Buffers, FlatBuffers, MessagePack, Thrift, or Cap'n Proto.
- Scriptable Headless Player Bots and independent ECS in a Custom UE C++ Server for MMO(RPG)s.
-
Multiplayer Networking Solutions
FlatBuffer also developed by Google. It's used by Cocos2d-x, a game engine , as serialization protocol, instead of JSON / XML / YAML.
-
C++ Jobs - Q4 2022
Flatbuffers
-
Ask HN: What interesting problems are you working on? ( 2022 Edition)
- Moved files: How to not lose all customized information (rating, playlists, playcount, etc.) when a file gets moved to another place?
Many filesystems try to solve the same problem (eg: customize the appearance of files in a particular folder [1]). One solution is adding extended file attributes [2], however this might not be supported on all operating systems.
[1] https://en.wikipedia.org/wiki/.DS_Store
[2] https://en.wikipedia.org/wiki/Extended_file_attributes
A slower but more portable solution might be content-addressable storage. Basically, create a directory containing just metadata files for each song. Name each file as the SHA256 sum of the associated music file, and put metadata into it in a binary format like flatbuffers [3] or Cap'n Proto [4] or a plaintext format like TOML [5] if you prefer to make the system human-editable at the cost of lower performance. Even after moving a file to another location, the SHA256 sum of the file should not change.
Note that if you have duplicated files, then there might be hash collisions where you'll have to reconcile metadata differences (or you can just merge the metadata together, keeping attributes with the later timestamp). There are various solutions to this as well like building a parallel directory structure which mirrors your music filesystem, but that can get complicated.
[3] https://google.github.io/flatbuffers/
- File-Watchers: How to prevent fully indexing the filesystem over and over again and only react to changes?
When first loading a directory of music into the program, build a merkle tree [6] of the files' hashes and save them to the content-addressable storage directory described above if they do not already exist. Once indexing is complete, serialize the merkle trees for each directory as well, this way the next time the program starts, you can just load these up and check for consistency of the files in the background. Then set up FileSystemWatcher [7] to notify you when the contents of a directory changes, and update the metadata files and merkle trees accordingly.
[6] https://en.wikipedia.org/wiki/Merkle_tree
[7] https://stackoverflow.com/questions/721714/notification-when...
-
Faster Protocol Buffers
My go-to for needing to deserialize structured data in a fast way these days is flatbuffers[1]. It compacts nicely and more importantly is zero copy/allocation(within the constraints of your language where possible) in deserialize. Which lets you do neat things like mmap it from disk.
We used to store 20-30mb of animation data with it and we'd just mmap the whole file and let the kernel handle paging it in/out, worked great.
I don't know how up to date their benchmarks[2] are but my experience has been that it beats almost every other off-the-shelf solution(other than maybe capn-proto which has some similar properties).
[1] https://google.github.io/flatbuffers/
[2] https://google.github.io/flatbuffers/flatbuffers_benchmarks....
What are some alternatives?
Protobuf - Protocol Buffers - Google's data interchange format
MessagePack - MessagePack implementation for C and C++ / msgpack.org[C/C++]
cereal - A C++11 library for serialization
Cap'n Proto - Cap'n Proto serialization/RPC system - core tools and C++ library
Kryo - Java binary serialization and cloning: fast, efficient, automatic
SBE - Simple Binary Encoding (SBE) - High Performance Message Codec
Boost.Serialization - Boost.org serialization module
Bond - Bond is a cross-platform framework for working with schematized data. It supports cross-language de/serialization and powerful generic mechanisms for efficiently manipulating data. Bond is broadly used at Microsoft in high scale services.
Apache Arrow - Apache Arrow is a multi-language toolbox for accelerated data interchange and in-memory processing