<?xml version="1.0" encoding="utf-8"?>






<!--jsp:useBean id="kb" scope="session" class="com.lime.kb.IKnowledgeBase" /-->




<rss version="2.0">
	<channel>
		<title>Live Media</title>
		<link>http://www.livemedia.com.au/</link>
		<description>David's blog.</description>
		<language>en-us</language>
		<pubDate>Wed Nov 19 13:05:00 GMT 2008</pubDate>
		<lastBuildDate>Wed Nov 19 13:05:00 GMT 2008</lastBuildDate>
		<docs>http://www.livemedia.com.au/rss.x</docs>
		<generator>LimeSite RSS 1.0</generator>
		<managingEditor>david@livemedia.com.au</managingEditor>
		<webMaster>david@livemedia.com.au</webMaster>
		
			
			<item>
				<title>Binary Object REst Distributed (BORED) system - Part 7 - Uniform Interface Constraint</title>
				<link>http://www.livemedia.com.au/Blog/Binary_Object_REst_Distributed_(BORED)_system_-_Part_7_-_Uniform_Interface_Constraint</link>
				<description>Its been a couple of weeks since the last BORED post.  Something has gone wrong with my very old Thinkpad.  It now only boots in safemode with 640x480 resolution; not the nicest environment to work.  I&#39;m holding out for another few weeks before hopefully getting hold of a new Mac. I&#39;m still not sure if it will be an air, book, pro.  The posts here will probably slow down until they&#39;re out.

&lt;p&gt;For now, back to BORED.  Today&#39;s post is probably the most interesting of the posts and highlights the real issue that BORED, Argot and every other protocol is really trying to solve.  That is the movement of information and knowledge between client and server.  This is very different to the simple task of moving data (ie bits and bytes).  The problem of moving knowledge between applications is the central aspects of what draws me to this otherwise dull area of computer science.  

&lt;p&gt;I look at the current browsers, programming languages and enterprise systems and see a single underlying problem; we have very little understanding of how to move knowledge between systems.  Solving this problem can lead to more fluidity of data with less work by programmers.  This should also lead to better useability for the applications we build.  There&#39;s a lot of work to do and probably a few books to be written in this area before it will be solved.  BORED is an excersize in breaking out of the mold and seeing if a better approach can be found.  Without further ado, lets get back to BORED!

&lt;p&gt;The BORED protocol has now been tested against some of the challenging REST constraints.  The next and probably the most difficult constraint to be tested is the Uniform Interface Constraint.  This is the point where the request message data structures hit the target object and the mismatch between a hypermedia system and other types of interactions with servers is most obvious.  As the aim of the BORED protocol is to bring find some alignment between REST and Object orientated systems, this is where things should get interesting.

&lt;p&gt;&lt;b&gt;Uniform Interface&lt;/b&gt;&lt;br/&gt;
The Uniform Interface constraint is one of the more interesting constraints of REST.  It reduces all operations to a small set of file like operations, e.g. GET, POST, PUT, DELETE, HEAD, etc.  In the case of BORED, however, I&#39;m trying to bring together the concept of an Object Orientated system with that of a Hypermedia system in a sensible way.  At this point it is a good time to review the BORED architectural model:


&lt;p&gt;&lt;b&gt;&lt;nobr&gt;client --[request]--&gt;Server--&gt;Container--&gt;Object Receiver|Object&lt;/nobr&gt;&lt;/b&gt;
&lt;br/&gt;&lt;br/&gt;
&lt;b&gt;&lt;nobr&gt;client&lt;--[response]--Server&lt;--Container&lt;--Object Receiver|Object&lt;/nobr&gt;&lt;/b&gt;


&lt;p&gt;The BORED Remote Message Call(RMC) model encompasses all interface request data into the message data portion of the request.  This is delivered to the Object Receiver, which uses this information to interact with the target Object.  These interactions could involve any one of the following:


&lt;p&gt;
&lt;b&gt;Object Receiver -------&gt;  Document/File&lt;br/&gt;
&lt;br/&gt;
Object Receiver -------&gt;  Object Instance with public methods&lt;br/&gt;
&lt;br/&gt;
Object Receiver -------&gt;  Data Collection&lt;br/&gt;
&lt;br/&gt;
Object Receiver -------&gt;  Proxy Interface&lt;br/&gt;
&lt;br/&gt;
Object Receiver -------&gt;  Etc...&lt;br/&gt;
&lt;/b&gt;

&lt;p&gt;It is also worth reviewing what Fielding has to say about the Uniform Interface Constraint:

&lt;p&gt;&lt;blockquote style=&quot;font-style: italic;&quot;&gt;&quot;The central feature that distinguishes the REST architectural style from other network based styles is its emphasis on a uniform interface between components (Figure 5-6). By applying the software engineering principle of generality to the component interface, the overall system architecture is simplified and the visibility of interactions is improved.  Implementations are decoupled from the services they provide, which encourages independent evolvability. The trade-off, though, is that a uniform interface degrades efficiency, since information is transferred in a standardized form rather than one which is specific to an application?s needs. The REST interface is designed to be efficient for large grain hypermedia data transfer, optimizing for the common case of the Web, but resulting in an interface that is not optimal for other forms of architectural interaction.&quot;&lt;/blockquote&gt;

&lt;p&gt;As stated, it is the Uniform Interface constraint that really sets the REST approach apart from many other systems.  It is the simplicity of the uniform interface that makes the interactions between browser and web server so powerful.  

&lt;p&gt;Fielding continues with:

&lt;p&gt;&lt;blockquote style=&quot;font-style: italic;&quot;&gt;&quot;In order to obtain a uniform interface, multiple architectural constraints are needed to guide the behaviour of components. REST is defined by four interface constraints: identification of resources; manipulation of resources through representations; self descriptive messages; and, hypermedia as the engine of application state. These constraints will be discussed in Section 5.2.&quot;&lt;/blockquote&gt;

&lt;p&gt;The Uniform Interface constraint therefore has multiple sub-constraints.  Any diversion from these constraints will cause BORED to diverge from the REST approach. However, Fielding also states that the Uniform Interface constraint is a trade-off between degrading efficiency and providing an:

&lt;p&gt;&lt;blockquote style=&quot;font-style: italic;&quot;&gt;&quot;efficient interface for large grain hypermedia data transfer, optimizing for the common case of the Web, but resulting in an interface that is not optimal for other forms of architectural interaction.&quot;&lt;/blockquote&gt;

