List Info

Thread: "ocaml_beginners"::[] mixed ocaml and obj-c development, data exchange




"ocaml_beginners"::[] mixed ocaml and obj-c development, data exchange
country flaguser name
Switzerland
2008-03-21 07:03:30

Hello,

On Mac OS-X, what would you use for doing mixed obj-c and ocaml
programming, for example an obj-c process for the GUI, and an
ocaml process for back-end processing.

More specifically, I'm looking for IPC and data exchange
mechanism.

- pipe with handcrafted marshall/unmarshalling of data to exchange.
lots of time spilled on programming boring marshalling stuff.
- the same using something like ICE / Hydro: heavy XML parsing
if you want to exchange loads of data to be displayed in
real-time with open-gl for example.
- YAML: a bit lighter, but still text based, I think a binary
format would be more compact and lighter to convert.
Syck seems somewhat unmaintained now.

- Shared mem and procedures to convert between C/ObjC and OCaml
data representation?

I'm definitively looking for something light for the CPU and easy to
program.

Thanks.

--
Philippe Strauss
av. de Beaulieu 25
1004 Lausanne
http://philou.ch

__._,_.___
.

__,_._,___
Re: "ocaml_beginners"::[] mixed ocaml and obj-c development, data exchange
country flaguser name
United Kingdom
2008-03-21 10:46:12

On Fri, Mar 21, 2008 at 01:03:30PM +0100, Philippe Strauss wrote:
> More specifically, I'm looking for IPC and data exchange
> mechanism.

How much data are you going to be throwing around?

Mainly binary or text?

What RPC/marshalling capabilities does Objective C have?

There's a timely thread on caml-list at the moment called 'Long-term
storage of values', although it hasn't yet reached the caml-list
archives. If you are on caml-list I suggest looking at the latest
postings in that thread.

> - pipe with handcrafted marshall/unmarshalling of data to exchange.
> lots of time spilled on programming boring marshalling stuff.
> - the same using something like ICE / Hydro: heavy XML parsing
> if you want to exchange loads of data to be displayed in
> real-time with open-gl for example.
> - YAML: a bit lighter, but still text based, I think a binary
> format would be more compact and lighter to convert.
> Syck seems somewhat unmaintained now.
>;
> - Shared mem and procedures to convert between C/ObjC and OCaml
> data representation?

XDR is another possibility. It's lightweight and standardized,
although last time I looked Mac OS X's rpcgen was seriously rubbish.
You might try PortableXDR instead:

http://et.redhat.com/~rjones/portablexdr/

Rich.

--
Richard Jones
Red Hat

__._,_.___
.

__,_._,___
Re: "ocaml_beginners"::[] mixed ocaml and obj-c development, data exchange
country flaguser name
Switzerland
2008-03-22 09:54:32

On Fri, Mar 21, 2008 at 03:46:12PM +0000, Richard Jones wrote:
> On Fri, Mar 21, 2008 at 01:03:30PM +0100, Philippe Strauss wrote:
> > More specifically, I'm looking for IPC and data exchange
> > mechanism.
>
> How much data are you going to be throwing around?
>
> Mainly binary or text?
>
> What RPC/marshalling capabilities does Objective C have?

data bandwidth: let say 1000 * float32, 100 times per seconds, it's just
a rough estimation.

I think a binary format consume less CPU resource to parse, I mean a fairly
simple binary format, like C + endianness correction. BER/DER are
probably not any better than binary->;text coding, so let's go
for a binary format.

Obj-C Marshalling/unmarshalling:
http://en.wikipedia.org/wiki/Serialization#Objective-C
http://opengrok.creo.hu/openbsd/xref/src/gnu/lib/libobjc/libobjc/objc/typedstream.h

> There's a timely thread on caml-list at the moment called 'Long-term
> storage of values', although it hasn't yet reached the caml-list
> archives. If you are on caml-list I suggest looking at the latest
> postings in that thread.

thanks for the tip, will look at it when archived.

> > - pipe with handcrafted marshall/unmarshalling of data to exchange.
> > lots of time spilled on programming boring marshalling stuff.
> > - the same using something like ICE / Hydro: heavy XML parsing
> > if you want to exchange loads of data to be displayed in
> > real-time with open-gl for example.
> > - YAML: a bit lighter, but still text based, I think a binary
> > format would be more compact and lighter to convert.
> > Syck seems somewhat unmaintained now.
>; >
> > - Shared mem and procedures to convert between C/ObjC and OCaml
> > data representation?
>;
> XDR is another possibility. It's lightweight and standardized,
> although last time I looked Mac OS X's rpcgen was seriously rubbish.
> You might try PortableXDR instead:
>
> http://et.redhat.com/~rjones/portablexdr/

thanks.

--
Philippe Strauss
av. de Beaulieu 25
1004 Lausanne
http://philou.ch

__._,_.___
.

__,_._,___
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )