Re: New extension proposal: SAM - Simple Asynchronous Messaging

From: Date: Fri, 13 Oct 2006 16:37:36 +0000
Subject: Re: New extension proposal: SAM - Simple Asynchronous Messaging
References: 1 2  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-4253@lists.php.net to get a copy of this message
Hi Dave, I'd like to know more on the kind of messages that SAM deals with. It sounds to me like JSON so far, am I wrong? Yannick Hi Yannick,
The messages transported by SAM can be in any format, JSON is certainly possible. The messages might be in JSON, XML, plain text, binary or indeed a mixture of all of these in one message. Traditionally in the messaging and queuing world the endpoints have had varying levels of knowledge of the message format and in fact as long as the endpoints agree on a format anything can be put in the payload. To help the endpoints be flexible there are some standard "clues" in the message header on the format being passed and the sender is free to add any user properties or properties understood by the underlying messaging system into the header to help. Some of the older legacy systems that use messaging and queuing use all manner of nasty data formats that would not be nice but possible to create and interpret within a PHP script. In this case the message would probably be sent with the message header property, SAM_TYPE, set to SAM_BYTES to indicate the format is application dependent. More modern systems might be JMS compliant in which case messages could well be XML-based and then the SAM_TYPE header property would be set to SAM_TEXT to indicate this. These sorts of message would be much easier to create and interpret from within PHP due to the existing XML capabilities. The nett of all this is that the message format will depend on the application that you are sending to or receiving from. SAM should be capable of transporting most things. Cheers Dave

« previous php.pecl.dev (#4253) next »