Jump to content

Introducing Fluidinfo: From API to Web Interface

+ 1
  Nicholas Radcliffe's Photo
Posted Apr 17 2012 12:40 AM

Many web-based applications begin life as a website offering a service and gradually develop a public API. Fluidinfo is unusual in having done exactly the reverse.

What is Fluidinfo?

Fluidinfo is a shared, online datastore based on tags with values. It allows anyone to store, organize, query and share data about anything. Users add information to Fluidinfo by attaching tags (with optional values) to objects representing things. It's easy to extract information and there's also a simple query language to search the datastore.

The "things" the data can be "about" are defined by string identifiers, and there is a (lazily instantiated) object in Fluidinfo for every possible unicode string—"Paris", "☾♠♣♥♦☽", "book:getting started with fluidinfo (nicholas j radcliffe; nicholas h tollervey)", "http://oreilly.com", "3.14159265" and so on. Each user can then attach arbitrary named tags to any of these objects (or potential objects) and the tags can have typed values; for example, I might tag "Paris" with a numeric rating (njr/rating=10), a string description (njr/description="Belle") and a JPEG image (njr/photo=<a picture of Paris, paris.jpeg>). A permissions system allows users to control who can read and write each of their tags, and a query language allows them to select objects and read data based on their own tags and those of other people (subject to the permissions).

The API Launch

When Fluidinfo Inc. first released Fluidinfo, in 2009, the only thing it made available was a pure HTTP, RESTful API. Being HTTP-based, the API can be queried directly from a web browser. For example, you can directly read my rating of Paris by visiting

http://fluiddb.fluidinfo.com/about/Paris/njr/rating

(http://fluiddb.fluid...aris/njr/rating)
The result will probably be downloaded as a file containing the value 10.
Alternatively, (better) use cURL from the command line:

curl http://fluiddb.fluidinfo.com/about/Paris/njr/rating


Similarly, you can find all the objects I have rated 10 by navigating to:

http://fluiddb.fluidinfo.com/values/?query=njr/rating=10&tag=fluiddb/about


(http://fluiddb.fluid...g=fluiddb/about)

The output is a lump of JSON. If you have any familiary with URL semantics, you'll be able to see that this URL goes to the /values endpoint of Fluidinfo, passing the query parameter "njr/rating=10" and the tag parameter "fluiddb/about", which is the name of the object indentifier (Fluidinfo's so-called about tag).

Writing data is only marginally more complicated than this, requiring authentication and sending the appropriate data in JSON.

From API to Web Front-End: fluidinfo.com


It would be difficult to find a more API-oriented website than Fluidinfo. Its strategy of launching a bare API before anything else was unusual, but has proved fairly successful. Within a few weeks of launch, a set of enthusiasts had written libraries for accessing Fluidinfo from half a dozen languages, and there is now library support for Python, Ruby, Java, Common Lisp, Javascript, Go, Perl, Emacs Lisp, Clojure and more. Shortly afterwards various applications, services and utilities began to appear, including the Fluidinfo Explorer, the Fluidinfo Shell (fish) and an object visualizer (About Tag).

It is against this background that Nicholas Tollervey and I set out to write a book describing the the online storage system that is Fluidinfo. Our book, Getting Started with Fluidinfo, was published a few weeks ago, and provides information about many different ways of accessing and using Fluidinfo as well as the philosophy and design of the Fluidinfo Platform. We describe how to use Fluidinfo with web applications, using a command-line utility and have chapters on how to program against the API with Python, Javascript and directly using raw HTTP. Over time, we hope to produce alternate or expanded versions of the book that cover some of the other languages and libraries.

The fluidinfo.com Website

Throughout most of the time we were writing the book, fluidinfo.com was simply an HTML-based website for the company Fluidinfo Inc., with pages describing the system, allowing sign-up for accounts and documenting the API. As the book was being completed, the company transformed the website into an experimental (and rapidly changing) front-end allowing direct access to Fluidinfo. If you visit fluidinfo.com now, you will see the current state of this interface.

The fluidinfo.com interface is based around an input box where you type the "thing" you are interested in. This interface will map what you type to lower case and then show you the tags attached to that object in Fluidinfo. If you have a Twitter account, you can sign in using that and (assuming it's available) you will get a Fluidinfo account with the same username; you will then be able to add your own tags to the object. One way of thinking about this is that it's similar to a social bookmarking site (such as pinboard.in or delicious.com) where the things you tag don't have to be URLs, the tags can have values and it is possible to perform essentially arbitrary queries, across different users tags, if desired, using a simple query language.

There's also a Chrome extension that makes it easy to see and add to the information in Fluidinfo as you navigate around the web, using either the URL of the page you are on or text you highlight in the browser to specify objects.

Adding a Chapter on the fluidinfo.com Website

Had it only been a question of delaying the book by a few weeks, we would have written an extra chapter describing the front-end at fluidinfo.com for the first version of the book. The reason we didn't do this is that fluidinfo.com is in a continuous state of flux, often being updated several times a day. Today's fluidinfo.com is significantly different from the one that we would have documented then, and we fully expect it to change as much again over the next few months. When it settles down, we will add a chapter and the book will be updated accordingly.

Meanwhile, if Fluidinfo sounds interesting, give it a spin. And if you have any interest in the back end, you could do worse than to check out our book, Getting Started with Fluidinfo.

Cover of Getting Started with Fluidinfo
Learn more about this topic from Getting Started with Fluidinfo. 

Imagine a public storage system that has a place online for structured data about everything that exists—or that could exist. This book introduces Fluidinfo, a system that enables you to store information about anything, real or imaginary, in any digital form. You’ll learn how to organize and search for data, and decide who can use, modify, and extend what you’ve contributed. This guide demonstrates Fluidinfo’s potential to create social data, with facilities that encourage users and applications to share, remix, and reuse data in ways they may not have anticipated.

Learn More Read Now on Safari


0 Replies