Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IDL-like parser that turns a document definition into powerful classes? [closed]

I am looking for an IDL-like (or whatever) translator which turns a DOM- or JSON-like document definition into classes which

  • are accessible from both C++ and Python, within the same application
  • expose document properties as ints, floats, strings, binary blobs and compounds: array, string dict (both nestable) (basically the JSON type feature set)
  • allow changes to be tracked to refresh views of an editing UI
  • provide a change history to enable undo/redo operations
  • can be serialized to and from JSON (can also be some kind of binary format)
  • allow to keep large data chunks on disk, with parts only loaded on demand
  • provide non-blocking thread-safe read/write access to exchange data with realtime threads
  • allow multiple editors in different processes (or even on different machines) to view and modify the document

The thing that comes closest so far is the Blender 2.5 DNA/RNA system, but it's not available as a separate library, and badly documented.

I'm most of all trying to make sure that such a lib does not exist yet, so I know my time is not wasted when I start to design and write such a thing. It's supposed to provide a great foundation to write editing UI components.

like image 397
paniq Avatar asked Jun 14 '10 20:06

paniq


People also ask

What is parser mean?

Definition of parser : one that parses specifically : a computer program that breaks down text into recognized strings of characters for further analysis.

Why do we parse?

Fundamentally parsing is necessary because different entities need the data to be in different forms. Parsing allows to transform data in a way that can be understood by a specific software. The obvious example are programs: they are written by humans, but they must be executed by computers.


1 Answers

ICE is the closest product I could think of. I don't know if you can do serialization to disk with ICE, but I can't think of a reason why it wouldn't. Problem is it costs $$$. I haven't personally negotiated a license with them, but ICE is the biggest player I know of in this domain.

Then you have Pyro for python which is Distributed Objects only.

Distributed Objects in Objective-C (N/A for iPhone/iPad Dev, which sucks IMHO)

There are some C++ distributed objects libraries but they're mostly dead and unusable (CORBA comes to mind).

I can tell you that there would be a lot of demand for this type of technology. I've been delving into some serialization and remote object stuff since off-the-shelf solutions can be very expensive.

As for open-source frameworks to help you develop in-house, I recommend boost::asio's strands for async thread-safe read/write and boost::serialization for serialization. I'm not terribly well-read in JSON tech but this looks like an interesting read.

I wish something freely available already existed for this networking/serialization glue that so many projects could benefit from.

like image 131
manifest Avatar answered Sep 28 '22 05:09

manifest