Home   Archive   Permalink

How exactly would one do messaging?

I was cleaning out my desk and came across a printout of an email from Carl explaining how threads are evil and 'messaging' is the way to go. REBOL is advertised as a 'messaging language.' But I don't understand how one actually would DO 'messaging.' I assume it refers to small applications communicating with one another. But how is that done? Is that what TCP ports are for? And what is a message? A block? An object? A file of words and values? I wonder if someone could give me a broad '25-words-or-less' summary of what it all means.
I get this feeling that there is something important that I don't 'get' because I live in an alternate reality of third-generation programming languages.
Thank you.

posted by:   Steven White     22-May-2015/10:43:46-7:00

Hi @StevenWhite...
You might get a faster conversational loop closure on StackOverflow chat. We are still trying to keep things active over there.
> And what is a message? A block? An object? A file of
> words and values?
Without seeing a copy of the mail in question, it gets even harder to explain what someone else meant by what they said (compared to the natural difficulty of speaking for someone else in the first place).
But I imagine what Carl was *likely* envisioning was probably something along the lines of a JSON. Rebol blocks could be sent over the wire as molded strings (or even some more efficient format, e.g. "REDBIN"). So there's probably nothing more profound in the statement than what you would see today if you look at web services passing JSON messages around (perhaps using protocol buffers when that's too slow).
That said: it's important to remember that the ideas were being put forth in a time before JSON. And Douglas Crockford credits Rebol for offering inspiration to push the web that direction.
In practice, Rebol's binding model and complex collection of types make it somewhat hard. One reason JSON succeeds is because of how easy it is to do it in other languages. The closest Rebol has is "Ren", and I could write way more than 25 words about why it's tricky and full of design questions to use it in the way JSON is used:
It's likely that Carl's prediction could be seen to have come to pass (and there were others talking about it as well; I didn't predict JSON, though I did predict Node.JS years early). I'm sure there would have been a time where a language like JavaScript...with no mutexes, semaphores, or ability to spawn threads--would have been never considered a "language of the future". Yet there was tremendous latent value in having a network and a standard. The conventional standards of what made a good or bad language in the eyes of techies shifted.
Anyway... once Rebol was a few steps ahead in the "X Internet" game. These days, Red and Rebol have to play catch-up. But hopefully armed with some deep experience and a willingness to adapt.

posted by:   Fork     23-May-2015/16:26:06-7:00

I have thought messaging by dialect data exchange was the means.    
But REBOL needed NAT traversal examples, maybe a STUN/TURN server to suceed?

posted by:   Hal     24-May-2015/0:08:59-7:00

I think the idea of a "messaging language" has roots in a few different places. I'll try to explain what I know, but bear with me because I'm only relaying info I don't fully understand.
1. I think Carl was impressed by the power that a language like Rexx (ARexx in this case) was able to achieve for the Amiga computer. ARexx was simple but able to invoke libraries and "connect" different applications, which was fairly radical at the time. So, take this concept of being able to connect different apps and libraries together in far more robust ways than UNIX pipes.
2. I think that Postscript was potentially influential in terms of device independence -- it is a rich language which could run on many different types of hardware (e.g., printers).
3. I think that Logo and Forth also brought many ideas in terms of simplicity and elegance of language concepts and implementation.
So, to tie the above together. I think Carl wanted to create a powerful, small, elegant, device-independent, network-aware language that could connect different apps across the entire Web. In other words, a new "messaging language". In the mid-90's I think only a few monstrosities were in this space (e.g. CORBA), so to achieve this to the extent that he did is quite a feat.
I think the programming world was a bit more incremental and did not share this vision-- the commercial space was more focused on how we could get digital baubles (e.g. Flash) on web pages, and developers weren't keen on doing things different than in the past (and to the extend that they did, Java seemed offer the new path forward) and most yawned at the idea of simple being a new interpreted, non-curly-brace language.
You probably needed to share some of those specific challenges in that point in computing history (early 80's) to appreciate and grasp what the next big step forward *could* have been.

posted by:   Edoc     6-Jul-2015/12:06:32-7:00

As for DO'ing messaging, I think you have it right. Open a port and pass a message (maybe encrypted) to another rebol app. I have to believe that REBOL/IOS served as an model of the messaging principles.

posted by:   Edoc     6-Jul-2015/13:55:40-7:00

Try to read a bit about the Rebol/Services. It was supposed to be a bit overhauled, but it is a dialected way of messaging. It might be just one example of what Carl had in mind, but interesting one indeed ...

posted by:   -pekr-     16-Jul-2015/15:29:07-7:00