<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>diretto</title>
	<atom:link href="http://www.diretto.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.diretto.org</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Thu, 04 Aug 2011 15:34:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Design guidelines used for the diretto RESTful APIs</title>
		<link>http://www.diretto.org/2011/08/design-diretto-restful-apis/</link>
		<comments>http://www.diretto.org/2011/08/design-diretto-restful-apis/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 15:34:02 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[web service]]></category>

		<guid isPermaLink="false">http://www.diretto.org/?p=436</guid>
		<description><![CDATA[During the redesign of the diretto APIs, we focussed on a style that follows more the principles of REST and paid attention to a consistent use of patterns and guidelines for all of our APIs. While some of them are well established, others are rather controversial to some extent in the REST community. This article [...]]]></description>
			<content:encoded><![CDATA[<p>During the redesign of the diretto APIs, we focussed on a style that follows more the principles of REST and paid attention to a consistent use of patterns and guidelines for all of our APIs. While some of them are well established, others are rather controversial to some extent in the REST community. This article gives a short overview hereof.</p>
<p><strong>Extensive documentation</strong></p>
<p>Although in theory a single starting URI should be enough to describe a REST API, we wanted to provide extensive documentation for all of our APIs. This not just helps us to keep track of our API features, it also helps developers to getting started with it.</p>
<p>The documentation lists all of the resources, possible representations and operations on these resources. For operations, sample entities as well as a list of possible response codes are listed. The documentation also provides URI template information and authentication requirements.</p>
<p>We developed our own <a href="https://github.com/berb/rest-doc-template">template for creating REST documentations</a> that transforms a XML-based descriptions of an API into a HTML file (or other formats such as plaintext or PDF). All example entities (in our case only JSON) have been validated and formatted, to assure correct and readable snippets.</p>
<p><strong>URI as only ID</strong></p>
<p>Another change was the introduction of URIs as the only way of identifying platform resources. While this is an obvious characteristic of REST, we were still referring to our internal resource IDs in some of our API calls in the previous version. Now we use URIs for everything.</p>
<p><strong>Hyperlinks between resources</strong></p>
<p>A side benefit of the URI-only approach is the increased linking between different resources. When a user creates a resource, it&#8217;s representation will not list his name or internal ID as the creator, but it will contain a hyperlink to the user&#8217;s URI. By providing useful links to the most important resources on the entry resource, a client can now navigate through the entire platform without having to know any URI pattern or template in advance.</p>
<p><strong>Collection Resources</strong></p>
<p>This is a bit controversial when it comes to URI design, but we decided to differentiate between a resource path prefix and a resource collection path prefix. So when the URI of a resource is <code>/resource/{internal-id}</code>, the corresponding collection resource is <code>/resources</code>. The separation prevents collisions when the collection resource has sub-resources itself. </p>
<p><strong>Pagination using cursors</strong></p>
<p>Our APIs contain a lot of resources that provide lists to other resources. With unbound length, it is not reasonable to return an entire list in a single request. We therefore use pagination to split up these lists. Pagination is done using cursors allowing stateless pages. Each page contains a list of links pointing to the previous and next page as well as the first page of the list. A page is identified by the first hit on the page. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.diretto.org/2011/08/design-diretto-restful-apis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Layers of the diretto Platform</title>
		<link>http://www.diretto.org/2011/06/the-layers-of-the-diretto-platform/</link>
		<comments>http://www.diretto.org/2011/06/the-layers-of-the-diretto-platform/#comments</comments>
		<pubDate>Fri, 03 Jun 2011 19:57:22 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[project]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[layers]]></category>

		<guid isPermaLink="false">http://www.diretto.org/?p=422</guid>
		<description><![CDATA[The diretto platform is not a single application. It is rather a set of modular components both in terms of usage and of general project architecture. This blog entry describes the different layers and the underlying ideas of the system. The common ground is an elaborated conception, what distributed reporting should be for the diretto [...]]]></description>
			<content:encoded><![CDATA[<p>The diretto platform is not a single application. It is rather a set of modular components both in terms of usage and of general project architecture. This blog entry describes the different layers and the underlying ideas of the system.</p>
<p><img src="http://www.diretto.org/wp-content/uploads/2011/06/diretto_layers.png" alt="" title="diretto_layers" width="587" height="330" class="alignright size-full wp-image-423" style="border:0px" /></p>
<p>The common ground is an elaborated <strong>conception</strong>, what distributed reporting should be for the diretto platform. The key entity is a document, that is a testimony of an event. A document possess a geo-spatial and temporal source of origin. While documents are abstract entities, there are always at least one attachment appended to it. Further attachments allow enhanced or processed variants of the original piece. Users can apply tags and comments to a document, propose updated time/place origins and vote on all of these items. Key value pairs provide additional tags beneficial for machines and links allow to connect causally related documents.<br />
<em>While this was a rather generic description, here is an example: Alice is eye-witness of an event an takes a photo (document) with her smartphone. She uploads the raw image (attachment), and appends the time and position. Unfortunately, Alice does not have GPS enabled, so the position is inaccurate. Bob is not on-site but accesses the platform via browser. He sees the images and recognizes the exact position. He then proposes an improved position and appends some useful tags. He downloads the image and improves the contrast. He then uploads the outcame as an additional attachment. Other examples for documents are videos, audio recordings, text messages, sensor reports etc.</em></p>
<p>To make this conception computationally comprehensible, it is described in form of a language-agnostic <strong>API</strong>. In detail, we have chosen a RESTful approach, based on HTTP. Thus our API is a set of (connected) resources and valid operations on these resources. Different concerns are separated by different APIs. So there is for instance an API that handles the upload, download and storage of raw documents that have been submitted. But handling comments, votes etc. is handled by another API, and so on. This not just modularizes the API, it also allows you to use only subsets of the API, depending on your use case.</p>
<p>Basically, you could start to implement components for the diretto platform by implementing the two sides of the API – the service providers (servers), and the service consumers (clients). However, we offer a <strong>middleware</strong> that already provides the platform internals, based on the APIs. More precisely, we offer a backend service implementation that represents a service provider. On client side, we offer ready-to-use client libraries so you don&#8217;t have to deal with low-level communications.</p>
<p>So relying on our middleware allows you to build your specific reporting <strong>application</strong> on top of the platform. Whether you are bird-watching or you are going to provide live-coverge of a sports event – you don&#8217;t have to start from scratch. Instead, you can select from the diretto platform the parts of the toolkit that you actually need and directly start to develope it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.diretto.org/2011/06/the-layers-of-the-diretto-platform/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Preview: diretto Task API</title>
		<link>http://www.diretto.org/2011/05/preview-diretto-task-api/</link>
		<comments>http://www.diretto.org/2011/05/preview-diretto-task-api/#comments</comments>
		<pubDate>Thu, 19 May 2011 09:03:37 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[project]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[crowd]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[location based service]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[task]]></category>
		<category><![CDATA[web service]]></category>

		<guid isPermaLink="false">http://www.diretto.org/?p=284</guid>
		<description><![CDATA[The Task API is an additional service API that provides support for advanced task management between different platform users while reporting, but also thereafter. It represents an optional service API that does not belong to the core platform, although deployments will be beneficial in most scenarios. Task API: http://diretto.github.com/diretto-api-doc/v2/diretto-ext/task.html Repository:  https://github.com/diretto/diretto-api-doc In short, users can [...]]]></description>
			<content:encoded><![CDATA[<p>The Task API is an additional service API that provides support for advanced task management between different platform users while reporting, but also thereafter. It represents an optional service API that does not belong to the core platform, although deployments will be beneficial in most scenarios.</p>
<p><a href="http://diretto.github.com/api/v2/diretto-ext/task.html"><img class="alignnone size-full wp-image-307" title="task-api" src="http://www.diretto.org/wp-content/uploads/2011/05/task-api.png" alt="" width="468" height="120" /></a></p>
<p>Task API: <a href="http://diretto.github.com/diretto-api-doc/v2/diretto-ext/task.html">http://diretto.github.com/diretto-api-doc/v2/diretto-ext/task.html</a><br />
Repository:  <a href="https://github.com/diretto/diretto-api-doc">https://github.com/diretto/diretto-api-doc</a></p>
<p>In short, users can create tasks, and other users can participate in these tasks. In terms of the diretto platform, a task is a request of specific footage. Reporters may take in part in tasks and contribute required documents as submissions. A task is always bound to a location and a time frame. A title and description define the task and optional tags allow to categorize it. Votes help to prioritize different tasks within the community. Tasks can be commented for exchange of ideas. Finally, every user can submit an existing document as footage for the task. The community can then rate the suitability of the submission regarding the task request. Besides the of directed collection of live footage, the Task API can also be used for specialized search queries. In this case, a task represents a search query and all potential results are submissions. This user-driven search is helpful for queries when only users can reason about appropriate hits by analyzing the documents.</p>
<p><strong>Example 1 – Directed reporting</strong><br />
<em>Scenario:</em> The diretto platform has been deployed for a major sports event, let&#8217;s say a marathon.<br />
Spectators are encouraged to upload live photos from their wayside position, thus creating a large collection of different photos from this event. Due to special interest in photos of the current title holder a contender, a task has been created for this. When taking pictures of these runners, a reporter may add the document as a submission to this task.</p>
<p><strong>Example 2 – User-driven search</strong><br />
<em>Scenario:</em> A tsunami has devastated a larger coastal area. In the aftermath, a diretto platform has been deployed in order to collect corresponding media footage. Although there was a major infrastructure breakdown, eyewitnesses had been able to make photos and videos using their cameras or smartphones. A few days later, many of these documents have been uploaded and are now available on the internet.<br />
The diretto platform is used to aggregate these documents combined with temporal and spatial meta data. A task is then created querying for documents that capture the exact moment of the flooding for further analysis. Platform users may now survey all existing document and suggest appropriate footage to the task as submission.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.diretto.org/2011/05/preview-diretto-task-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>diretto @ Streiflicht 2011</title>
		<link>http://www.diretto.org/2011/02/diretto-streiflicht-2011/</link>
		<comments>http://www.diretto.org/2011/02/diretto-streiflicht-2011/#comments</comments>
		<pubDate>Sat, 12 Feb 2011 12:32:56 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[project]]></category>
		<category><![CDATA[uulm]]></category>

		<guid isPermaLink="false">http://www.diretto.org/?p=259</guid>
		<description><![CDATA[The diretto project will be featured at Streiflicht 2011. This event presents results of various elective courses and student works from the Institute of Media Informatics at Ulm University.]]></description>
			<content:encoded><![CDATA[<p>The diretto project will be featured at <a href="http://www.uni-ulm.de/in/mi/highlights.html"><em>Streiflicht 2011</em></a>. This event presents results of various elective courses and student works from the <a href="http://www.uni-ulm.de/in/mi/">Institute of Media Informatics</a> at <a href="http://www.uni-ulm.de/">Ulm University</a>.</p>
<p><a href="http://www.diretto.org/wp-content/uploads/2011/02/streiflicht2011-600px.jpg"><img class="alignnone size-full wp-image-260" title="streiflicht2011-600px" src="http://www.diretto.org/wp-content/uploads/2011/02/streiflicht2011-600px.jpg" alt="" width="600" height="170" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.diretto.org/2011/02/diretto-streiflicht-2011/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Preview: diretto APIs v2</title>
		<link>http://www.diretto.org/2011/02/preview-diretto-apis-v2/</link>
		<comments>http://www.diretto.org/2011/02/preview-diretto-apis-v2/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 11:50:17 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[project]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[web service]]></category>

		<guid isPermaLink="false">http://www.diretto.org/?p=223</guid>
		<description><![CDATA[The upcoming diretto v2 release will restructure the current API and introduce several new functions. We decided to split up the API into several modules. Image by nataliejohnson; cc-by-nc/2.0 Core API The Core API represents the only mandatory API that is necessary for a diretto platform (although in most cases at least the Storage API [...]]]></description>
			<content:encoded><![CDATA[<p>The upcoming diretto v2 release will restructure the current API and introduce several new functions. We decided to split up the API into several modules.</p>
<p><a title="Pipes by nataliej, on Flickr" href="http://www.flickr.com/photos/nataliejohnson/2975564921/"><img src="http://farm4.static.flickr.com/3239/2975564921_f4fe3b1aa0.jpg" alt="Pipes" width="500" height="333" /></a><br />
<em style="color: #999; font-size: .8em;"><a href="http://www.flickr.com/photos/nataliejohnson/2975564921/">Image</a> by <a href="http://www.flickr.com/photos/nataliejohnson/">nataliejohnson</a>; cc-by-nc/2.0</em></p>
<p><strong>Core API</strong><br />
The Core API represents the only mandatory API that is necessary for a diretto platform (although in most cases at least the Storage API will be required as well). The Core API provides access to the common operations like adding user-generated documents and contents as well as query and retrieve methods.</p>
<p><strong>Storage API</strong><br />
The Storage API handles the upload, storage and access of multimedia files on platform. This API is independent of the actual backend storage used.</p>
<p><strong>Feed API</strong><br />
The Feed API provides different news feed formats, including ATOM and KML. A PubSubHubbub publisher node enables push-style notifications of changes.</p>
<p><strong>Streaming API</strong><br />
The Streaming API exposes an event-based notification service. As an alternative to the PubSubHubbub-enabled feeds, the notification streams can help to create real-time applications and services for the diretto platform.</p>
<p><strong>Registry API</strong><br />
The Registry API allows external services to register. This facilitates lookup and discovery of additional services for the clients.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.diretto.org/2011/02/preview-diretto-apis-v2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Documenting RESTful APIs</title>
		<link>http://www.diretto.org/2011/01/documenting-restful-apis/</link>
		<comments>http://www.diretto.org/2011/01/documenting-restful-apis/#comments</comments>
		<pubDate>Thu, 27 Jan 2011 11:06:43 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[rest]]></category>

		<guid isPermaLink="false">http://www.diretto.org/?p=245</guid>
		<description><![CDATA[There are some rumors that an API that completely follows the REST paradigm does not need a documentation as a single entry point URI is all you need to get started. The uniform interface, self-descriptive representations of resources and linked resources through hypermedia encourage an interaction flow very similar to human web browsing. As programming [...]]]></description>
			<content:encoded><![CDATA[<p>There are some rumors that an API that completely follows the REST paradigm does not need a documentation as a single entry point URI is all you need to get started. The uniform interface, self-descriptive representations of resources and linked resources through hypermedia encourage an interaction flow very similar to human web browsing.</p>
<p>As programming completely generic REST clients is still a long way off – also due to missing availability of powerful semantic representations – it&#8217;s unlikely that developers will take this route when implementing clients for your RESTful service. So it is beneficial to have an extensive API documentation, even if you follow the pure REST idea. This not just eases client development, it also helps you to maintain your service as you have to document your stuff anyway.</p>
<p>The popular WADL format tends to be a machine-readable description that helps generating code. For the documentation of the new diretto APIs, we decided to create our own format, that facilitates the creation of high-quality and comprehensive documentations for human readers instead. The XML-based templates can be rendered into various formats, like plain text, XHTML and PDF (using LaTeX).</p>
<p>You can fork the rest-doc-template project at github: <a href="https://github.com/berb/rest-doc-template">https://github.com/berb/rest-doc-template</a></p>
<p>There are also examples available:</p>
<ul>
<li><a href="https://github.com/berb/rest-doc-template/blob/master/example/example.xml">API Description</a></li>
<li><a href="https://github.com/berb/rest-doc-template/tree/master/output/example">Output</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.diretto.org/2011/01/documenting-restful-apis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>geocouch-utils</title>
		<link>http://www.diretto.org/2011/01/geocouch-utils/</link>
		<comments>http://www.diretto.org/2011/01/geocouch-utils/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 11:15:13 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[couchdb]]></category>
		<category><![CDATA[geocouch]]></category>
		<category><![CDATA[geojson]]></category>
		<category><![CDATA[json]]></category>

		<guid isPermaLink="false">http://www.diretto.org/?p=237</guid>
		<description><![CDATA[We stick to GeoCouch also in our upcoming v2, where we are currently working on. It provides us a scalabale storage that can also handle spatial queries efficiently. We recently joined Volker Mische, Max Ogden and David Thompson in an effort to create a repository that collects common GeoCouch functionalities. This currently includes a KML [...]]]></description>
			<content:encoded><![CDATA[<p>We stick to GeoCouch also in our upcoming v2, where we are currently working on. It provides us a scalabale storage that can also handle spatial queries efficiently. We recently joined <a href="http://vmx.cx/">Volker Mische</a>, <a href="http://www.maxogden.com/">Max Ogden</a> and <a href="http://davidmichaelthompson.com/">David Thompson</a> in an effort to create a repository that collects common GeoCouch functionalities. This currently includes a KML Feed/GeoJSON FeatureCollection export, radius queries, spatial clustering and some helper scripts, but more stuff will be added soon.</p>
<p>Feel free to fork and contribute!</p>
<ul>
<li> Original repository: <a href="https://github.com/vmx/geocouch-utils">vmx/geocouch-utils</a></li>
<li> Our internal working repository: <a href="https://github.com/berb/geocouch-utils">berb/geocouch-utils</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.diretto.org/2011/01/geocouch-utils/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Preview: Pluggable Backend Connectors for Media Storage</title>
		<link>http://www.diretto.org/2011/01/preview-pluggable-backend-connectors-for-media-storage/</link>
		<comments>http://www.diretto.org/2011/01/preview-pluggable-backend-connectors-for-media-storage/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 10:59:30 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[project]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[couchdb]]></category>
		<category><![CDATA[s3]]></category>
		<category><![CDATA[scalability]]></category>
		<category><![CDATA[swift]]></category>

		<guid isPermaLink="false">http://www.diretto.org/?p=225</guid>
		<description><![CDATA[A core part of the diretto reporting platform is the Media Node. One or more instances of this service are responsible for storing the actual media files, processing incoming uploads and then serving these media files to clients. The meta data and user-generated data are stored in another database backend, so the Media Node essentially [...]]]></description>
			<content:encoded><![CDATA[<p>A core part of the diretto reporting platform is the Media Node. One or more instances of this service are responsible for storing the actual media files, processing incoming uploads and then serving these media files to clients. </p>
<p>The meta data and user-generated data are stored in another database backend, so the Media Node essentially requires a key-values based storage as backend that can handle BLOBs. In our first version of the Media Node, we have implemented a simple backend that uses the local filesystem. Although this worked well for our experimental deployments, we are considering alternative backends more appropriate for certain use cases.</p>
<p>In the upcoming version 2 release, we are going to introduce pluggable backend connectors. These connectors allow to change the backend storage simply via configuration and facilitate the integration of new backends. </p>
<p>We implemented two backend connectors so far. The first one uses the local filesystem. The second one connects to CouchDB and uses <em>standalone attachments</em> that have been introduced in 0.9. This setup allows a CouchDB-only deployment as backend storage for both meta-data and files. </p>
<p>We are currently working on a connector, that taps into <a href="http://openstack.org/projects/storage/">OpenStack Object Storage</a> aka Swift. Such a setup is suitable for large-scale deployments. The swift system provides scalability, fault-tolerance, and allows your storage to grow up even to petabytes. We are also planning to add a Amazon S3 based connector later.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.diretto.org/2011/01/preview-pluggable-backend-connectors-for-media-storage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>diretto Project continued: diretto.resc</title>
		<link>http://www.diretto.org/2010/11/diretto-project-continued-diretto-resc/</link>
		<comments>http://www.diretto.org/2010/11/diretto-project-continued-diretto-resc/#comments</comments>
		<pubDate>Thu, 25 Nov 2010 20:06:56 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[project]]></category>
		<category><![CDATA[kss]]></category>
		<category><![CDATA[mfg]]></category>
		<category><![CDATA[uulm]]></category>

		<guid isPermaLink="false">http://www.diretto.org/?p=133</guid>
		<description><![CDATA[Although the diretto project has now ended as a university project, we are happy to announce that the project will be continued. Within the last year, we designed and implemented a basic platform for distributed reporting, including a rich web frontend and experimental mobile clients. However, not all of our initial ideas could have been [...]]]></description>
			<content:encoded><![CDATA[<p>Although the diretto project has now ended as a university project, we are happy to announce that the project will be continued. Within the last year, we designed and implemented a basic platform for distributed reporting, including a rich web frontend and experimental mobile clients. However, not all of our initial ideas could have been implemented due to the lack of time. In fact, we discovered many additional ideas for the project during the development.</p>
<p>Thus, a part of our team applied for a Karl-Steinbuch scholarship in order to be able to follow up some of these ideas. We also envisioned the benefits of a dedicated platform for distributed reporting in disaster scenarios when combined with collective intelligence algorithms.</p>
<p>Luckily, our follow-up project &#8220;diretto.resc&#8221; has been granted by the <a href="http://www.mfg.de/">MFG Stiftung Baden-Württemberg</a> as a <a href="http://www.karl-steinbuch-stipendium.de/">Karl-Steinbuch scholarship</a> and <a href="http://www.karl-steinbuch-stipendium.de/kss_erb.html">Benjamin and Tobias</a> will be working on the platform till summer 2011.</p>
<div style="width: 605px;"><a href="http://www.diretto.org/wp-content/uploads/2010/11/kss_uebergabe.jpg"><img class="alignnone size-full wp-image-134 bordered" title="kss_uebergabe" src="http://www.diretto.org/wp-content/uploads/2010/11/kss_uebergabe.jpg" alt="" width="600" height="360" /></a><br />
<em style="font-size: 0.85em;"><strong>Photo of the certificate hand over:</strong> Helmut Rau (Minister of the State Ministry, Baden-Württemberg), Tobias Schlecht, Benjamin Erb, Klaus Haasis (MFG Stiftung Baden-Württemberg) and Hans-Günter Hohmann (bwcon)</em></p>
<p style="text-align: right;"><em style="font-size: 0.75em; color: #999;"><a href="http://www.flickr.com/photos/mfg_innovation/5201955750/in/set-72157625453812394/">Image</a> by Ginger Neumann/MFG Baden-Württemberg; CC-by-nc-sa</em></p>
</div>
<p>We&#8217;d like to thank the MFG Stiftung Baden-Württemberg for their support and for enabling us to carry on with our ideas.</p>
<p><em>Other links:</em></p>
<ul>
<li><a href="http://www.doit-online.de/cms.php/do+it.themen/Aktuell?detailid=9013">http://www.doit-online.de/cms.php/do+it.themen/Aktuell?detailid=9013</a></li>
<li><a href="http://www.baden-wuerttemberg.de/sixcms/detail.php?id=241648">http://www.baden-wuerttemberg.de/sixcms/detail.php?id=241648</a></li>
<li><a href="http://www.flickr.com/photos/mfg_innovation/sets/72157625453812394/with/5201368239/">http://www.flickr.com/photos/mfg_innovation/sets/72157625453812394/with/5201368239/</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.diretto.org/2010/11/diretto-project-continued-diretto-resc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Welcome to the new diretto website!</title>
		<link>http://www.diretto.org/2010/10/hello-world/</link>
		<comments>http://www.diretto.org/2010/10/hello-world/#comments</comments>
		<pubDate>Sun, 24 Oct 2010 11:03:22 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://www.diretto.org/wordpress/?p=1</guid>
		<description><![CDATA[This website will now be used for hosting our blog, documentations and other project-related data.]]></description>
			<content:encoded><![CDATA[<p>This website will now be used for hosting our blog, documentations and other project-related data.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.diretto.org/2010/10/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Efficient Time-based Range Queries in CouchDB using GeoCouch</title>
		<link>http://www.diretto.org/2010/08/efficient-time-based-range-queries-in-couchdb-using-geocouch/</link>
		<comments>http://www.diretto.org/2010/08/efficient-time-based-range-queries-in-couchdb-using-geocouch/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 17:47:51 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[couchdb]]></category>
		<category><![CDATA[geocouch]]></category>
		<category><![CDATA[geojson]]></category>

		<guid isPermaLink="false">http://www.diretto.org/?p=196</guid>
		<description><![CDATA[Original article in german: ioexception.de When it comes to queries, it is important to repress the mental model of any SQL databases you might have used so far. CouchDB provides a completely different way where you have to write MapReduce-based functions that create ordered lists as view to your data. For more complex queries, including [...]]]></description>
			<content:encoded><![CDATA[<p><em>Original article in german: <a href="http://www.ioexception.de/2010/08/16/effiziente-bereichs-queries-mit-couchdbgeocouch/">ioexception.de</a></em></p>
<p>When it comes to queries, it is important to repress the mental model of any SQL databases you might have used so far. <a href="http://couchdb.apache.org/">CouchDB</a> provides a completely different way where you have to write MapReduce-based functions that create ordered lists as view to your data. For more complex queries, including some join-like requests, <a href="http://wiki.apache.org/couchdb/View_collation">view collation</a> provides a powerful yet tricky solution. One weakness of CouchDB that can&#8217;t be solved even using view collation is the absence of any range queries in continuous spaces. We faced this problem while working on the diretto service implementation and eventually found a proper solution.</p>
<p>In diretto, all documents have a moment where they have been created, or &#8211; for continuous media like videos &#8211; a moment where the creation has been started. However, it is hard to tell the exact time without properly synchronized clocks in cameras, recorders etc.  When a document is received in hindsight by a third person, telling the correct moment might even be harder. So beside of accepting an exact moment, we also provide support for periods, like &#8220;that photo has been taken between 9:11 and 9:23&#8243;. Now users of the platform can not just suggest alternative values, they can also vote for the information they most likely believe in. Eventually, this should provide a collaboratively created approximation of the correct information.</p>
<h4>&#8230; with CouchDB</h4>
<p>Sounds good in theory, but when it comes to the queries like &#8220;give me all documents that have been presumably taken between 9:00 and 9:30&#8243;, you&#8217;re stranded with regular CouchDB. There is a workaround that divides the time into distinct periods and then emits a key for each segment the document is inside. This might work in our example, but it is obvious that this will emit a lot of keys and might not scale when there are long durations and fine-grained partitionings.</p>
<p>Here is an <em>example document</em>:</p>
<pre class="brush: jscript; title: ;">
{
   &quot;_id&quot;: &quot;s-ffc0b6b0-59d4-4a3b-ad36-7ec05e7db1de&quot;,
   &quot;begin&quot;: &quot;2010-08-05T09:11:52.156Z&quot;,
   &quot;end&quot;: &quot;2010-08-05T09:23:13.457Z&quot;
}
</pre>
<p><em>Map function</em> for a key emission every 5 minutes:</p>
<pre class="brush: jscript; title: ;">
//length of time segment (here 5 min)
var periodLength = (60*5);

function(doc)
{
	if(doc.begin &amp;&amp; doc.end)
	{
		//start and end time as UNIX timestamps (seconds, not milliseconds)
		var begin =  Math.round(new Date(doc.begin).getTime()/1000);
		var end =  Math.round(new Date(doc.end).getTime()/1000);

		//calculate first matching segment of period
		var p = (begin - (begin%periodLength));

		//emit key for each matching period
		while(p&lt;=end)
		{
			emit([p, doc._id], null);
			p = p + periodLength;
		}
	}
}
</pre>
<p>The <em>view</em> then correctly returns:</p>
<p><code>http://localhost:5984/entries/_design/entries/_view/docsByPeriodList?startkey=[1280998800]&amp;endkey=[1281000193,{}]</code></p>
<pre class="brush: jscript; title: ;">
{&quot;total_rows&quot;:3,&quot;update_seq&quot;:2,&quot;offset&quot;:0,&quot;rows&quot;:[
{&quot;id&quot;:&quot;s-ffc0b6b0-59d4-4a3b-ad36-7ec05e7db1de&quot;,&quot;key&quot;:[1280999400,&quot;s-ffc0b6b0-59d4-4a3b-ad36-7ec05e7db1de&quot;]15,&quot;value&quot;:null},
{&quot;id&quot;:&quot;s-ffc0b6b0-59d4-4a3b-ad36-7ec05e7db1de&quot;,&quot;key&quot;:[1280999700,&quot;s-ffc0b6b0-59d4-4a3b-ad36-7ec05e7db1de&quot;],&quot;value&quot;:null},
{&quot;id&quot;:&quot;s-ffc0b6b0-59d4-4a3b-ad36-7ec05e7db1de&quot;,&quot;key&quot;:[1281000000,&quot;s-ffc0b6b0-59d4-4a3b-ad36-7ec05e7db1de&quot;],&quot;value&quot;:null}
]}
</pre>
<p>There are the matching 5 minute slots beginning at 9:10, 9:15 and 9:20.</p>
<p>The <em>following sketch</em> illustrates the B-tree containing entries emitted by period (note that the grayed-out key is an exemplary entry for other documents in the view and is not shown in other example outputs.):</p>
<p><a href="http://www.diretto.org/wp-content/uploads/2010/11/btree_periodical.png"><img class="alignnone size-full wp-image-195" title="btree_periodical" src="http://www.diretto.org/wp-content/uploads/2010/11/btree_periodical.png" alt="" width="600" height="282" /></a></p>
<h4>&#8230; and way better with GeoCouch</h4>
<p>We have the same problem for locations, where we also have various suggestions and inaccuarte data. Due to the fact that two-dimensional data (like a WGS84-encoded position) also can&#8217;t be indexed efficiently in CouchDB&#8217;s <a href="http://en.wikipedia.org/wiki/B-tree">B-Tree</a>s, we switched to a fork by <a href="http://vmx.cx/">Volker Mische</a> that is additionally backed by a <a href="http://en.wikipedia.org/wiki/R-tree">R-Tree</a> that enables multi-dimensional indexing (currently, it only supports two dimensions, but hopefully it will support more in the future). As a nice side-effect, <a href="http://github.com/vmx/couchdb">GeoCouch</a> also allows for spatial searches using bounding boxes. So you can search for spatial features within a limited area. This gave us the idea to apply these functions to our temporal indexing problem. !GeoCouch&#8217;s R-Tree is not bound to geographical values (however to two dimensions), so an entry could be any point or rectangle (bounding box) indexed by numerical positions.</p>
<p>GeoCouch&#8217;s spatial index expects <a href="http://geojson.org/geojson-spec.html">GeoJSON</a> entries (which are also not bound to any distinct format like WGS84), so we emit our time periods as positions with bounding boxes. The longitudinal values are ignored and set to 0 and the latitudinal values represent the temporal start and end point encoded as time stamps. Thus, we are now able to efficently query all entries within a given period.</p>
<p><em>Period spatial-based query</em>:</p>
<pre class="brush: jscript; title: ;">
function(doc)
{
	if(doc.begin &amp;&amp; doc.end)
	{
		//start and end time as UNIX timestamps (seconds, not milliseconds)
		var begin =  Math.round(new Date(doc.begin).getTime()/1000);
		var end =  Math.round(new Date(doc.end).getTime()/1000);

		emit(
			{
				type: &quot;Point&quot;,
				bbox : [0,start,0,end]
			}, null
		);
	}
}
</pre>
<p><em>Spatial query</em> using start and end timestamp as range delimiters:</p>
<p><code>http://localhost:5984/entries/_design/entries/_spatial/entriesByPeriod?bbox=0,1280998800,0,1281000600<code><br />
</code></code></p>
<pre class="brush: jscript; title: ;">
{&quot;update_seq&quot;:16,&quot;rows&quot;:[
{&quot;id&quot;:&quot;s-ffc0b6b0-59d4-4a3b-ad36-7ec05e7db1de&quot;,&quot;bbox&quot;:[0,1280999512,0,1281000193],&quot;value&quot;:null}
]}
</pre>
<p>As you can see, GeoCouch does not only allow us to store such entries with ranging values, it also also to query them easily.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.diretto.org/2010/08/efficient-time-based-range-queries-in-couchdb-using-geocouch/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The technologies behind the diretto Platform &#8211; Part 4: PubSubHubbub</title>
		<link>http://www.diretto.org/2010/08/the-technologies-behind-the-diretto-platform-part-4-pubsubhubbub/</link>
		<comments>http://www.diretto.org/2010/08/the-technologies-behind-the-diretto-platform-part-4-pubsubhubbub/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 14:22:57 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[atom]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[pubsubhubbub]]></category>
		<category><![CDATA[push]]></category>
		<category><![CDATA[real time web]]></category>

		<guid isPermaLink="false">http://www.diretto.org/?p=156</guid>
		<description><![CDATA[HTTP is an exemplary request-response protocol based upon a client/server architecture. Clients, for instance web browsers, dispatch requests to identifiable resources (URIs). In most cases, they want to obtain a representation of a resource as a response from the server. But clients can also submit data to these resources or even create resources as a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ietf.org/rfc/rfc2616.txt">HTTP</a> is an exemplary request-response protocol based upon a client/server architecture. Clients, for instance web browsers, dispatch requests to identifiable resources (URIs). In most cases, they want to obtain a representation of a resource as a response from the server. But clients can also submit data to these resources or even create resources as a result.</p>
<p>But one important restriction to that model is that there is no other message exchange pattern than request/response. Also, such an interaction can only be initiated by the client. As long as there is no incoming request from a client, the server is not able to transer any data to this client. There are several workarounds where a server can push content to a client within an existing application session like long-held unclosed HTTP requests. Also the upcoming <a href="http://dev.w3.org/html5/websockets/">WebSocket</a> standard aims at this problem by introducing an easier two-way communication between client and server.</p>
<p>In the real world, there are often scenarios where a server knows that a resource has changed and it might even know which of its clients might be interested in this change, but it cannot publish the information. The only way to this with plain HTTP so far is to configure clients to poll actively. Each client interested in changes must periodically poll the server for changes. A task that almost all of our RSS feed reader do all the time. It is obvious that this neither is performant nor scales very well.</p>
<p>Other technologies like <a href="http://en.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol">XMPP</a> or most of the <a href="http://en.wikipedia.org/wiki/Message-oriented_middleware">message oriented middlewares</a> don&#8217;t restrict nodes to the strict roles of requestors and replier. These technologies are predestinated for <a href="http://en.wikipedia.org/wiki/Publish/subscribe">publish/subscribe</a> flows.</p>
<p>For diretto, we have been facing the problem that on the one hand, we wanted to build our whole architecture on HTTP. On the other hand, we wished real-time notifications for our clients. Thanks to a Google-initiated project called <a href="http://code.google.com/p/pubsubhubbub">PubSubHubbub</a>, there is a simple, open, publish/subscribe protocol only based on vanilla HTTP.</p>
<p>The trick to PubSubHubbub is the fact that all nodes &#8211; publisher, subscriber and relaying hubs are both &#8211; HTTP server and client. Thus, the distinction between clients and servers is overcome. Details to the PubSubHubbub technology can be found here on the project&#8217;s site.</p>
<p>In the diretto architecture, we implement a publisher service in our feed node, which publishes the creation of new documents and the completed uploads of attachments. And a special client extension provides access to the subscriber functionality, which triggers callbacks for such events.</p>
<p>The following video from Google describes the PubSubHubbub idea in short: <a href="http://www.youtube.com/watch?v=B5kHx0rGkec">http://www.youtube.com/watch?v=B5kHx0rGkec</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.diretto.org/2010/08/the-technologies-behind-the-diretto-platform-part-4-pubsubhubbub/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GPS and Java: Parsing NMEA Data</title>
		<link>http://www.diretto.org/2010/08/gps-and-java-parsing-nmea-data/</link>
		<comments>http://www.diretto.org/2010/08/gps-and-java-parsing-nmea-data/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 14:08:59 +0000</pubDate>
		<dc:creator>stefan</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[location based service]]></category>

		<guid isPermaLink="false">http://www.diretto.org/?p=207</guid>
		<description><![CDATA[So, we got our images and are ready to upload, if it were not for one thing: Where the hell are we anyway? Introducing: The GPS receiver and Java. A romantic drama in three acts. Step 1: Acquiring Data Practically all GPS receivers I know share their data with the rest of the world via [...]]]></description>
			<content:encoded><![CDATA[<p>So, we got our images and are ready to upload, if it were not for one thing: Where the hell are we anyway? Introducing: The GPS receiver and Java. A romantic drama in three acts.</p>
<h4> Step 1: Acquiring Data </h4>
<p>Practically all GPS receivers I know share their data with the rest of the world via a serial interface &#8212; the more modern ones with integrated serial-to-usb-converters, of course. Though your mileage may vary, omitting the <code>java.io</code> package and going straight for <a href="http://rxtx.qbang.org/wiki/index.php/Main_Page">gnu.io.rxtx</a> will prove likely to save you quite some frustration.</p>
<p>Since you want your GPS information in the NMEA 0183 format, you will need to set the serial interface properties accordingly: </p>
<pre class="brush: java; title: ;">
setSerialPortParams(4800, SerialPort.DATABITS_8,
  SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
</pre>
<p>Theoretically, the NMEA data now rushing through your console is all you need to parse. To make things more orderly, though, I can recommend the <a href="http://javanmea.sourceforge.net/">Java NMEA API</a>, which allows targeting of specific NMEA sentences. Reading their documentation is recommended at any rate, if you&#8217;re new into GPS data acquisition.</p>
<p>Side note: Should you experience troubles with USB GPS receivers being recognized by your Linux system, but !RxTx shelling out errors like &#8220;No such port&#8221;, make sure to set the permissions accordingly &#8212; <code>chmod 666 /dev/ttyUSB0</code> and <code>chgrp tty /dev/ttyUSB0</code> might help.</p>
<h4> Step 2: What do we need, anyway? </h4>
<p>Once connected, your console will be flooded with NMEA data, probably looking like this:</p>
<pre class="brush: bash; title: ;">
$GPRMC,101836.000,A,4825.1856,N,00956.8032,E,0.23,226.38,230710,,*07
$GPVTG,226.38,T,,M,0.23,N,0.4,K*68
$GPGGA,101837.000,4825.1857,N,00956.8023,E,1,04,1.4,567.4,M,48.0,M,,0000*5E
$GPGSA,A,3,17,05,08,18,,,,,,,,,8.6,1.4,8.5*36
$GPRMC,101837.000,A,4825.1857,N,00956.8023,E,0.57,292.18,230710,,*09
</pre>
<p>Intimidating as this might look, it&#8217;s all you need to determine your position. Anything starting with <code>$GP</code> is GPS data according to the NMEA 0183 specification, and the following three characters further specify what kind of information the sentence contains. </p>
<p>All we will look into from now is the <code>GGA</code> sentence, since it contains everything we need. Seperated by commas, we find:</p>
<ul>
<li>Current time in UTC
<li>Latitude and identifier N or S
<li>Longitude and identifier E or W
<li>Quality of measurement (0 == invalid, 1 == valid GPS, 2 == valid DGPS)
<li>Horizontal Dilution of Precision
<li>Height above sea level, with unit
<li>Height over geoid, minus height over ellipsoid, with unit
<li>Checksum
</ul>
<p>Apart from the date, the GGA sentence delivers everything we want. All that&#8217;s left to do for us is splitting and translating the data.</p>
<h4> Step 3: Translating the coordinates </h4>
<p>Translating? Yep. The NMEA sentences contain information like <code>4825.1857,N,00956.8023,E</code>, which translate to 48° 25.1857′ north latitude and 9° 56.8023′ east longitude. We, however, do not want to calculate in degrees, minutes and seconds, but decimal fractions, like 8.4197616 and 9.946705. Hence, translating. Yes.</p>
<p>First of all, we need to split our sentences into their respective parts. Some tutorials recommend the use of !StringTokenizer to do so, which is not the best of ideas. When your GPS receiver lost its fix &#8212; for instance in a tunnel &#8212; the GGA sentence looks like this:</p>
<p><code>$GPGGA,103927.819,,,,,0,00,,,M,0.0,M,,0000*58</code></p>
<p>To avoid having to handle situations like this, the sentence can be split along all the commas with <code>split(",")</code>.</p>
<p>After this operation, the position of all information bits is well defined. Should we operate without a valid GPS fix, <code>sentence_parts[6].equals("0")</code> is <code>true</code>.</p>
<p>Let&#8217;s assume we have a valid GPS fix and want to translate our coordinates. Despite their using StringTokenizer, <a href="http://developers.sun.com/mobility/apis/articles/bluetooth_gps/part2/">this tutorial helps us with the calculation.</a> &#8220;raw_latitude&#8221; is <code>sentence_parts[2]</code>, &#8220;lat_direction&#8221; <code>sentence_parts[3]</code>, and so on.</p>
<p>So, now we have our position. An approximation, at least. More to come about how to find out the precision of our fix. Stay tuned <img src='http://www.diretto.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.diretto.org/2010/08/gps-and-java-parsing-nmea-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The technologies behind the diretto Platform &#8211; Part 3: Restlet &amp; client helper libraries</title>
		<link>http://www.diretto.org/2010/08/the-technologies-behind-the-diretto-platform-part-3-restlet-client-helper-libraries/</link>
		<comments>http://www.diretto.org/2010/08/the-technologies-behind-the-diretto-platform-part-3-restlet-client-helper-libraries/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 19:36:56 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[jackson]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[pubsubhubbub]]></category>
		<category><![CDATA[rest]]></category>

		<guid isPermaLink="false">http://www.diretto.org/?p=155</guid>
		<description><![CDATA[Beside the reference server implementation, we also provide a client library that facilitates the development of client applications. It is written in Java and also compatible with the Android runtime environment. Thus, the client core can be re-used for several implementation scenarios using a high-level Java API. The client library comes in two flavors &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>Beside the reference server implementation, we also provide a client library that facilitates the development of client applications. It is written in Java and also compatible with the Android runtime environment. Thus, the client core can be re-used for several implementation scenarios using a high-level Java API.</p>
<p>The client library comes in two flavors &#8211; a basic version and an extended one that is <a href="http://code.google.com/p/pubsubhubbub/">PubSubHubBub</a>-enabled. The latter requires a public HTTP server endpoint but allows to register callback functions. These functions will be executed almost in real-time as soon as the server publishes certain events, like the complete upload of a new document.</p>
<p>While most of the regular client applications &#8211; including mobile clients &#8211; will only need the basic client library, there are also usages for the !PubSubHubBub-aware version. For instance, dedicated headless clients might subscribe for new documents and directly download and process them in some way. This  takes off a lot of work from the server and provides a clear path for feature extensions. Also our rich web application takes advantage of this mechanism in order to display new documents on the maps in real time.</p>
<p>The Java client is basically a client-side implementation of our RESTful web service. Therefore, we used <a href="http://www.restlet.org/">Restlet</a>, a REST framework for Java. It provides useful abstractions of the low-level HTTP communication and maps the representations/resources of a RESTful architecture to appropriate classes. For the underlying HTTP communication, we use Apache&#8217;s <a href="http://hc.apache.org/httpcomponents-client/index.html">HttpClient</a> library. The JSON serialization/deserialization relies on <a href="http://jackson.codehaus.org/">Jackson</a>, a high performance library that allows various mappings, including a mapping between unnotated POJOs and JSON structs. Beside that, we use a lot of other libraries, like many of the Apache <a href="http://commons.apache.org/">Commons</a> libraries and <a href="http://joda-time.sourceforge.net/">JodaTime</a> for handling time data.</p>
<p>For the subscriber-side implementation of our PubSubHubBub-enabled client, we developed our own subscriber library, because the existing one did not fit our requirements. It uses <a href="http://www.eclipse.org/jetty/about.php">Jetty</a> as lightweight internal webserver for receiving notification pings. This library has been developed apart from the main client source and has been released on github: <a href="http://github.com/berb/java-sub-pubsubhubbub">java-sub-pubsubhubbub</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.diretto.org/2010/08/the-technologies-behind-the-diretto-platform-part-3-restlet-client-helper-libraries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The technologies behind the diretto Platform &#8211; Part 2: CouchDB &amp; GeoCouch</title>
		<link>http://www.diretto.org/2010/08/the-technologies-behind-the-diretto-platform-part-2-couchdb-geocouch/</link>
		<comments>http://www.diretto.org/2010/08/the-technologies-behind-the-diretto-platform-part-2-couchdb-geocouch/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 20:32:56 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[couchdb]]></category>
		<category><![CDATA[cradle]]></category>
		<category><![CDATA[erlang]]></category>
		<category><![CDATA[eventual consistency]]></category>
		<category><![CDATA[geocouch]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[r-tree]]></category>
		<category><![CDATA[spatial]]></category>

		<guid isPermaLink="false">http://www.diretto.org/?p=154</guid>
		<description><![CDATA[Although documents are not stored directly in a database, the diretto platform needs a robust persistence layer for saving metadata information and user-generated content. Therefore, we have chosen to use a non-relational database in our platform reference implementation due to several reasons. The strong focus on documents in diretto almost implies directly a document-oriented database. [...]]]></description>
			<content:encoded><![CDATA[<p>Although documents are not stored directly in a database, the diretto platform needs a robust persistence layer for saving metadata information and user-generated content. Therefore, we have chosen to use a non-relational database in our platform reference implementation due to several reasons. The strong focus on documents in diretto almost implies directly a document-oriented database. We also searched for a database that scales well (both vertically and horizontally), which is highly available and provides easy replication. Furthermore the database had to match our HTTP-only approach as well as to fit seamlessly in our !JavaScript-coined architecture.<br />
We finally have taken <a href="http://couchdb.apache.org/">CouchDB</a>, an open source, <a href="http://en.wikipedia.org/wiki/Eventual_consistency">eventual consistent</a>, document-oriented database written in <a href="http://www.erlang.org/">Erlang</a>. In a nutshell, CouchDB, is a storage where you can save arbitrary JSON entities, that are uniquely indexed via a key. Thanks to <a href="http://en.wikipedia.org/wiki/MapReduce">MapReduce</a>-based view functions, you can create complex lists (in fact, <a href="http://en.wikipedia.org/wiki/B-tree B-Trees"></a>) of the documents or partial document data that are incrementally updated on changes. Although not exactly comparable to SQL, these view functions thus provide a substitute for regular database queries. The database access is provided via a HTTP RESTful web interface, like it is in the diretto service itself.</p>
<p>One major problem we ran into was the difficulty of mapping our geo-data into B-Tree-based views for location searches and proximity lookups. It is not just nasty to use  for this, but also highly inefficient. Thankfully, there were already other people having this issue and , a student from the University of Augsburg, is currently developing a CouchDB extension for spatial queries as part of his diploma thesis. In his  fork, he has implemented a spatial query mechanism based upon a <a href="http://en.wikipedia.org/wiki/R-tree">R-Tree</a>, a highly efficient index for multidimensional queries, and range queries. GeoCouch and diretto both follow the <a href="http://geojson.org/geojson-spec.html">GeoJSON</a> specification for representing positioning data in JSON. We are looking forward to see the cool spatial features in the main branch of CouchDB soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.diretto.org/2010/08/the-technologies-behind-the-diretto-platform-part-2-couchdb-geocouch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The technologies behind the diretto platform &#8211; Part 1: node.js</title>
		<link>http://www.diretto.org/2010/08/the-technologies-behind-the-diretto-platform-part-1-node-js/</link>
		<comments>http://www.diretto.org/2010/08/the-technologies-behind-the-diretto-platform-part-1-node-js/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 12:41:52 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[couchdb]]></category>
		<category><![CDATA[cradle]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[journey]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[mu]]></category>
		<category><![CDATA[mustache]]></category>
		<category><![CDATA[node.js]]></category>
		<category><![CDATA[real time web]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[restlet]]></category>
		<category><![CDATA[web service]]></category>

		<guid isPermaLink="false">http://www.diretto.org/?p=153</guid>
		<description><![CDATA[When we started designing the diretto web service, we directly picked up REST with plain HTTP and JSON as the technological backround. Other service-oriented technologies like SOAP or RPC-based middlewares just looked to heavy, bloated or to tightly coupled for mobile usage. So next we drew up a shortlist of potential server technologies and frameworks [...]]]></description>
			<content:encoded><![CDATA[<p>When we started designing the diretto web service, we directly picked up <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">REST</a> with plain HTTP and JSON as the technological backround. Other service-oriented technologies like SOAP or RPC-based middlewares just looked to heavy, bloated or to tightly coupled for mobile usage. So next we drew up a shortlist of potential server technologies and frameworks for our service implementation.</p>
<p>Our first choice was <a href="http://www.restlet.org/">Restlet</a>, a Java-based framework for REST services. But we soon realized that converting CouchDB results to Java objects and the back to JSON was a tremendous effort, even with helper libraries. By that time we quite accidentally discovered <a href="http://nodejs.org">node.js</a>, a framework for scalabale network programs. The interesting part for us was the fact, that node.js applications are entirely written in JavaScript.</p>
<p>After a comparison between a first example service implementation written in Restlet and node.js, we realized that we could minimize the service implementation code  when using node.js. Another great advantage of node.js was it&#8217;s strictly evented and asynchronous i/o design. This allows node.js applications to handle thousands of requests concurrently without any bottlenecks due to blocking operations. Implemented on top of Google&#8217;s v8 JavaScript engine, node.js provides impressive performance contrary to objections some people have when thinking about JavaScript.</p>
<p>The next step was to select appropriate libraries for our service, especially a <a href="http://couchdb.apache.org/">CouchDB</a> library and helper libraries for implementing RESTful services in node.js. For both requirements, we took great libraries developed by <a href="http://cloudhead.io/">cloudhead</a> &#8211; <a href="http://github.com/cloudhead/cradle">cradle</a> as a high-level, caching, CouchDB library and <a href="http://github.com/cloudhead/journey">journey</a> for JSON-based services and HTTP request routing. Additionally, we use <a href="http://github.com/raycmorgan/Mu">Mu</a> as a Mustache template engine in node.js for generating non-JSON output like our Atom or KML feeds.</p>
<p>Our service implementations are now implemented also as node.js libraries and separated into several components for higher reusability. In the end, we wrote three different node applications, one for our API service implementation, one for media upload &amp; delivery (rather an enhanced static webserver) and for feed export and PubSubHubBub publishing.</p>
<p>All libraries and implementations will be released open source as soon as we finish our first stable release candidate.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.diretto.org/2010/08/the-technologies-behind-the-diretto-platform-part-1-node-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing the diretto Platform Architecture Part 2</title>
		<link>http://www.diretto.org/2010/06/introducing-the-diretto-platform-architecture-part-2/</link>
		<comments>http://www.diretto.org/2010/06/introducing-the-diretto-platform-architecture-part-2/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 12:46:57 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[dslr]]></category>
		<category><![CDATA[pubsubhubbub]]></category>
		<category><![CDATA[push]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[web service]]></category>

		<guid isPermaLink="false">http://www.diretto.org/?p=150</guid>
		<description><![CDATA[In the second part of the architectural overview, we have a look at the different components of the diretto platform: Scalable Server Cloud The server(s) contain five distinct components. These components can be deployed in many different ways. In simple cases, they can be placed on one single machine. In a heavy use scenario, all [...]]]></description>
			<content:encoded><![CDATA[<p>In the second part of the architectural overview, we have a look at the different components of the diretto platform:</p>
<p><strong>Scalable Server Cloud</strong></p>
<p>The server(s) contain five distinct components. These components can be deployed in many different ways. In simple cases, they can be placed on one single machine. In a heavy use scenario, all of them they can be replicated for load balancing. We will have a look at scalability in a blog entry soon.</p>
<p><em>ApiNode</em><br />
The API node represents the endpoint of our diretto RESTful webservice.</p>
<p><em>MediaNode</em><br />
The media node is a webserver that handles incoming file uploads, organizes storage and provides web-based access to uploaded items.</p>
<p><em>FeedNode</em><br />
The feed node provides web access to Atom feeds. It is also PubSubHubBub publisher that notifies hubs as soon as new content is available. Therefore, it monitors the meta data storage for changes and bumps the PubSubHubBub notification process.</p>
<p><em>Meta Data Storage</em><br />
The meta data storage is used for all meta data of uploaded items and other user generated data like tags, comments etc.</p>
<p><em>Media Item Storage</em><br />
The media item storage is responsible for storing all uploaded and gathered documents of the platform.</p>
<p><strong>RESTful Webservice</strong></p>
<p>The service API is based upon the REST paradigm, hence we provide a RESTful webservice implementation. We are using JSON for data exchange and encode geo data with GeoJSON. For the PubSubHubBub nodes, we also use the Atom syndication format for feed data.</p>
<p><strong>External Services</strong></p>
<p>These services provide additional functionalities that are not included in the original service. Such facilities can be used by clients, if they are enabled for.  Conceptually, external services are service instances that are separated and isolated from the original service.<br />
A simple example for an external service is a UUID hashing service. The platform is using UUIDs for identifiying documents. However, this might not be very handy for humans. An external service might provide shortened IDs for the original UUIDs. Now a client can use these shortened IDs by accessing the external services. Users of the client will then only see short IDs. Internally, the client uses the UUID hashing service for resolution when interacting with the original server, where UUIDs are needed.</p>
<p><strong>Special Clients &amp; Tools</strong></p>
<p>Beside external services, special clients are first class instances for extending the diretto service. Unlike external services, these tools don&#8217;t provide a service endpoint by their own. Instead, they rely on the original service for interaction. Tools might also be PubSubHubBub subscribers, which allows them to react on new content instantly.<br />
A good example for such a tool is an automated image resizer. The server only stores an original image when a photo has been uploaded. Now a client can subscribe for incoming images. Thus, it will be notified, as soon as a new image arrives. Then the client can download the image, resize it and upload the altered version as an attachment to the original document.<br />
It is obvious that this concept not just takes off a lot of load from the servers. It also the starting point for many customized clients.</p>
<p><strong>Web Application</strong></p>
<p>The web application is a special client which renders a web view to its own clients. It allows user to interact with the service without using the RESTful API directly. Instead, users access this rich web application.</p>
<p><strong>Smartphone Clients</strong></p>
<p>Smartphone clients are important clients for instant content upload. They provide a leightweight implementation that adapts to the mobile usage context.</p>
<p><strong>Wearable Embedded Clients</strong></p>
<p>Our wearable client is a headless unit that allows the bearer to connect &#8220;offline devices&#8221; like digital SLR cameras.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.diretto.org/2010/06/introducing-the-diretto-platform-architecture-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing the diretto Platform Architecture Part 1</title>
		<link>http://www.diretto.org/2010/06/introducing-the-diretto-platform-architecture-%e2%80%93-part-1/</link>
		<comments>http://www.diretto.org/2010/06/introducing-the-diretto-platform-architecture-%e2%80%93-part-1/#comments</comments>
		<pubDate>Sun, 13 Jun 2010 14:53:04 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[geojson]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[scalability]]></category>

		<guid isPermaLink="false">http://www.diretto.org/?p=145</guid>
		<description><![CDATA[The diretto platform aims to be a simple yet powerful architecture that can be extended and scaled easily. This is enforced by applying a few principles the whole system is based upon: Only use open standards, formats and protocols For each part of the system, we rely on existing standards. This not just ensures that [...]]]></description>
			<content:encoded><![CDATA[<p>The diretto platform aims to be a simple yet powerful architecture that can be extended and scaled easily. This is enforced by applying a few principles the whole system is based upon:</p>
<p><strong>Only use open standards, formats and protocols</strong></p>
<p>For each part of the system, we rely on existing standards. This not just ensures that all used technologies are suitable for productive usage, it also eases integration and extension of the system.</p>
<p>The standards we use include HTTP for transport, REST for the webservices, JSON for data exchange, GeoJSON for geo-enabled data, Atom for feed data and the PubSubHubBub protocol for real time web.</p>
<p><strong>HTTP as the only protocol between peers</strong></p>
<p>We tried hard not to use any other protocol but HTTP for transport. HTTP has shown in the past that it is a very powerful protocol that scales well. Thus, it is used in the diretto platform between every single peer. Even servers use HTTP for communicating with databases.</p>
<p>The absence of proprietary protocols or other protocols simplifies communication, distribution and extensions. Thanks to the REST paradigm, HTTP is also the basis for the webservices.</p>
<p><strong>Keep scalability and distribution in mind</strong></p>
<p>When designing our service architecture, we focussed on building a distributable architecture instead of a monolitihic one. On the one hand, the server is no single application. It consists of several components that can either be run on a single host or be deployed onto multiple machines.</p>
<p>On the other hand, we only integrated the core functionalities into the server. Other features should be run externally. For instance, the generation of thumbnails for new photos is not built into the server. Instead, a designated client can register for notifications of newly available images, then download them, create a resized version and upload them. This not just takes off load from the server, it also advertises for external service extensions by design.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.diretto.org/2010/06/introducing-the-diretto-platform-architecture-%e2%80%93-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>diretto Executive Summary</title>
		<link>http://www.diretto.org/2010/03/diretto-executive-summary/</link>
		<comments>http://www.diretto.org/2010/03/diretto-executive-summary/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 15:51:28 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[project]]></category>
		<category><![CDATA[location based service]]></category>
		<category><![CDATA[mobile computing]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[ubiquitous computing]]></category>
		<category><![CDATA[uulm]]></category>

		<guid isPermaLink="false">http://www.diretto.org/?p=141</guid>
		<description><![CDATA[What is diretto? The primary goal of the Distributed Recon/Reporting Transceiver Toolkit (diretto) project is the creation of an easy-to-use infrastructure and toolset for distributed on-site media reporting and collaborative event coverage in realtime as a open source solution. The platform empowers various collocated users to participate in the reporting, but also integrates remote viewers [...]]]></description>
			<content:encoded><![CDATA[<p><strong>What is diretto?</strong></p>
<p>The primary goal of the Distributed Recon/Reporting Transceiver Toolkit (diretto) project is the creation of an easy-to-use infrastructure and toolset for distributed on-site media reporting and collaborative event coverage in realtime as a open source solution. The platform empowers various collocated users to participate in the reporting, but also integrates remote viewers using feedback functions.</p>
<p>For mobile reporting, the system offers different client applications for various internet-enabled devices. However, it also provides a solution for embedded photography reporting using regular digital cameras by introducing intermediate uplink nodes. It also addresses typical problems faced by distributed mobile collaboration like data propagation under low bandwidth or with unavailable uplinks. Typical usage environments are large-scale public events or disaster response situations.</p>
<p><strong>Project Background</strong></p>
<p>The diretto project is descended from an university project at the University of Ulm, Germany.<br />
The original project design was elaborated in the winter term 2009 by a team as part of the elective course Ubiquitous Computing at the Institute of Media Informatics. In the summer term 2010 two teams will implement various parts of the system. The Ubiquitous Computing team will implement the basic server infrastructure and several applications for mobile usage. The Interactive Systems team will create a web-based application as a frontend for remote users.</p>
<p><strong>Components</strong></p>
<p>The diretto system is highly modularized. The diretto API represents the core of the system. All applications and software modules are implemented against this API.</p>
<p>The diretto server is responsible for the server-side implementation of the API and for the web-based service provision and accessibility. This includes the solid storage of gathered media entites and corresponding meta data.</p>
<p>Diretto clients provide access to the system for the users for various devices and scenarios. Possibile implementations range from lightweight smartphone applications to web-based clients and highly customized solutions for embedding additional devices.</p>
<p>Smartphone clients allow people on-site to report in media items like snapshots, video snippets or audio material. These clients also enable people to see and comment the reports and entities reported in by other people nearby.</p>
<p>The web application enables remote users to participate in the process by observing, assessing and evaluating media items submitted to the system. Such feedback also supports the on -site users.</p>
<p>In order to integrate detached media devices such as digital cameras, a special uplink device has been designed. This portable uplink device allows the bearer to attach wired or wireless devices. New content will be fetched and and submitted directly to the server.</p>
<p>Other client tools can add additional functions like automated content analyzing or the export of event timeline feeds into the RSS format.</p>
<p><strong>Features </strong></p>
<p>Open Source – The complete platform is available as open source. This guarantees continuity and availability, but also allows the implementation of extended or derivative solutions.</p>
<p>Extensibility – The API does not define how clients must be implemented. It only describes how gathered data must be exported to the server and communication between clients and the server is supposed to be. This allows the implementation of a lot of different clients with specialized purposes and customized features.</p>
<p>Versatility – The API does not impose any restrictions on media types. Thus, new formats can easily be integrated.</p>
<p>Scalability – The diretto platform is designed to cope with a lot of data in parallel. This allows the usage even in scenarios where a huge number of people use the system and report in data simultaneously.</p>
<p>Easy Deployment – The platform and all applications have been designed with a focus on easy deployment. Most of the applications run on regular devices and the server can be set up on commodity hardware. Thus, users can easily host their own sessions or pick up an application and immediately participate in a reporting scenario.</p>
<p>Lightweight – In order to cope with the problems of mobile reporting like low bandwidth, the diretto API is built on lightweight technologies like HTTP, REST and JSON.</p>
<p><strong>Use Scenarios</strong></p>
<p>Diretto is designed as a versatile and flexible platform for distributed mobile reporting. Thus, diretto can be used in various different scenarios. Three exemplary scenarios are described here, although there are a lot of other potential usages.</p>
<p>Being equipped with suitable hardware or diretto-enabled extensions, journalists are able to report in different media types on-site and virtually in realtime to the online reporting system. Both single journalists and collocated teams can be embedded into public events even of larger scales. Additionally to professional journalists, one can imagine regular citizens with smartphones or other devices contributing to the collection of media items of such an event.</p>
<p>Introducing the diretto platform for emergency services can improve response times and resuce efforts. The ability to record and instantly submit data from a scene by deployed units assists a (remote) command, that filters and evaluates incoming data and take appropriate actions.</p>
<p>Even civil right groups can use diretto for monitoring and documenting their public demonstrations and thus ensure appropriate behaviour of police and law enforcement agencies.</p>
<p><strong>Roadmap</strong></p>
<p>The initial project outline has been elaborated in the winter term 2009. Until spring 2010, the initial version of the API will be published. During the summer term 2010, all important application components will be created as a reference implementation. This will also include field tests in different scenarios.<br />
Finally, the whole project will be released as open source to the public.</p>
<p><strong>Related Work</strong></p>
<p>There are some approaches towards similar platforms with both academic or government-funded background (i.e. CoMedia or the indect Project). Also non-academic services like Ushahidi, Twitter, Flickr or qik have parts in common with our platform. Our main goal is the design of a platform, that incorporates all of the necessary features for mobile distributed and collaborative media reporting in one unified system.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.diretto.org/2010/03/diretto-executive-summary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

