Building a Document Management System: Part 1

Im building a System to manage Documents accumulating in our company. Starting with internal (paper based) documents. We generate a few hundred of them every day.

The strategy is: scan them, throw the paper away, keep the scanned data forever. Then OCR it enough to get find out which document it actually is (see here, here and here, all in german) and drop it with appropriate metadata on a permanent store.

So how to construct that storage? It should be networked. It should be able to spread over several hard disks and servers. So we probably need a client-server architecture and a network protocol. We use http because this Web thingy is all around, totally rocks and was recently upgraded to Version 2.0. Seemingly RESTful application design and the Atom Publishing Protocol is the way to go for content, if you want to play with the cool kids.

All in all the Idea of Atom fits well with an document store: Atom is about Documents which have an Author, a publication date and so on.

So let’s get wild and just code away. We post new documents to /documents/:

POST /documents/ HTTP/1.1
Content-type: text/plain
Content-Length: 9


If we do so we get back an Atom Document describing the just created entry:

<feed xmlns="">
  <title>Document 31 (2007-06-21)</title>
  <author><name>HUODORA DoDoStore</name></author>
  <link href="http://.../document/1...3/metadata.atom" rel="self"/>
    <title>Document 31 (2007-06-21)</title>
    <link href="http://.../document/1a3...b73/" type="text/plain"/>
    <content type="xhtml">
      <div xmlns="" name="1a3...b73">

Based on the Atom entry we now know where to request the document we have just posted:

$ curl

Viola! New documents are POSTed to /documents/ and afterwards you can get them from /document/{id}/.


  1. teenage mutant ninja hero coders » Blog Archive » Building a Track and Trace Application with CouchDB - 2008-12-28

    […] it with a self-designed Document store called DoDoStorage. For background on that project see here, here and […]

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

Du kommentierst mit Deinem Abmelden / Ändern )


Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )


Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s