Kaleidoscope


Consulting services in
Semantic Web,
Social Computing, and
Collaborative Technologies

Platform Example: Twitterbase
Background
Twitterbase is a scaled down, non-semantic version of Kaleidoscope. Essentially, it is a hash table. Using your Twitter account, follow the user named kscope. Once kscope follows your Twitter account, you are now free to send commands to Twitterbase as direct messages. The response to these commands will be direct messages to your account. Each Twitter user will have his/her own two sections-- a public section and a private section. No other user is allowed to edit the data that does not belong to her/him. The public section is viewable by any user, while the private section is hidden from all other users.


Quick Start
Twitterbase is a hierarchical structure that can be named with letters and numbers, but each name must begin with a letter. Some examples: chicago31, this_is_ok_too, w2. The top level directories are "public" and "private" represented by the symbols [] and ][ respectively. What are those things? Well, [] looks like an open window, while ][ looks like a closed window. The next level below is the Twitter usernames. Finally, the directories below this level are free to be organized in whatever manner the user wants. Since commands pass through Twitter, a user is constrained to 140 characters...this includes the directory name and the data. Use characters sparingly.

The functionality of Twitterbase is very basic. You can store, change, and add data that is numeric or text-based. Surround the text with double quotes. Numbers can be entered as-is (no scientific notation, please). It is possible to browse a directory (though that can be a little awkward given the limited number of characters). It is also possible to do some elementary screen scraping by storing a URL and an XPath. Obtaining an XPath is best done with a couple of plugins for Firefox-- Firebug and XPather. Firebug will allow you to visually isolate the element on the webpage. Once you have the desired element, double right-click on that element and select view in XPather. Then copy the XPath into your Twitter command. This is a flaky (maybe 50-50 chance of working properly), somewhat unreliable process, but when it works, it is pretty nice. Imagine getting live web data through a text message without having to sign up for an RSS service. Think of this as a mini RSS service. In the future, hopefully databases will be another channel like RSS or Twitter feeds that content providers give to their users.


Commands
Symbols / operators
[] : public
][ : private
= : assignment
# : delete item
? : directory listing
@ : screen scrape

Examples of assignments:
[].allan031.new.todo._1 = "Go to the store."
][.allan031.todo._1 = "Buy birthday gift."
[].allan031.inventory.cans.soup = 2
][.allan031.secret.number = 31

Display data examples:
[].allan031.new.todo._1
   
Go to the store.
[].allan031.inventory.cans.soup
   
2

Directory listing:
? [].allan031
   
new:1,todo:1,inventory:1,secret:1
   
This will list the directories directly below the listed directory and the number of items that appear in the directory (ordinary items and other directories).

Delete data item:
# [].allan031.new.todo._1
# ][.allan031.todo._1

Screen scraping:
[].allan031.url.suntimes = "http://www.suntimes.com/index.html"
[].allan031.xpath.suntimes.headline = "/html/body/div[2]/div[4]/div[5]/div[1]/div[2]/a"
@
[].allan031.url.suntimes:[].allan031.xpath.suntimes.headline


Future Directions
Twitterbase will generally remain as is unless there are specific feature requests that would be useful. With the 140-character limit, it is difficult to do anything very useful (even search would be limiting as far as how to present results in such a constrained format). A successor database interface that works over XMPP will probably appear that supports a more complete scripting language with semantic capabilities and web services. Since XMPP gateways include MSN and Yahoo who also support SMS chat, then more flexibility will be available in providing a more comfortable interface in a ubiquitous interface.


Questions?
For longer messages,
send e-mail to allan.spale at the domain my-kaleidoscope.org. Alternatively, follow allan031 and send a direct message with a short message.


Platform Services Mission
(c) 2008, Allan Spale, All Rights Reserved