Believe it or not, I’m still thinking about, even working on, Moxie. I’m happy to say that I’ve completed an inital draft of Moxie read and write messages (including secure messaging). But first, let’s reset.
If you’ve read any of my previous postings about Moxie (or are about to) ignore the bit about Tuple Spaces, I was way too esoteric there. The rest, however, still holds up. Moxie is an aysychronous XML messaging system, analagous in a way to traditional message oriented middleware stacks, like MQ Series. It differs primarily by having an open, XML-based messaging framework and by disposing of the notion of topics and queues and replacing it with general queries using XQuery. Moxie aims to get rid of the complexity and limitations of the WS-* stack, and replace it with something much simpler while embracing the simplicity of REST while making it more effective.
If you’re anything like me, it would help to see something concrete. Herewith, the simplest Moxie write message possible (version 0.1, subject to dramatic amounts of change as development and testing get underway):
<mox:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://wanderingbarque.com/moxie/2005/06/messaging.xsd http://wanderingbarque.com/moxie/2005/06/messaging.xsd"
xmlns:mox="http://wanderingbarque.com/moxie/2005/06/messaging.xsd">
<mox:Action>write</mox:Action>
<mox:Message>
<mox:Header>
<mox:To>moxie://moxie.wanderingbarque.com/humanresources/newemployee</mox:To>
</mox:Header>
<mox:Body schemaType="xsd">
<emp:Employee xmlns:emp="urn:example.org:employee" >
<emp:EmployeeId>A-123</emp:EmployeeId>
<emp:LastName>Smith</emp:LastName>
<emp:FirstName>Joe</emp:FirstName>
<emp:Salary>100000</emp:Salary>
<emp:GovtId>123-45-6789</emp:GovtId>
</emp:Employee>
</mox:Body>
</mox:Message>
</mox:Envelope>
And here’s the simplest Moxie read message possible.
<mox:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://wanderingbarque.com/moxie/2005/06/messaging.xsd http://wanderingbarque.com/moxie/2005/06/messaging.xsd"
xmlns:mox="http://wanderingbarque.com/moxie/2005/06/messaging.xsd">
<mox:Action>read</mox:Action>
<mox:Message>
<mox:Body>
<mox:Xquery>
declare namespace mox="http://wanderingbarque.com/moxie/2005/06/messaging.xsd";
/mox:Envelope/mox:Message[mox:Header/mox:To="moxie.wanderingbarque.com/humanresources/newemployee"]
</mox:Xquery>
</mox:Body>
</mox:Message>
</mox:Envelope>
The response from this message? Here it is:
<mox:ReadResponse xmlns:mox="http://wanderingbarque.com/moxie/2005/06/messaging.xsd" >
<mox:Status>
<mox:Code>200</mox:Code>
<mox:Message>OK</mox:Message>
</mox:Status>
<mox:Message xmlns:mox="http://wanderingbarque.com/moxie/2005/06/messaging.xsd">
<mox:Header>
<mox:To>moxie://moxie.wanderingbarque.com/humanresources/newemployee</mox:To>
</mox:Header>
<mox:Body schemaType="xsd">
<emp:Employee xmlns:emp="urn:example.org:employee" >
<emp:EmployeeId>A-123</emp:EmployeeId>
<emp:LastName>Smith</emp:LastName>
<emp:FirstName>Joe</emp:FirstName>
<emp:Salary>100000</emp:Salary>
<emp:GovtId>123-45-6789</emp:GovtId>
</emp:Employee>
</mox:Body>
</mox:Message>
</mox:ReadResponse>
I hope you’re intrigued. If so, there’s a great deal more detail on the persistent Moxie page. It’s anything but complete, but enough information is there to get a very good idea of what Moxie will be. The XML Schema description is here. Please comment.
{ 2 } Comments
Go Pete! Go!
Make sure to have little hello demo ASAP to encourage people to try it
Thanks, Alek, for the support. A demo will get done, but not quickly. Moxie comes fourth in my list of time sinks: Job, toddler, everything else, Moxie.
But I do believe in Moxie, and I will continue to work on it. Next step; define a Moxie registration message. Step 2; put together some prototype code (minus security). After that I’ll know what step 3 is.