&lt;p&gt;This trade-off is clearly shown in AJAX based applications.  Application designers are forced to use the REST approach for all aspects of the client-server interactions. An AJAX based application downloads Javascript which often makes remote calls back to the web server.  These AJAX calls are better suited to a solution which allows a program centric interaction with the server (note I&#39;m being careful not to use the term RPC).  The client may be attempting to return document fragments or even simple single string responses.  In these situations the uniform interface constraint creates  additional work for the developer and designer.  These AJAX/Web 2.0 interactions would benefit from a stronger binding between client and server.

&lt;p&gt;The AJAX/Web 2.0 example shows the trade-off that Fielding discusses in regards to REST.  However, the trade-off has obviously served the Web Hypermedia system well to this point.  Take for example the simplicity of:

&lt;p&gt;&lt;b&gt;http://www.livemedia.com.au/my_image.jpg&lt;/b&gt;

&lt;p&gt;By entering a URL into a browser we imply the GET request, and the image is retrieved.  The web&#39;s power is driven through this simplicity. 

&lt;p&gt;At this point it is worth doing a small detour into the realm of data contracts.  Understanding the different types of data contracts that client/server systems use will provide a better set of tests to base the BORED protocol.

&lt;p&gt;&lt;b&gt;Data Contracts&lt;/b&gt;&lt;br/&gt;
The topic of data contracts is probably the most interesting aspect of distributed computing.  This is where there is some agreement between client and server that after sending a specific set of data to a location will result in an agreed set of other data being returned.  The contract can range from being implied, to being rigidly defined using procedure call semantics (as is the case in CORBA IDL).  This philosophy around  the area of data contracts changes with each new technology and fad.  

&lt;p&gt;The reason for this constant flux is that what is required changes for different purposes.  If a user is involved then human cognition is the most important part of the contract.  If the communication is purely between code on both client and server then as long as the client  matches the server the contract can be implied.  If the clients are many and varied and are using a 3rd party service then consistancy and an Interface Definition Language is desierable.  If the client wishes to discover new interfaces then discoverability and associated IDL is a requirement.  Finally, in some cases an IDL does not go far enough and a full and independent textual specification (eg RFC) is required.

&lt;p&gt;Each of the methods of creating data contracts implies different requirements for the BORED protocol.  The following is a simple breakdown of different contracts and some implications for the BORED protocol.  There has probably been better and more thorough analysis of data contracts been done before; if you&#39;re aware of any, please let me know via comments.

&lt;p&gt;&lt;b&gt;Human Cognition Data Contract&lt;/b&gt;&lt;br/&gt;
The URL is probably the best example of providing human cognition to a data contract.  By reading a URL a user is able to have a fairly good idea of what information will be returned.  There is obviously skill in defining a good URL structure for any web site.  However, the current URL also include request parameters which can modify the result of a particular page.

&lt;p&gt;Take for example the following hyperthetical request:

&lt;p&gt;&lt;b&gt;&lt;nobr&gt;http://www.livemedia.com.au/store_search.x?s=books&amp;author=ryan&amp;page=2&lt;/nobr&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;To an experienced web user the parameters of this request are obvious:

&lt;p&gt;&lt;b&gt;s=books  (search the term ?books?)&lt;br/&gt;
author=ryan (find books by the author ?ryan?)&lt;br/&gt;
page=2  (return the second page of results)&lt;br/&gt;&lt;/b&gt;

&lt;p&gt;The contract between client and server regarding these parameters are loose and do not provide a formal contract between client and server.   However, the need for this contract is reduced for most web pages as Javascript is usually used to construct the required URL.  This reduces the usability of the server application for purposes outside the scope of the web page that uses it.  To fix this issue many web sites that wish to offer services to external sites use additional web services based around SOAP technologies.

&lt;p&gt;As part of the BORED protocol we&#39;ve already stated a location requirement.  At the sametime this ability for a user to modify a request URL parameters provides flexibility and gives the user a greater control over the information requested.  To solve this in BORED a mechanism for the data contract for a URL to be made available to the browser.  The user can then be presented with an interface to allow them to modify request parameters in a formal way.  

&lt;p&gt;&lt;b&gt;Hypermedia Data Contract&lt;/b&gt;&lt;br/&gt;
The hypermedia data contract is associated with the REST design philosophy.  The idea that each object in a system is identified using a simple URL.  Links and references between objects are provided through hyperlinks.  For instance instead of saying that a customer order contains product id A1234, a hyperlink is provided which gives a direct link to the component.  

&lt;p&gt;The final solution in a hypermedia system consists of many URLs with the interaction of each object in the system reduced to the REST uniform interface constraints.  The client may request to be provided with different formats in responses depending on its requirements.  Examples include HTML for user interaction, XML for programming language interaction and PDF for printing purposes. The REST approach requires that a client can specify the type of data it wishes to receive through its request parameters.

&lt;p&gt;The actual data contract is deferred to the data representation returned by the specific request.  In the case of XML, the contract can be specified using XML Schema or DTD. In a way, REST splits the data contract into two halves; The data representation using mime and the location of information through the publishing of URLs.  REST does not currently have a method of bringing this information together in a way to make the data discoverable.

&lt;p&gt;This type of solution puts minimal requirements on the BORED protocol.  Infact, the hypermedia/REST method does its best to avoid the data contract issue by reducing all calls to a uniform interface and mime-types.  The BORED protocol must allow the client to request the type of data it wishes to have returned in the GET verb.  The response must support the ability to provide at least a mime type associated with the data returned.

&lt;p&gt;&lt;b&gt;Implied Data Contract&lt;/b&gt;&lt;br/&gt;
This form of contract is when a client is built specifically for a server.  This is the case with most Web 2.0/AJAX based applications today.  The data contract is not specified in any formal way and the specific data sent and received is at the full discretion of the developer.  The developer must be aware of any changes with the data sent or received between client and server and ensure each section of the software is updated.

&lt;p&gt;A large Web 2.0/AJAX based application is likely to have associated documentation that is put together by the team developing the product.  This documentation is unlikely to provide a formal description of the data.  Any changes to the product would require a separate task to update the associated documentation.

&lt;p&gt;An important aspect of this type of communication is that the data format sent to/from the server is at the total discretion of the developer.  A developer may return a simple string, some preformated HTML, some JSON data, or a new script.

&lt;p&gt;This type of communication puts a requirement that the protocol should be open to any data type the developer wishes to sent between the client and server.  To support this, the message data should allow at the very least a mime-type to be specified with the data.  It may also be beneficial that additional meta data be provided separate to the data being supplied.

&lt;p&gt;&lt;b&gt;Strongly Typed Data Contract&lt;/b&gt;&lt;br/&gt;
This form of contract is defined using an Interface Definition Language(IDL) or Web Services Definition Language(WSDL).   This is the most formal method of defining a contract between client and server.   Associated with this type of formal contract is a complete communications stack (I.e. stubs and skeletons) which provides the middleware for the formal agreement.

&lt;p&gt;In examples such as CORBA and Web Services there is a complete framework which surrounds strongly typed data contracts.  As has already been shown numerous times over, a single framework is unlikely to provide all the facilities required by developers.  Multiple Data Contract Languages (DCL&#39;s) may be required with more specific purposes to meet a developers requirements.

&lt;p&gt;To support strongly typed data contracts the BORED protocol should support allow an interface to be associated with a specific location.  In these cases the default GET uniform interface may provide an objects current state, however more specific interfaces can also be provided.  The Data Contract Language associated with the object can be made available via a META call to the location.

&lt;p&gt;&lt;b&gt;Uniform Interface Constraint Reviewed&lt;/b&gt;&lt;br/&gt;
After reviewing the various types of contracts it is clear that the Uniform Interface constraint is just one of the many ways of building a data contract between client and server.  However, the Uniform Interface constraint is an important element of the REST design; this is because as already suggested, its power is in its simplicity.  eg

&lt;p&gt;&lt;b&gt;http://whereis.com&lt;/b&gt;

&lt;p&gt;This URL links to a Web 2.0 application that uses heavy JavaScript and has many dynamic elements.  In these cases the Uniform Interface constraint is defining a common naming mechanism that defines a link to a web application.  The URL in effect is a bootstrap for the application.  

&lt;p&gt;The calls to the server after the application is loaded are hidden away from the user.  If the user went hunting through the code for these AJAX calls they would be of little use alone.  They are likely to require very specific parameters and return information that only the client application can interpret.

&lt;p&gt;This concept of identifying the URL as a bootstrap has helped frame a few conclusions about the Uniform Interface constraint.  In particular the requirement for the uniform interface constraint is only important for those locations that require direct user interaction or return a simple data representation.  However, any data that needs to be transferred between the client application and server can use any other means that is suitable to the application.  A developer may choose a mixture of implied and strongly typed interface contracts.  It depends on the needs of the interactions that will occur between client and server.

&lt;p&gt;&lt;b&gt;Uniform Meta Interface&lt;/b&gt;&lt;br/&gt;
The discussion above points to the need for a uniform meta interface layer to be created.  The purpose of this layer is to provide a mechanism to discover the meta data associated with the object being interacted.  This meta data can describe the type of interactions that the object receiver will resposne.  This layer should be flexible enough to cater for any type of data be sent and received.  It should allow the interactions with the object to be described using meta data that is most appropriate for the service being delivered.

&lt;p&gt;The danger of providing a single meta interface layer which could describe any number of interfaces and protocols is that the REST uniform interface is lost.  I&#39;ve already stated numerous times that the power of the REST architectural style is in the uniform interface.  For this reason, a reduced number of verbs needs to be defined which allow the object to publish a basic set of known operations.  This supports the main aim of the REST architectural style, but still allows flexibility in catering for other application protocols.

&lt;p&gt;To support this concept of a uniform meta presentation layer, the object receiver must at a minimum respond to a request with a META verb.  The response to this verb must be a description of the interfaces supported by the object.  The meta data returned may include a set of REST style verbs such as GET, HEAD and DELETE.  

&lt;p&gt;This implies that for many interactions the client must make a call to the server to retrieve the meta data and then a second call to perform an operation.  Additional calls may also be required to retrieve and bind interfaces depending on the method described in the meta data.  However, it will be assumed that most locations will support atleast the GET verb with no parameters.  This support will allow published URLs to be accessed without making multiple calls to the service.  



</description>
				<pubDate>Tue Sep 23 10:09:03 GMT 2008</pubDate>
				<guid>http://www.livemedia.com.au/Blog/Binary_Object_REst_Distributed_(BORED)_system_-_Part_7_-_Uniform_Interface_Constraint?v=5</guid>
			</item>
			
			<item>
				<title>Binary Object REst Distributed System - Part 6 - Cache Constraint</title>
				<link>http://www.livemedia.com.au/Blog/Binary_Object_REst_Distributed_System_-_Part_6_-_Cache_Constraint</link>
				<description>The BORED protocol already meets the first two constraints of REST; client-server and stateless.  We&#39;ve also extended the client-server constraint to allow asynchronous client-server.  The next REST constraint to meet is the Cache constraint.

&lt;p&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Cache&lt;/span&gt;
Returning to Fielding&#39;s REST dissertation, we find:
&lt;blockquote style=&quot;font-style: italic;&quot;&gt;&quot;Cache constraints require that the data within a response to a request be implicitly or explicitly labelled as cacheable or non-cacheable. If a response is cacheable, then a client cache is given the right to reuse that response data for later, equivalent requests.&quot;
&lt;/blockquote&gt;

&lt;p&gt;In the BORED protocol there&#39;s an additional requirement to this, which relates to the stateless requirement. To label a response as cacheable or non-cacheable requires that the request is uniquely identifiable.  In BORED, the stateless request data is broken into two parts; the location and the message data.  To satisfy this constraint a proxy server or client must identify the location and the request data as a single object and match this against the response data.  As the request message data is binary the simplest solution is for a client or proxy server to keep a hash on the message data and location.  To improve performance this hash value could be added to the request data to provide a key to a cache that will lower its overhead to calculate the key.  It&#39;s important to add that the hash should only be based on the message data.  This allows proxies to perform operations such as rerouteing of messages to new locations without needing to update the hash value.

&lt;p&gt;To support the response aspect of the cache requirement, BORED includes cache information in the response header:

&lt;blockquote&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;preamble - BORED&lt;br/&gt;
version&lt;br/&gt;
dictionary parts&lt;br/&gt;
available request slots&lt;br/&gt;
request identifier&lt;br/&gt;
&lt;br/&gt;
response code&lt;br/&gt;
cache information&lt;br/&gt;
&lt;/span&gt;&lt;/blockquote&gt;

&lt;p&gt;In the REST mismatches with HTTP Fielding writes:

&lt;blockquote style=&quot;font-style: italic;&quot;&gt;&quot;&lt;span style=&quot;font-weight: bold;&quot;&gt;Differentiating Non-authoritative Responses&lt;/span&gt;&lt;br/&gt;
One weakness that still exists in HTTP is that there is no consistent mechanism for differentiating between authoritative responses, which are generated by the origin server in response to the current request, and non-authoritative responses that are obtained from an intermediary or cache without accessing the origin server. The distinction can be important for applications that require authoritative responses, such as the safety-critical information appliances used within the health industry, and for those times when an error response is returned and the client is left wondering whether the error was due to the origin or to some intermediary. Attempts to solve this using additional status codes did not succeed, since the authoritative nature is usually orthogonal to the response status.

&lt;p&gt;HTTP/1.1 did add a mechanism to control cache behaviour such that the desire for an authoritative response can be indicated. The ?no-cache? directive on a request message requires any cache to forward the request toward the origin server even if it has a cached copy of what is being requested. This allows a client to refresh a cached copy, which is known to be corrupted or stale. However, using this field on a regular basis interferes with the performance benefits of caching. A more general solution would be to require that responses be marked as non-authoritative whenever an action does not result in contacting the origin server. A Warning response header field was defined in HTTP/1.1 for this purpose (and others), but it has not been widely implemented in practice.&quot;
&lt;/blockquote&gt;

&lt;p&gt;When the request message headers are developed in detail it will be important to include the ability to define a &#39;no-cache&#39; directive.  The cache information returned in the response should also indicate if the response is non-authoritative.

&lt;p&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Location only constraint&lt;/span&gt;&lt;br/&gt;
At this point we add another new constraint to the system; the location only constraint.  The location in each request should only include the location specific information.  Request parameters must only be supplied in the message data.  This constraint is designed to ensure the separation of the message data from the location data.  This allows fast and easier routing of message data.

&lt;p&gt;This constraint is a direct opposite of a common practise of encoding request parameters on to URI&#39;s in HTTP. For example:
 &lt;blockquote style=&quot;font-weight: bold;&quot;&gt;http://www.livemedia.com.au/bookstore?author=ryan&amp;amp;page=1&amp;amp;list=10&lt;/blockquote&gt;

&lt;p&gt;In the BORED protocol the location must be separate from the message data.

&lt;blockquote style=&quot;font-weight: bold;&quot;&gt; (location bored://www.livemedia.com.au/bookstore) 
     (message author=ryan@page=1&amp;amp;list=10)
&lt;/blockquote&gt;

&lt;p&gt;This constraint is designed to combine with the cache constraint to ensure message parameters are not confused with location data in cache systems.  It also ensures that the required meta data to decode the message is included in the message meta data.

&lt;p&gt;It is interesting to note that the cache constraint requires the stateless constraint to function.  A cache must be able to deal with a whole message uniquely to operate correctly.</description>
				<pubDate>Sun Sep 07 10:39:38 GMT 2008</pubDate>
				<guid>http://www.livemedia.com.au/Blog/Binary_Object_REst_Distributed_System_-_Part_6_-_Cache_Constraint?v=2</guid>
			</item>
			
			<item>
				<title>Binary Object REst Distributed System - Part 5 - Stateless constraint</title>
				<link>http://www.livemedia.com.au/Blog/Binary_Object_REst_Distributed_System_-_Part_5_-_Stateless_constraint</link>
				<description>The initial constraints of REST were easy to provide a solution in BORED. In this post we tackle the stateless constraint. As BORED uses binary message data this constraint creates some unique challenges.

&lt;p&gt;&lt;strong&gt;Stateless &lt;/strong&gt;
&lt;strong&gt;&lt;/strong&gt;

&lt;p&gt;The Stateless requirement is REST&#39;s second constraint. Fielding writes:

&lt;blockquote&gt;&lt;em&gt;&quot;We next add a constraint to the client-server interaction: communication must be stateless in nature, as in the client-stateless-server (CSS) style of Section 3.4.3 (Figure 5-3), such that each request from client to server must contain all of the information necessary to understand the request, and cannot take advantage of any stored context on the server. Session state is therefore kept entirely on the client.&quot;
&lt;/em&gt;&lt;/blockquote&gt;

&lt;p&gt;To see the stateless requirement more clearly I&#39;ll review HTTP. Here&#39;s an example of a HTTP 1.1 request and response.

&lt;p&gt;&lt;blockquote&gt;&lt;strong&gt;GET http://www.eienet.com.au/ HTTP 1.1&lt;br/&gt;
...&lt;br/&gt;
&lt;br/&gt;
200 OK&lt;br/&gt;
...&lt;br/&gt;
&lt;/strong&gt;&lt;/blockquote&gt;

&lt;p&gt;The request encodes the full description of what the client is requesting in the URI and HTTP GET verb. To align with REST, BORED requires a similar location specifier. Let&#39;s assume a URI for now, however, to support embedded devices this will need to be more flexible.

&lt;p&gt;To satisfy the stateless constraint, the following parts of BORED are required in the request:

&lt;blockquote&gt;&lt;strong&gt;prefix - BORED&lt;br/&gt;
version&lt;br/&gt;
request identifier&lt;br/&gt;
location - URI location or
other location type.&lt;br/&gt;
....&lt;br/&gt;
message&lt;br/&gt;
-- message meta data.&lt;br/&gt;
-- message - request data.&lt;br/&gt;
---- operation - GET,META,POST,METHOD,etc&lt;br/&gt;
---- message data &lt;/strong&gt;
&lt;/blockquote&gt;

&lt;p&gt;To meet the stateless requirement the BORED protocol includes the location and full request data.

&lt;p&gt;In the case of a binary protocol an interesting addition is the inclusion of &quot;message meta data&quot;. This is Argot specific however can be extended to any binary system that has a meta data definition. In the Argot case the meta data specifies the data structures of the data in the message.

&lt;p&gt;The ?message meta data? describes the message data, however, at this point there&#39;s no meta data to describe the actual request structure. To understand how BORED will solve this it is worth introducing the concept of an Argot Message Format. The Argot Message Format is designed to be completely self defining. Here&#39;s a short description from the Argot Programmer&#39;s guide.

&lt;hr /&gt;
&lt;strong&gt;&lt;span style=&quot;font-size:130%;&quot;&gt;Argot Message Files &amp;amp; Dictionaries&lt;/span&gt;&lt;/strong&gt;

&lt;p&gt;Argot message files are binary encoded files that provide the specification of their data with the data. An Argot file contains three parts; a meta dictionary, a data dictionary and the data.

&lt;p&gt;The Argot Message Format allows the full specification of the data to be transferred with the data. This requires no external definition of the data. For an application to be able to read the file its type library must contain all the data types used in the file. A Type Map is generated from the data dictionary portion of the file to read the data. The general format of the file is:

&lt;img src=&quot;http://lh6.ggpht.com/oobles/SL0Q81b9QXI/AAAAAAAAAAM/iZWJ2dacvoQ/s800/argot_meta_file.gif&quot; /&gt;

&lt;p&gt;The receiver of an Argot enabled file is able to read the dictionary and compare the data types of its own dictionary with that of the files. Once the types of the file dictionary have been matched with that of the application reading the file, the data can be read. This completely removes the need for a static common domain schema. Each application and file in effect contains its own schema.

&lt;img src=&quot;http://lh3.ggpht.com/oobles/SL0RM31-60I/AAAAAAAAAAU/gaFEShZ48vA/s800/argot_meta_transfer.gif&quot; /&gt;

&lt;p&gt;This can be re-illustrated using the following venn diagram:

&lt;img src=&quot;http://lh3.ggpht.com/oobles/SL0RZDT1kuI/AAAAAAAAAAc/5W-6Dagyjfk/s800/argot_meta_venn.gif&quot; /&gt;

&lt;p&gt;The process of reading a file involves:

&lt;p&gt;&lt;ol&gt;&lt;li&gt;Binary compare of meta dictionary map. The very first dictionary map of the meta dictionary is the core met dictionary. The only way to read this entry is by performing a binary compare. These are the base dictionary items used to describe new items. Please refer to the meta dictionary reference section for details of the core meta dictionary.
&lt;li&gt;Build and read Meta dictionary. The rest of the meta dictionary is read and mapped between the application and file.
&lt;li&gt;Read the Data dictionary. Using the Type Map produced from entries in the Meta Dictionary the Data dictionary is read. A Data dictionary type map is created based on the types identified.
&lt;li&gt;Read the Data. Using the Data dictionary type map the actual data of the file is read.
&lt;/li&gt;&lt;/ol&gt;

&lt;p&gt;The argot message format can be used anywhere that a data buffer can be transferred. In files, message oriented middleware, email, etc.
&lt;hr /&gt;

&lt;p&gt;It would be easy to simply use the Argot Message Format as the full request structure to be delivered to the server. However, carrying the &#39;meta dictionary&#39; with each and every request adds a lot of overhead. This would also hide the contents of the request data requiring a cache/proxy to read the meta dictionary, data dictionary and data before it can understand the request.

&lt;p&gt;The solution used in BORED is to use the version information of the protocol as a monica for a data dictionary. When a server receives a request it uses the BORED protocol version to choose the corresponding data dictionary. This is like having the meta dictionary and data dictionary of the request at the start of every request. The request and response BORED message are themselves specified in this data dictionary.

&lt;p&gt;The BORED request message however also requires a meta data section for times when the meta data for the request does not include data required by the object receiver. The message data dictionary expands on the request data dictionary to include elements required by the message.

&lt;p&gt;Logically this looks as follows:

&lt;p&gt;&lt;blockquote&gt;&lt;strong&gt;[ meta dictionary ] [ request data dictionary ]&lt;br/&gt;
       &lt;nobr&gt;---- [ request ... [ message [ message data dictionary] [data ]] ... ]&lt;/nobr&gt;&lt;/strong&gt; &lt;/blockquote&gt;

&lt;p&gt;This allows the Request to logically contain the full meta dictionary, data dictionary, and data for the full BORED request in every message without the overhead of the full meta dictionary and data dictionary.

&lt;p&gt;Using the above method has a drawback that the &quot;request data dictionary&quot; must define every aspect of the request message structure. This includes, security, cache information formats, header formats, and others. This creates an issue for very small devices that only support a subset of the request headers. A solution to this is to break the &quot;request data dictionary&quot; into parts. The client and server can then identify in their request and response the parts of the request data dictionary it supports. For simplicity the parts supported can be indicated via a bit-flag in the version part of the header. For instance, the version header could use three 8-bit flags. The first two would be the major and minor version with the third being the bit-flag for the parts of the request data dictionary supported.

&lt;p&gt;Building on the last post, the request structure header now looks like for the request:

&lt;blockquote&gt;&lt;strong&gt;prefix ? BORED&lt;br/&gt;
version&lt;br/&gt;
dictionary parts&lt;br/&gt;
request identifier&lt;br/&gt;
...&lt;/strong&gt;

&lt;/blockquote&gt;

&lt;p&gt;and response:

&lt;blockquote&gt;&lt;strong&gt;prefix - BORED&lt;br/&gt;
version&lt;br/&gt;
dictionary parts&lt;br/&gt;
available request slots&lt;br/&gt;
request identifier&lt;br/&gt;
... &lt;/strong&gt;
&lt;/blockquote&gt;

&lt;p&gt;Delivering the stateless constraint using a binary protocol has required developing a few tricks. In particular using the request version number as a key to meta dictionary and request data dictionary has allowed the solution to deliver a technically correct construct and still delivered the ability to reduce the amount of network traffic for each request/response. Using the bit-flag for specifying the parts request data dictionary supported has also allows the solution to scale from small devices to large full features systems.

&lt;p&gt;&lt;a href=&quot;http://blog.livemedia.com.au&quot;&gt;Also posted here&lt;/a&gt;</description>
				<pubDate>Tue Sep 02 11:06:46 GMT 2008</pubDate>
				<guid>http://www.livemedia.com.au/Blog/Binary_Object_REst_Distributed_System_-_Part_5_-_Stateless_constraint?v=3</guid>
			</item>
			
			<item>
				<title>Binary Object REst Distributed (BORED) system - Part 4 - Constraints &amp; Assumptions</title>
				<link>http://www.livemedia.com.au/Blog/Binary_Object_REst_Distributed_(BORED)_system_-_Part_4_-_Constraints_&amp;_Assumptions</link>
				<description>At this point I&#39;ve introduced the BORED idea, the blueprint and provided a rough 0.1 version of the protocol. The next step is to test the message structure against various constraints &amp;amp; assumptions of REST.

&lt;p&gt;The first constraints and assumptions to be tested are based on the constraints defined by REST. They set the ground work for the protocol and provide the constraints required to define the request/response headers.

&lt;p&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Lossless Communication Stream&lt;/span&gt;&lt;br/&gt;
The very first assumption is that the solution will operate on a lossless bi-directional communication channel that supports streams (i.e. TCP). This assumes the transport will take care of the connection set-up and tear down. The transport will ensure that the data is received in order and provides a byte stream interface. This is a rather obvious assumption to make, however, it is important to get the basics right.

&lt;p&gt;For embedded devices we will assume that if it doesn&#39;t support TCP, then another transport protocol will be provided. If the messages are small enough the protocol should also operate on UDP style network protocol. The protocol may also operate on an asynchronous transport such as message queuing and email systems.

&lt;p&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Client-Server&lt;/span&gt;&lt;br/&gt;
The second part of the requirements is that of client-server. This is REST&#39;s first requirement. Fielding describes client-server as:
&lt;blockquote style=&quot;font-style: italic;&quot;&gt;&quot;The client-server style is the most frequently encountered of the architectural styles for network-based applications. A server component, offering a set of services, listens for requests upon those services. A client component, desiring that a service be performed, sends a request to the server via a connector. The server either rejects or performs the request and sends a response back to the client.&quot;&lt;/blockquote&gt;

&lt;p&gt;The client-server style requires that request data is sent to the server and it responds with response data. The initial definition of the protocol&#39;s request and response data is the following.  request:

&lt;blockquote style=&quot;font-weight: bold;&quot;&gt;preamble - BORED&lt;br/&gt;
version&lt;br/&gt;
...&lt;br/&gt;
;
&lt;/blockquote&gt;

&lt;p&gt;The response structure is the same:

&lt;blockquote style=&quot;font-weight: bold;&quot;&gt;prefix - BORED&lt;br/&gt;
version&lt;br/&gt;
...&lt;br/&gt;
;
&lt;/blockquote&gt;

&lt;p&gt;The request and response headers look the same. It contains a preamble that notifies the receiver that the message is using the BORED protocol. The preamble also provides a point where if the receiver is out of sync with the send, it provides a point where the start of the next message can be found. The client sets the version of the protocol. The server sets the version to the version it is currently using. The server must not respond with a version that is greater than the client.


&lt;p&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Asynchronous Client-Server&lt;/span&gt;&lt;br/&gt;
One of the interesting parts of Fielding&#39;s dissertation is the REST mismatch with HTTP. Fielding states:
&lt;blockquote style=&quot;font-style: italic;&quot;&gt;&quot;HTTP/1.1, though defined to be independent of the transport protocol, still assumes that communication takes place on a synchronous transport. It could easily be extended to work on an asynchronous transport, such as e-mail, through the addition of a request identifier. Such an extension would be useful for agents in a broadcast or multicast situation, where responses might be received on a channel different from that of the request. Also, in a situation where many requests are pending, it would allow the server to choose the order in which responses are transferred, such that smaller or more significant responses are sent first.&quot;&lt;/blockquote&gt;

&lt;p&gt;To support asynchronous requests, a request identifier needs to be added to the request and response data structures. i.e. The request:

&lt;blockquote style=&quot;font-weight: bold;&quot;&gt;prefix - BORED&lt;br/&gt;
version&lt;br/&gt;
request identifier&lt;br/&gt;
...&lt;br/&gt;
;
&lt;/blockquote&gt;

&lt;p&gt;and response:

&lt;blockquote style=&quot;font-weight: bold;&quot;&gt;prefix - BORED&lt;br/&gt;
version&lt;br/&gt;
request identifier&lt;br/&gt;
...&lt;br/&gt;
;
&lt;/blockquote&gt;

&lt;p&gt;The request identifier is set by the client. The server must respond with the same request identifier in the response. This allows a client and server to use a single channel and interleave requests and responses. This improves the channel usage and reduces latency which leads to a better user experience. Using a single channel for multiple requests also aligns well with the direction of CPUs containing many cores. Many threads can be assigned to a single channel.

&lt;p&gt;The response can come from either a cache, server proxy, or server containing the object. The important thing is that by introducing a request identifier the protocol no longer needs to conform strictly to synchronous request/response semantics.

&lt;p&gt;Specifying a &quot;request identifier&quot; is a rather simplistic approach to allowing asynchronous request/response message processing. One problem with this approach is that the server has no way of letting the client know how many messages it is able to process at one time. A possible solution to this would be for the server to response with how many message slots it has available. ie response:

&lt;blockquote style=&quot;font-weight: bold;&quot;&gt;prefix - BORED&lt;br/&gt;
version&lt;br/&gt;
available request slots&lt;br/&gt;
request identifier
&lt;/blockquote&gt;

&lt;p&gt;For a server with constrained resources the request slots value may always be 1. Using the response message to provide the number of request slots requires that the client receive at least one response before it can know how many requests it can send. A simple solution to this would be that the server notifies the client upon initial request. This will need to be explored further in the future.

&lt;p&gt;The other feature suggested by Fielding is that an asynchronous request could use different channels for receipt of the request. To allow this, additional optional headers could be provided to specify a &quot;return address&quot; and &quot;time to live&quot;. The &quot;time to live&quot; allows the client to specify how long it is willing to wait for a response. If the server is unable to provide a response before the given time it should drop the request and not deliver the response. This type of feature is added to the protocol via the optional headers because it likely to be used rarely.

&lt;p&gt;Introducing the concept of asynchronous requests and responses introduces a number of new challenges that must be explored. The proof of how well each of these ideas will work in BORED will be explored when implementing the protocol.</description>
				<pubDate>Fri Aug 29 07:22:12 GMT 2008</pubDate>
				<guid>http://www.livemedia.com.au/Blog/Binary_Object_REst_Distributed_(BORED)_system_-_Part_4_-_Constraints_&amp;_Assumptions?v=2</guid>
			</item>
			
			<item>
				<title>Binary Object REst Distributed (BORED) system - Part 3 - Structure</title>
				<link>http://www.livemedia.com.au/Blog/Binary_Object_REst_Distributed_(BORED)_system_-_Part_3_-_Structure</link>
				<description>In this post I present version 0.1 of the BORED request and response structures.  This will be refined in future posts as trade-offs are made and the protocol matures.  I won&#39;t go into much detail here as future posts will provide a lot more detailed analysis.

&lt;p&gt;There are only two message types in the BORED protocol;  the request type and response type.  Operations such as GET or POST found in HTTP are encapsulated in the message data and do not form the surrounding message.  The request message consists of:

&lt;p&gt;request:
&lt;blockquote&gt;preamble - BORED
version&lt;br&gt;
&lt;br&gt;
location - URI location or other location type.&lt;br&gt;
&lt;br&gt;
optional headers&lt;br&gt;
 - headers meta data&lt;br&gt;
 - headers data&lt;br&gt;
&lt;br&gt;
message&lt;br&gt;
 - message meta data.&lt;br&gt;
 - message - request data.&lt;br&gt;
 - -   operation - GET,META,POST,METHOD,etc&lt;br&gt;
 - -   message data&lt;br&gt;
&lt;br&gt;
optional security&lt;br&gt;
-  identity/signature meta data&lt;br&gt;
 - -  optional identity&lt;br&gt;
 - -  optional signature&lt;br&gt;
&lt;/blockquote&gt;

&lt;p&gt;The request data elements are:
&lt;blockquote&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;preamble&lt;/span&gt; - &quot;BORED&quot; The six ASCII characters define the headers of the BORED protocol.  This signifies the start of the message.&lt;br&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;version&lt;/span&gt; - This will consist of a major and minor version as two unsigned 8-bit characters.&lt;br&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;location&lt;/span&gt; - This is the location where the message should be delivered.&lt;br&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;optional headers&lt;/span&gt; - This provides an area for additional information to be added.  It is  analogous to HTTP headers.&lt;br&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;message&lt;/span&gt; - The message to be delivered to the specified location.  This should include any POST data or URI request parameters found in HTTP.&lt;br&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;optional security&lt;/span&gt; - This provides the option to provide identify of the client and sign requests.&lt;br&gt;
&lt;/blockquote&gt;

&lt;p&gt;A simple request message might look logically like:
&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;nobr&gt;BORED 0.1 - BORED://www.livemedia.com.au/document.pdf  (GET) - ;&lt;/nobr&gt;&lt;/span&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Note&lt;/span&gt;: For now these requests are demonstrated as text for human readability.  As the elements of the protocol are refined binary examples will be provided. 

&lt;p&gt;In the example above the following elements are present:
&lt;blockquote&gt;preamble - BORED
version - 0.1&lt;br&gt;
location - BORED://www.livemedia.com.au/document.pdf&lt;br&gt;
optional headers - not included&lt;br&gt;
message - (GET)&lt;br&gt;
optional security - not included&lt;/blockquote&gt;

&lt;p&gt;The response has much of the same information as the request data.  The response includes a response code and caching information.

&lt;p&gt;response:
&lt;blockquote&gt;preamble - BORED&lt;br&gt;
version&lt;br&gt;
&lt;br&gt;
response code&lt;br&gt;
cache information&lt;br&gt;
&lt;br&gt;
optional headers&lt;br&gt;
 - headers meta data&lt;br&gt;
 - headers data&lt;br&gt;
&lt;br&gt;
message&lt;br&gt;
  - message meta data.&lt;br&gt;
  - message - response data.&lt;br&gt;
  - -  message data&lt;br&gt;
&lt;br&gt;
optional security&lt;br&gt;
-  optional identity/signature meta data&lt;br&gt;
- optional identity&lt;br&gt;
-   optional signature (from response code)&lt;br&gt;
&lt;br&gt;
&lt;/blockquote&gt;

&lt;p&gt;The response fields include many of the same data as in the request.
&lt;blockquote&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;preamble&lt;/span&gt; - &quot;BORED&quot; The six ASCII characters define the headers of the BORED protocol.  This signifies the start of the message.&lt;br&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;version&lt;/span&gt; - This will consist of a major and minor version as two unsigned 8-bit characters.&lt;br&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;response code&lt;/span&gt; - The response code for the data.&lt;br&gt;
cache information - Information on if the response should be cached and for how long.&lt;br&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;optional headers&lt;/span&gt; - This provides an area for additional information to be added.  It is analogous to HTTP headers.&lt;br&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;message&lt;/span&gt; - The message to be returned to the client.&lt;br&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;optional security&lt;/span&gt; - This provides the option to provide identify of the server and sign responses.&lt;/blockquote&gt;

&lt;p&gt;A corresponding response might logically be:
&lt;blockquote style=&quot;font-weight: bold;&quot;&gt;&lt;nobr&gt;BORED 0.1 200(OK)  &quot;No Cache&quot; - (mime document/pdf .....data....) - ;&lt;/nobr&gt;&lt;/blockquote&gt;

&lt;p&gt;In this case the elements are:
&lt;blockquote&gt;preamble - BORED&lt;br&gt;
version - 0.1&lt;br&gt;
response code - 200(OK)&lt;br&gt;
cache information - &quot;No Cache&quot;&lt;br&gt;
optional headers - not included&lt;br&gt;
message - (mime document/pdf .....data....)&lt;br&gt;
optional security - not included&lt;/blockquote&gt;

&lt;p&gt;Tim Bray mentioned in this blog that it would be likely that any development of a protocol will probably end up looking a lot like HTTP.  I think his spot on!  You will find many of the same elements in different protocols.  However, some of the nuances between each protocol can have a big effect on a protocols design and flexibility.  For example, by moving the GET verb from the request header and into the body, we&#39;ve completely changed the character of the protocol.  HTTP is purposely constrained to a reduced set of verbs such as GET, PUT and POST.  However, BORED places the verb into the body of the message which allows any number of verbs to be implemented without disturbing the transfer portion of the protocol.

&lt;p&gt;Refering back to the layers of the protocol, we can see that most of the protocol is concerned with the transfer layer.  The message/presentation layer is the message structure and its structure can be defined without concern for the transfer layer.  The object receiver is concerned with how to process the message content and is outside the scope of the actual protocol.  It is only important that any type of data can be transferred to the Object Receiver in the message body. 

&lt;p&gt;The layered design should allow the message data to arrive at the Object Receiver using different methods (protocols or in other data structures).  This becomes important when providing a layered system.  A front-end server (e.g. apache) may receive the message and then use a different transfer protocol to pass the message to an internal system.  Using this method, the Object Receiver may receive additional information regarding the request; this would be dependent on the features of the internal system.  This design ensures that the message can be separated from the transfer protocol in a simple way without requiring processing the data contained inside the message.

&lt;p&gt;The import elements in the request which are required for the transfer layer include:
&lt;blockquote&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Preamble and Version&lt;/span&gt; - This simply sets the receiver of the message to understand and sync with the right version of the protocol.&lt;br&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Location&lt;/span&gt; - The location provides the target for the message.&lt;br&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Optional Headers&lt;/span&gt; - This can include information for Proxy servers, or request that the request is not responded to by caches.&lt;br&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Optional Security&lt;/span&gt; - This can be used for signing the message request data.&lt;/blockquote&gt;

&lt;p&gt;The message structure is the  payload of the transfer protocol.   The message layer requires a separate investigation and will be developed further later in this series of posts.

&lt;p&gt;This post provides the rough outline of the data to be included in requests. The message structure and meta data associated with request and response will be developed in future posts.  The next steps will be to test the protocol design against REST constraints and see what other features may be useful.</description>
				<pubDate>Tue Aug 26 10:46:18 GMT 2008</pubDate>
				<guid>http://www.livemedia.com.au/Blog/Binary_Object_REst_Distributed_(BORED)_system_-_Part_3_-_Structure?v=4</guid>
			</item>
			
			<item>
				<title>Binary Object REst Distributed (BORED) system - Part 2 - Blueprint</title>
				<link>http://www.livemedia.com.au/Blog/Binary_Object_REst_Distributed_(BORED)_system_-_Part_2_-_Blueprint</link>
				<description>The &lt;a href=&quot;http://www.blogger.com/%E2%80%9Dhttp://steve.vinoski.net/blog/2008/07/13/protocol-buffers-leaky-rpc%E2%80%9D&quot;&gt;discussions&lt;/a&gt; on Steve vinoski&#39;s blog regarding REST, RPC, ORBs, etc highlighted that there&#39;s usually a very high level model that a distributed system is built upon. In the case of RPC it is the notion that a procedure call can be made to look local.  In REST/Hypermedia it is a distributed document model with loose coupling through hyperlinks.  Finally, in the case of ORBs it is an Object Request Broker; an object based remote procedure call.  In all these cases the model helps define many of the constraints of the system.  These restrains often permeate into every aspect of the system.

&lt;p&gt;The BORED system has the rather interesting task of trying to combine the REST/Hypermedia constraints with that of an object orientated system.  To do this, a high level model needs to be defined to use as the blueprint.

&lt;p&gt;The BORED blueprint in this case is quite simple:
&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style=&quot;font-weight: bold;font-size:85%;&quot; &gt;&lt;nobr&gt;client --[request]--&gt; Server --&gt; Container --&gt;  Object Receiver  |  Object&lt;/nobr&gt;&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-weight: bold;font-size:85%;&quot; &gt;&lt;nobr&gt;
client &lt;--[response] -- Server &lt;-- Container &lt;--  Object Receiver | Object&lt;/nobr&gt;&lt;/span&gt;&lt;/blockquote&gt;

&lt;p&gt;The idea behind BORED is that a message is being delivered directly to an Object Receiver via a server and container.  The message can be any data.  It is up to the Object Receiver to decide how to process the message received.  The Container and Server are there as conduits for the message to be delivered, however, they do not directly respond to the message.  The conduits can add security constraints on who can interact with the target object and manage the life cycle of creating and destroying the target object.  The container itself could also be the Object Receiver, however, to keep the model simple these types of adaptations won&#39;t be discussed.

&lt;p&gt;The Object Receiver is able to respond directly to the message by returning the object data (as in a document or image).  This should allow a hypermedia solution to be developed that has simple file based Object Receiver.  Alternatively, the Object Receiver may process the message and call a method as is done in a traditional RPC or ORB.  Interactions could involve any one of the following:

&lt;blockquote style=&quot;font-weight: bold;&quot;&gt;&lt;nobr&gt;Object Receiver -------&gt;  Document/File&lt;/nobr&gt;

&lt;nobr&gt;Object Receiver -------&gt;  Object Instance with public methods&lt;/nobr&gt;

&lt;nobr&gt;Object Receiver -------&gt;  Data Collection&lt;/nobr&gt;

&lt;nobr&gt;Object Receiver -------&gt;  Proxy Interface&lt;/nobr&gt;

&lt;nobr&gt;Object Receiver -------&gt;  Etc...&lt;/nobr&gt;&lt;/blockquote&gt;

&lt;p&gt;An important note here regarding RPC and BORED.  BORED is designed to support a RPC mechanism, however, it is not locked into a single mechanism.  Different types of skeletons could be built into the Object Receiver.  The initial mechanism will likely use a Remote Message Call mechanism, however, it is up to the Object Receiver to define the meta data and interfaces associated with it.

&lt;p&gt;I have used the name ?Remote Message Call? to describe the BORED call method; this is to separate it from the traditional Remote Procedure Call (RPC). A Remote Procedure Call is the language centric view that maps a set of parameters of a method on a server to an equivalent local call on a client.  This is a simplistic view of RPC.  In BORED there is a message centric view of RPC.  That is, the remote call is defined by the data contained in the request object and the data returned in the response.  The message data in the request and response forms the contract between client and server.  This message data in the request or response can be bound to a language based method call on the client and server, however, it is not a requirement.  As BORED is based on describing the request/response data, not the remote method call this is not a traditional RPC mechanism.  The distinction is important and ensures that some of the issues of RPC do not get embedded into BORED.

&lt;p&gt;Interestingly, the BORED/RMC model reflects message queuing semantics more than it does RPC, REST or ORB semantics. The fundamental idea is that the data is contained in an envelope and delivered directly to an end point.  The difference is that the BORED model is designed for synchronous request/reply semantics, where as message queuing is uni-directional.

&lt;p&gt;As an example of how BORED semantics differ from HTTP, we can look at a HTTP GET request. The HTTP protocol uses the verb GET before specifying the location of the document to be retrieved.  This creates a model where the server is performing the GET operation on the document requested.  The BORED system will include a GET verb inside the message and deliver it to the Object Receiver.  By moving the GET verb into the message it is the ?Object Receiver? processing the verb instead of the server. The intention of this is to localise the requested data to the object to which it is being delivered.

&lt;p&gt;One thing I should point out at this point; the model is already making trade-offs.  The most obvious to the REST aware folk will be that by encapsulating the message in an envelope and by allowing language orientated mechanisms in the object receiver, BORED removes the Uniform Interface constraint of REST at the protocol level.  The Uniform Interface constraint can be catered for, however, in BORED it is not a constraint of the protocol and must be defined in the message data structure.  This is an area that still needs to be explored to work out how to combine the two seemingly opposed constraints.  This will be expanded further in future posts when the message data structure is explored.

&lt;p&gt;In the on-going REST debate, Tim Bray provided &lt;a href=&quot;http://www.blogger.com/%E2%80%9Dhttp://www.tbray.org/ongoing/When/200x/2008/08/18/On-REST%E2%80%9D&quot;&gt;a good description&lt;/a&gt; of the trade-offs  found in REST versus other systems.  These are good things to keep in mind while designing BORED.  It reminded me that I had&#39;nt described the layered approach used in BORED.

&lt;p&gt;In the BORED model there&#39;s at least three different layers.  Defining layers in a protocol ensures that concepts of each layer does not infect other layers.  The following compares the traditional OSI 7-layer model with HTTP and BORED.

&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;/span&gt;&lt;blockquote style=&quot;font-weight: bold;&quot;&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;OSI&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;HTTP&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;BORED&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;application&lt;/td&gt;&lt;td&gt;application (browser/client)&lt;/td&gt;&lt;td&gt;object receiver(client)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;presentation&lt;/td&gt;&lt;td&gt;mime (presentation)&lt;/td&gt;&lt;td&gt;message (DATA)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;session&lt;/td&gt;&lt;td&gt;transfer (HTTP)&lt;/td&gt;&lt;td&gt;transfer (BORED)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;transport&lt;/td&gt;&lt;td&gt;transport (TCP/IP)&lt;/td&gt;&lt;td&gt;transport (TCP/IP)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/blockquote&gt;

&lt;p&gt;I&#39;ve had a few conversations where people viewed the OSI 7-layer model is seen as out dated and not very useful in today?s protocol developments.  This may be true, however I still find it useful as a backdrop to understanding the layers of different protocols.  By modelling a protocol stack using this type of layering provides another view of the protocol.

&lt;p&gt;In the HTTP model the HTTP transfer protocol is easily recognisable as fitting the OSI session layer.  It sets up the structure of the conversation between client and server.  The data returned by a GET request specifies the mime-type which sets the presentation format for the response.  The uniform interface specified by HTTP spreads across both the session and application layers.  This unclear distinction of which layer the GET belongs is one example of how having a layered stack model can ensure each layers purpose is well understood.

&lt;p&gt;In the BORED model, the transfer part of the protocol will define the request/response semantics and setup the basis for communications.  The transfer layer will also provide the security and location of where the message will be delivered.  The message data layer defines the presentation layer of the model.  The message data should provide all the data required by the Object Receiver to perform its request.

&lt;p&gt;A good analogy is a physical envelope.  The transfer layer is the envelope which has the address, any routing information, the sender and any security information.  The message layer is the paper that is put into envelope.  The paper can contain any sort of information that the recipient can process.  The Object Receiver layer is the actual data contained on the paper and directs the Object Receiver to perform an action.  By ensuring the each layer is self contained, the whole system will be more flexible and easier to work with.

&lt;p&gt;This post outlines the model for the BORED system.  It has constrained BORED to request/response semantics directed to an Object Receiver.  It has outlined the Remote Message Call (RMC) semantics used to create a solid distinction between it and Remote Procedure Calls (RPC).  Finally, it outlined the layers in the protocol stack so that each layer can be analysed and its purpose described independently.  In the next post I&#39;ll do a first cut of the logical elements of the protocol.

&lt;p&gt;Got any comments, you can leave them on the shadow blog &lt;a href=&quot;http://blog.livemedia.com.au&quot;&gt;here&lt;/a&gt;.</description>
				<pubDate>Fri Aug 22 05:07:02 GMT 2008</pubDate>
				<guid>http://www.livemedia.com.au/Blog/Binary_Object_REst_Distributed_(BORED)_system_-_Part_2_-_Blueprint?v=1</guid>
			</item>
			
			<item>
				<title>18 August 2008 - Binary Object REst Distributed (BORED) system - Part 1</title>
				<link>http://www.livemedia.com.au/Blog/18_August_2008_-_Binary_Object_REst_Distributed_(BORED)_system_-_Part_1</link>
				<description>I was recently involved in a &lt;a href=&quot;http://www.blogger.com/%E2%80%9Dhttp://steve.vinoski.net/blog/2008/07/13/protocol-buffers-leaky-rpc%E2%80%9D&quot;&gt;long discussion&lt;/a&gt; over at &lt;a href=&quot;http://www.blogger.com/%E2%80%9Dhttp://steve.vinoski.net/blog%E2%80%9D&quot;&gt;Steve Vinoski&#39;s blog&lt;/a&gt; regarding RPC and REST.  The discussion was been long and multi-faceted covering definitions of RPC, REST and various other aspects of distributed computing.  Steve has recently &lt;a href=&quot;http://www.blogger.com/%E2%80%9Dhttp://steve.vinoski.net/blog/2008/07/28/spot-on/%E2%80%9D&quot;&gt;closed the loop&lt;/a&gt; on the discussions referencing some comments from Stu Charlton which offer a higher level perspective.  The whole thing is a good read if you&#39;re into learning about the innards of the web and views on distributed systems.
&lt;p&gt;One of the benefits of having these types of discussions is learning new perspectives and technology.  There&#39;s nothing like getting into the nitty gritty and working out where opinions and ideas intersect.  One of the things I learnt along the way is that I had misunderstood the meaning of REST.  I was told to go and read Roy Fielding&#39;s (the person who coined REST) PHD dissertation.  Unless you&#39;ve read Fielding&#39;s dissertation it&#39;s most likely that you don&#39;t actually know the true meaning of REST.  To quote myself in Steve&#39;s blog after I had read Fielding&#39;s dissertation:
&lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;blockquote&gt;&quot;REST is fundamentally not RPC.  REST is an &#39;architectural style&#39; that is designed to ensure that the web&#39;s hypermedia solution to distributed computing will not be ruined by future changes.  REST is not a design pattern or an implementation.  You could look at the actions of REST and loosely suggest as I&#39;ve done in the past, and Michi has, that they have some similarities to RPC.  I don&#39;t think it is an argument worth pursuing.  This does not mean that the REST architecture doesn&#39;t look like RPC on the client, but I&#39;ll get to that later.  REST is as different from RPC as it is from Message Queueing or Publish Subscribe systems.&quot;&lt;/blockquote&gt;&lt;/i&gt;&lt;/p&gt;&lt;p&gt;Of course Wikipedia has a better description of the situation:
&lt;i&gt;&lt;/i&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;i&gt;&quot;REST strictly refers to a collection of network architecture principles which outline how resources are defined and addressed. The term is often used in a looser sense to describe any simple interface which transmits domain-specific data over HTTP without an additional messaging layer such as SOAP or session tracking via HTTP cookies. These two meanings can conflict as well as overlap&quot; &lt;/i&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;I&#39;ve been asking myself, how can I apply REST constraints to a binary protocol?  I&#39;ve spent the last week or two developing a thought experiment for a protocol design for a Binary Object REst Distributed (BORED) system.  This may not go any further than a thought experiment, however, it should highlight some of the trade-offs you make when developing a protocol.  With some luck I&#39;ll attract some other smart people to throw in their thoughts and may end up with something useful; or at least some useful material for future work.
&lt;/p&gt;&lt;p&gt;Future posts will go into the detail of the BORED protocol; however, for now I&#39;ll highlight the guiding principles:
&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;REST&lt;/b&gt; - REST has a strong architectural style that has many benefits for internet scale distributed systems.  This has obviously been proven by the World Wide Web.  The BORED protocol must live up to the architectural requirements specified by REST.
&lt;/li&gt;&lt;li&gt;&lt;b&gt;Binary&lt;/b&gt; - The data encoding will be binary.  I have a long history with binary encoding with Argot.  The protocol will leverage the learning and methods used in Argot.  The protocol may still be applicable to other binary encodings.
&lt;/li&gt;&lt;li&gt;&lt;b&gt;Object&lt;/b&gt; - Integrating the REST model with an Object model is to a certain extent a direct contradiction.  However, there&#39;s a huge disconnect currently between REST and programming languages; I&#39;ll see if I can find a way to align the two.
&lt;/li&gt;&lt;li&gt;&lt;b&gt;Scalable&lt;/b&gt; - The solution must be able to scale from tiny embedded devices to enterprise systems. Embedded devices require a protocol that can be scaled to respond to requests in only a few KB of code.
&lt;/li&gt;&lt;/ul&gt;The above should provide the flavour of the protocol to be designed. Obviously, there will be trade-offs. I&#39;ll replicate the posts on another blog site so people can provide feedback (this site doesn&#39;t currently provide a feedback mechanism).  These posts are replicated at &lt;a href=&quot;http://blog.livemedia.com.au&quot;&gt;blog.livemedia.com.au&lt;/a&gt; to allow comments to be posted.

&lt;p&gt;Also, I should mention, the name BORED was probably not the best acronym I could come up with.  I think it&#39;s somewhat fitting though, as I&#39;m bored with all the arguments about which distributed system is better.  I&#39;d rather work on how to combine great technology to make even better systems.
&lt;/p&gt;</description>
				<pubDate>Mon Aug 18 12:46:22 GMT 2008</pubDate>
				<guid>http://www.livemedia.com.au/Blog/18_August_2008_-_Binary_Object_REst_Distributed_(BORED)_system_-_Part_1?v=3</guid>
			</item>
			
			<item>
				<title>12 July 2008 - Protocol Buffers</title>
				<link>http://www.livemedia.com.au/Blog/12_July_2008_-_Protocol_Buffers</link>
				<description>This week Google released &lt;a href=&quot;http://code.google.com/p/protobuf/&quot;&gt;Protocol Buffers&lt;/a&gt; to much acclaim, receiving coverage on &lt;a href=&quot;http://tech.slashdot.org/tech/08/07/08/201245.shtml&quot;&gt;slashdot&lt;/a&gt;,

&lt;a href=&quot;http://www.osnews.com/story/20012/Google_Open-sources_its_Internal_Data_Exchange_Language&quot;&gt;osnews&lt;/a&gt; and other places.  I must admit that I haven&#39;t looked too closely at Protocol Buffers implementation.  This is because I read as far into the documentation to discover that there&#39;s a set number of primitive types that can be encoded onto the wire.  This basically equates to yet 
another adaption of the &lt;a href=&quot;http://www.ietf.org/rfc/rfc1832.txt&quot;&gt;Sun XDR&lt;/a&gt; data encoding method used in the original RPC.

&lt;p&gt;I must admit that I did do a little &lt;a href=&quot;http://groups.google.com/group/protobuf/browse_thread/thread/298c95b3329aa205/0879fde92426f1a3?lnk=gst&amp;q=einet#0879fde92426f1a3&quot;&gt;astroturfing&lt;/a&gt; on the Protocol Buffers google group which did actually result in a few hits to the einet web site.  It didn&#39;t equate to any downloads or any actual interest in Argot which is quite disappointing.  Obviously astroturfing is not the right way 
to advertise a new technology.

&lt;p&gt;There&#39;s also been a few responses in the blogosphere regarding this release from &lt;a href=&quot;http://blogs.tedneward.com/2008/07/11/So+You+Say+You+Want+To+Kill+XML.aspx&quot;&gt;Ted Neward&lt;/a&gt;, &lt;a href=&quot;http://steve.vinoski.net/blog/2008/07/11/protocol-buffers-no-big-deal/&quot;&gt;Steve Vinoski&lt;/a&gt; and &lt;a href=&quot;http://www.innoq.com/blog/st/2008/07/google_can_have_stupid_ideas_t.html&quot;&gt;Stefan Tilkov&lt;/a&gt;.  The latter two have simply deferred to Ted&#39;s entry which comprises a good analysis of Protocol Buffers.  As I read this analysis, I started to think how &lt;a href=&quot;http://www.einet.com.au/Argot/Introduction_to_Argot&quot;&gt;Argot&lt;/a&gt; solved many of the issues pointed out in Protocol Buffers.  I was going to respond to Ted&#39;s blog, but its probably easier to do this here on my own Blog.

&lt;p&gt;Before getting into responding to Ted&#39;s analysis, I should say what Argot is all about.  At its most basic Argot is about defining meta data for describing binary data formats and a library for encoding and decoding that data.  What makes Argot interesting is that the meta data itself is encoded in binary.  This creates the ground work for dynamic data agreement and various other things.  There&#39;s a full description of Argot &lt;a href=&quot;http://www.einet.com.au/White_papers/Argot_White_Paper&quot;&gt;here&lt;/a&gt;, so I won&#39;t bother with the technical implementation details right now.  

&lt;p&gt;The first issue Ted found with Protocol Buffers is their claim of language and/or platform-neutrality.  I must admit I do claim the same with Argot.  I also still regard this as a reasonable claim, and believe Protocol Buffers claim is also reasonable.  In my mind, this is not a claim that the solution has complete coverage of all languages.  It&#39;s simply a claim that no special language tricks or platform specifics have leaked into the data format.  Compare this against RMI or other language specific solution.  To implement RMI on another language would be difficult as its core data encoding requires Java specific information.  I do understand Ted&#39;s issue with this and agree that XML&#39;s coverage is huge.  Currently I have implementations of Argot in Java, C and C#, although I&#39;m currently only working on updating and improving Java.  So yes Argot is 
designed to be language and platform neutral but is currently best supported by Java.

&lt;p&gt;Next Ted reminisces to when binary formats were big.  Actually, I don&#39;t remember them being big at 
all.  I remember CORBA being the big thing.  Other than ASN.1 there has been very few attempts to 
build structured binary data formats that are independent of RPC or other system.  There&#39;s some big problems with binary formats being 
inflexible, tightly-coupled, etc because there has been no real interest in actually solving these 
problems at a binary level.  I will come back to many of these issues soon, as these are the exact 
problems I built Argot to solve.


&lt;p&gt;Ted moves on to talk about all the advantages of XML.  I agree with most of his comments on XML.  
For what XML was designed to be, it has done very well.  And it has stayed true to its initial 
principles.  This is great, but XML is not solving many of the things it was not designed to 
solve.  Yes this makes little sense intentionally.  There are many situations where binary data 
formats are required for speed, size constraints, etc.  XML is not the data presentation layer 
silver bullet.  The problem Argot, Protocol Buffers and others are trying to solve is how to move 
binary data around in a fast, efficient way.  Ideally many of the advantages and lessons learned 
with XML and XML Schema can be applied to binary data formats.

&lt;p&gt;As a side note, one area that I&#39;ve just started working in the last few months is investigating the issues of interoperability for home area network (HAN) devices in the Energy industry.  There&#39;s some really interesting work being done to build interoperable systems.  They are defining the data formats to ensure all the smart appliances will work together in the home.  These are really hard problems which require binary data format agreements so even the smallest of devices can work together.  This is not an area where XML will be accepted.  Its a market where manufacturing items are costed 
in cents and the CPU processing power required for XML is not acceptable.  However, these 
industries need to face all the problems that binary solutions provide without the tools and 
solutions that XML provides.  Surely there&#39;s a better way than just accepting the old issues in 
binary data solutions.

&lt;p&gt;To bring it back to Ted&#39;s analysis of Protocol Buffers.  I&#39;m sure he understands that there&#39;s a 
need for binary data.  I think he takes issue that Protocol Buffers is claiming to provide similar benefits of XML in a binary format.  I agree completely that Protocol Buffers does not provide most of the benefits of XML.  The problem is that in this increasingly connected world where convergence will mean that every appliance in the house might soon be conversing, we really do need a solution.  We actually need more people working on this and not just saying how wonderful XML is.  I accept that XML is great in all that it achieves, but I don&#39;t accept that we can&#39;t have most of the benefits of XML in a binary format for where it is required.

&lt;p&gt;Ted also refers to the XML binary InfoSet specification in his analysis.  I think I need to be clear here that when I talk about requiring many of the benefits of XML in a binary format, I don&#39;t believe that XML binary Infoset or similar is the answer.  These solutions still require complex decoding mechanism which once again do not work in many situations.  We need the benefits of XML at a really basic binary level.

&lt;p&gt;I&#39;ll now move onto the guts of Ted&#39;s analysis of Protocol Buffers. I&#39;ll now examine some of the biggest short comings of Protocol Buffers identified by Ted.  I&#39;ll discuss: if Argot solves it, if its required by binary communications and if it can be done effectively.

&lt;ul&gt;
&lt;li&gt;Binary is hard to work with.  Agreed.  However, as already discussed its a requirement in many situations.  Lets make it as easy as possible to work with.  Argot solves the problem by creating and incredibly flexible meta data structure that can be extended.  In fact I&#39;m willing to claim that the Argot meta data format (which has similarities to S-Expressions) is more flexible than XML Schema and anything else out there.  I agree that binary data will never be as easy as text for humans to read, however, in the situations where it is needed it is not humans reading it.  In these situations we should build tools to make it easier for humans to read.  The way to achieve this is through good meta data.

&lt;li&gt;Binary is tightly-coupled.  This is probably the biggest issue with binary.  In fact for most situations binary solutions actually need to be tightly-coupled for each individual message.  This is where Argot shines the brightest.  It is the only solution I know that can allow two peers to dynamically discover each element&#39;s meta data.  What this means is that a server and client can support multiple versions of the same data structure and pick the format that both will use.  I believe this is a very important capability which is needed in binary solutions.  It gives clients and servers the ability to change over time and still support sets of data formats.  For more details read about the TypeMap in the Argot documentation. I call this allowing tight-binding and loose-coupling.  An important note is that I have proved this with a server implementation of around 7kb.  It does not take a huge amount of data as the meta data format is itself binary.

&lt;li&gt;XPath.  This is something I believe can be achieved using Argot, however, it is not something I&#39;ve worked on.  At the moment, I don&#39;t believe its an area that developers need solutions for when binary is required.  Its a nice to have that could be added to Argot tools.

&lt;li&gt;XSLT.  I agree this is a great example of what can be built over the top of XML.  I have a long term plan to build something like this, however, it requires a language around Argot which is not yet developed.  Once again, this is not a core requirement for working with binary solutions that is required today.

&lt;li&gt;Structureless parsing.  This is an area that I&#39;ve just started working on.  I believe that with enough meta data you can parse anything.  In the next release of Argot I&#39;ve built a parser that is able to read binary data into a form of DOM tree without knowing the meaning of the data.  This is an important step to building XPath, XSLT and generic binary data editor tools.  This also makes it possible to connect to a server and dynamically discover its interfaces and message formats and then dynamically build requests and read responses.  Solving this ability at a binary level should lead to some interesting results when all appliances in the home can publish their message formats and capabilities.
&lt;/ul&gt;

&lt;p&gt;There&#39;s probably a lot more that I could add here about Argot.  However, I&#39;m trying not to make this a sales pitch.  The point I&#39;m trying to make is that XML is a great tool for many situations.   However, there are plenty of situations where binary data is required.  We need more people understanding what is needed to build binary systems that support many of the features already supported by XML.  We also need to recognise that the situations binary data is used is different from XML.  The set of tools and use cases are different.  I know that it is possible to build tightly-bound and loosely-coupled servers that communicate in binary as I&#39;ve done it with Argot.  Maybe someone can prove me wrong with Argot; I&#39;d enjoy the discussion.
</description>
				<pubDate>Sat Jul 12 09:07:32 GMT 2008</pubDate>
				<guid>http://www.livemedia.com.au/Blog/12_July_2008_-_Protocol_Buffers?v=8</guid>
			</item>
			
			<item>
				<title>19 June 2008 - Argot</title>
				<link>http://www.livemedia.com.au/Blog/19_June_2008_-_Argot</link>
				<description>Here&#39;s an example of the changes that&#39;s been made in Argot in the latest version. In Argot 1.2 an unsigned 8-bit integer:

&lt;pre&gt;u8: meta.basic( 8, 0 );&lt;/pre&gt;

&lt;p&gt;In the latest version, the text format is now using a form of S-Expressions.  The unsigned 8-bit integer now looks like:

&lt;pre&gt;
(meta.structure meta.name:&quot;uint8&quot; 
   (meta.fixed_width uint8:8 
       [ (meta.fixed_width.attribute.size uint8:8)
         (meta.fixed_width.attribute.integer)
         (meta.fixed_width.attribute.unsigned)
         (meta.fixed_width.attribute.bigendian) ] ))
&lt;/pre&gt;

&lt;p&gt;There&#39;s obviously some big changes here.  The name has changed from u8 to uint8 to be more in line with the C language definition.  The other big change is that instead of defined using meta.basic, it is defined with meta.fixed_width.  This new type includes the size and an array of attributes.  The attribute type is abstract and can be extended define any number of attribute types.

&lt;p&gt;The same definition can be shown in a very quick and dirty visual editor.

&lt;p&gt;&lt;img src=&quot;/files/uint8.gif&quot;/&gt;

&lt;p&gt;There&#39;s plenty to improve with the editor, but it shows the concept.

</description>
				<pubDate>Thu Jun 19 12:56:21 GMT 2008</pubDate>
				<guid>http://www.livemedia.com.au/Blog/19_June_2008_-_Argot?v=3</guid>
			</item>
			
			<item>
				<title>18 June 2008 - Argot progress!</title>
				<link>http://www.livemedia.com.au/Blog/18_June_2008_-_Argot_progress!</link>
				<description>After studying the idea of a language for Argot I realised that I needed to go back and make some changes to Argot to support it.  Over the last few weeks I updated the Argot dictionary compiler and built an Argot 1.3 alpha.  This latest version has required some major changes to the guts of Argot.  Today I just finished some end to end testing which shows that all the changes are working.

&lt;p&gt;The first was to move the Argot dictionary text format to a S-Expression format.  This is the first step to allowing an Argot language which uses the same S-Expression format.  The Argot compiler can now over time be updated to read any type of data.

&lt;p&gt;The next was to update the Meta Dictionary.  The meta dictionary is the set of self describing data elements which forms the heart of Argot.  This is normally a scary process as each small change ripples through other parts of the meta dictionary.  While the changes were quite major they didn&#39;t change the more difficult aspects of the meta dictionary.  

&lt;p&gt;The changes included changing the meta.basic type to meta.fixed_width.  This now has attributes which can be expanded to describe any fixed width data type.  The other was to split the meta.reference type into a meta.reference and meta.tag type.  Originally all references required a description.  This wasn&#39;t required in many situations.  Now the reference is a simple type reference and the tag provides a description.  The other was to allow abstract data types to map to other abstract data types.  This creates a more flexible type system.

&lt;p&gt;The final change which has been the most challenging has been to create a Document Object Model(DOM) style interface to Argot.  The ability to read in Argot data directly into business objects or into an abstract DOM structure.  The current version has some code duplication, but works like a charm.

&lt;p&gt;There&#39;s still some clean up to do on the code, but it should be released soon.  I may even build a small example Argot editor to show off the new DOM style data.

&lt;p&gt;PS If none of that made any sense whats so ever.. don&#39;t worry, it will all become clearer when an Argot editor is built!</description>
				<pubDate>Wed Jun 18 13:15:37 GMT 2008</pubDate>
				<guid>http://www.livemedia.com.au/Blog/18_June_2008_-_Argot_progress!?v=2</guid>
			</item>
					
	</channel>
</rss>
