[erlang-questions] Maps & records: binding directly to bitstring comprehensions
Jesper Louis Andersen
jesper.louis.andersen@REDACTED
Fri Feb 7 13:47:22 CET 2014
On Thu, Feb 6, 2014 at 11:35 PM, Felix Gallo <felixgallo@REDACTED> wrote:
> I live in a world of pain wherein I receive 4K binary blob packets with a
> tightly packed schema that changes every few weeks.
For what it is worth, this is the root cause of the problem. If you have a
packet format that changes this often, you are probably better off
improving the packet encoding scheme than trying to parse it and adapt. You
need a format which has more framing so it can be parsed by recursively
stripping off more and more information. That is, you can decode the packet
partially and skip sections your parser doesn't understand yet.
Also beware coding complexity. If data is never placed at rest on disk,
then struggling to compress data with an intricate scheme is not going to
buy you anything since there tend to be enough bandwidth for these kind of
things. Decoding is going to dwarf everything else[0].
I would probably just wait a bit until the format settles and then go
implement it there.
[0] This describes almost everything that is wrong with JSON.
--
J.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140207/a5710469/attachment.htm>
More information about the erlang-questions
mailing list