Skip to Main Content
InterSystems Ideas

Have an idea, suggestion, or something that doesn’t work as expected in InterSystems products or services? Share it here on the InterSystems Ideas Portal.

The Ideas Portal is where community members can propose improvements, report bugs, and help influence the product roadmap across InterSystems products and the overall developer experience. 22% of submitted ideas are implemented by InterSystems or members of the Developer Community.

💡 Ideas and bugs are both welcome, no matter how big or small. You can submit feature requests, usability improvements, workflow suggestions, and bug reports. Whether you’re an experienced expert or just getting started, your fresh perspective is valuable.

🛠️ About bugs and fixes. If you have access to InterSystems WRC, please submit bugs there for immediate action. Bug reports submitted through the Ideas Portal are reviewed and tracked, but do not guarantee immediate resolution.

Start by sharing what could be better - the community and our teams will help take it from there.

Status Community Opportunity
Categories InterSystems IRIS
Created by Eduard Lebedyuk
Created on Jan 26, 2022

Parser for arbitrary binary protocols

Rapid growth of IoT industry in recent years produced a plethora of new protocols with varying levels of standardization and adoption.

Quite a lot of these protocols are binary because:

  • It allows for greater throughput

  • On a device level these protocols are easier to implement

  • On a device level they are more resource (CPU/RAM) efficient

Currently InterSystems IRIS offers several functions for work with binary data:

  • zzdump

  • $zhex

  • $char

  • $ascii

But protocol implementation is left as a task for the end user.

Removing the time-consuming need for protocol implementation would allow for easier and stronger positioning of InterSystems IRIS as an IoT platform.

One of the possible approaches to protocol implementation is declarative parsing. With declarative parsing user describes the data structure that he wants parsed (i.e.{ name: title, type: string, length: 5}...) in some declarative language (XML, JSON, YAML) and we use this to generate a concrete parser. Afterwards user passes protocol data to the concrete parser implementation and receives parsed values (as objects or locals or $lb).

Kaitai Struct is an OpenSource (MIT license) declarative parser implementation which allows user to generate parser code for several languages: C++, C#, Go, Java, JavaScript, Lua, Perl, PHP, Python, Ruby, Rust. It allows easy language extensibility by keeping most of the process language-agnostic and only the last step (concrete parser generation) is end-language specific.

I propose we add ObjectScript as a Kaitai Struct generation language. It would allow us to generate native ObjectScript parsers easily which would help with presenting InterSystems IRIS an IoT platform especially at a PoC stage.


Alternatives to Kaitai Struct:

The advantage of Kaitai Struct is that it's not aimed at one language form the beginning, so adding a new language is an expected procedure.


Article on the topic

  • ADMIN RESPONSE
    Aug 15, 2022

    Thank you for submitting the idea. The status has been changed to "Community Opportunity".

    Stay tuned!