Why DCodec?


Message exchanges are a ubiquitous part of our daily lives and surroundings. All messages, from simple ones, such as signaling that you switched ON a light, to complex ones, such as a mobile device handover from one cell tower to another, are composed and parsed according to a definition.

Initially, a protocol structure is defined “casually” in your application data model (i.e. without a formal schema). Later, as the protocol grows in complexity, you move towards a more formal schema. This typically implies a more “rigid” way of handling messages, where deviations from the schema-defined structure are not acceptable. However, in many communication scenarios, you want to handle schema deviations without breaking the communication,i.e.,

What if you could enjoy the best of both worlds, i.e., preserve the JSON-like flexibility you are used to, while taking advantage of the power of a schema? All this with an added bonus of an easy transition to binary, should you need it.

This is where OSS’ Dynamic Codec (DCodec) comes in. The DCodec offers:

  • A simple, yet powerful API that minimizes the amount of serialization code you need to write and maintain
  • Support for serializing/deserializing dynamic or user-provided C# objects
  • Data validation against a schema

To Code or Not to Code?

If you wonder whether you should develop your own encoder/decoder or use an existing one, consider the following.
"Any exploration program which "just happens" to include a new launch vehicle is, de facto, a launch vehicle program." Akin's Laws
Paraphrasing the above: "any project that includes writing an encoder/decoder, becomes, de facto, an encoder/decoder project".

  • Standardized schema support (ASN.1)
  • A smooth transition from schema-less to schema-based
  • Ability to decode only the message fields that are of interest
  • A powerful way to easily handle mismatches between the schema, the bindings, and the message (e.g., when messages are encoded with different versions of the schema), so that the application can handle both conflicts and unknown fields (log, mine for patterns, etc.)
  • An effortless way to switch between JSON and binary messages (ASN.1 Distinguished Encoding Rules)
  • 24x7 technical support