Re: [xml-dev] Using XML (or JSON) for inter-thread communication

From
John Cowan <>
To
Pete Cordell <>
Date
2012-03-19T13:57:45Z
ID
<>
Thread
Re: [xml-dev] Using XML (or JSON) for inter-thread communication
Pete Cordell scripsit:

> Which makes me wonder, can you compress the 'web services' model down to 
> the level of threads and use XML or JSON for your inter-thread 
> communication? Can you define your interfaces using some sort of schema 
> and use REST or similar approaches?  Would this help simplify parallel 
> programming, perhaps as one of a basket of techniques?

All that parsing and unparsing would be expensive: you might as well deal
in binary immutable objects instead.  But otherwise the idea is good and
has been in use for decades (Unix pipelines being the best-known example).
The key is to share nothing except immutable objects.

See Flow-Based Programming, a framework based on passing around immutable
packets between components (there are Java, C#, and C++ versions) at
http://www.jpaulmorrison.com/fbp/ .

-- 
John Cowan    http://ccil.org/~cowan
If I have not seen as far as others, it is because giants were standing
on my shoulders.
        --Hal Abelson