Archive for September, 2009

JavaScript Mashups using Tonido HTTP API

You can write app mashups purely using Javascript in Tonido. For example, say you wanted to combine data from two Tonido apps together and present them in a single view, you can do that quite easily. Or if you want to present information in a different way, you can do that too.

In this post, let me walkthrough a simple JS script that grabs data from Tonido Thots applications and displays them.

For this JS to work, you need to make sure the JS code is being served up by Tonido itself, otherwise, due to the cross-domain scripting rules, the script won’t run. To make Tonido serve these files up, you can add these files to a folder and share it via Webshare and then load the .html page by clicking on it in Webshare file listing.

Doing AJAX via JS can be a chore unless you let a library do all the dirty work for you. In this case, I am using jQuery. It is especially excellent for parsing the XML that is returned by Tonido’s HTTP calls.

First, in the code below, we set an event handler so that when the link is clicked, we make a call to the ‘getauthenticationinfo’ HTTP API. This returns the status of the currently logged in user etc via XML.

<br />
 $(document).ready(function(){<br />
       $("a").click(function(event){<br />
         $.get('', function(data) {<br />
 		 var $entry = $(data).find('info');<br />
		 var $profile = $entry.find('profile').text();<br />
		 if ($profile == "")<br />
		 {<br />
		     alert("Profile Not Logged IN");<br />
		 }<br />
		 else<br />
		 {<br />
			if ($entry.find('authenticated').text() == "1")<br />
			{<br />
				getThots();<br />
			}<br />
			else<br />
			{<br />
                             alert("Profile logged in, but needs to be authenticated");<br />
			}<br />
		}<br />
		});<br />
          event.preventDefault();<br />
         return false;<br />
       });<br />
     });<br />

This XML response below contains several pieces of information. The primary being the authenticated element. Each value of that element represents something as you can see from the JS. If it is “1″ we are ready to make our next call. That is of course to get the actual thots data.

<br />
<authenticationinfo><br />
             <authenticated>>1< /span></authenticated><br />
             <isremote>>0< /span></isremote><br />
             <reasoncode>>0< /span></reasoncode><br />
          </info><br />
</authenticationinfo><br />

Getting the Thots data is a simple HTTP call again passed in with a bunch of GET parameters. The return naturally is XML again.

<br />
function getThots()<br />
{<br />
	$.get(';max=10&amp;datefilter=&amp;categoryfilter=&amp;searchfilter=',<br />
                             function (data) {<br />
				var $meta = $(data).find('totalrecords').text();<br />
				var $thots = $(data).find('thot').each(function ()<br />
                                 {<br />
				     var $entry = $(this);<br />
				     var $content = $entry.find('displaycontent').text();<br />
				     var $displaycontent = jQuery("
<p>");<br />
				    $displaycontent.appendTo(document.body);<br />
				});<br />
		}, "xml");<br />
 }<br />

Which looks like the below:

    <meta><br />
    <totalrecords>>60</totalrecords><br />
        <id>>75</id><br />
        <title/><br />
        <displaycontent>Interesting Thot</displaycontent><br />
        <content>Interesting Thot</content><br />
        <status/><br />
        <date>>2009-07-20 13:08:09< /span></date></p>
<pageobjectindex>>1< /span></pageobjectindex>
        <totalobjects>>60</totalobjects><br />
        <totalcategories>>1< /span></totalcategories><br />
        <categoryid_0>>1< /span></categoryid_0><br />
        <categorytext_0>Bookmarks</categorytext_0><br />
       <categoryparentid_0>-1< /span></categoryparentid_0><br />
       <category_texts>Bookmarks</category_texts><br />
       <displaycategory_texts>Bookmarks</displaycategory_texts><br />

We parse the XML and append it to the document in the loop. So the effect is when you click the link you see list of thots entries.

This is for sake of example and is trivial to write. Imagine you could do the same thing, but create a page which showed your Tasks/Calendars/Thots/Webshare Upload History all in one shot. Maybe even a text box to quickly add a torrent in one shot. That would be fun.

You can even write a mini Tonido application with a different UI just by running Webshare JS and HTML files. The possibilities are endless.

Tonido’s implements almost all of the app functionality using HTTP APIs. You can study these APIs and responses easily using FireBug. If you want more documentation, you can read the official documentation for the HTTP APIs in the reference documentation.

Download the full source for this sample.

Announcing the Tonido Platform SDK

Our original vision for Tonido was to build an extensible development platform, so we are happy to announce the immediate availability of the Tonido Platform SDK which allows third-party developers to build new applications for Tonido.

With the set of applications that we have released so far, we have only scratched the surface of what can be done using the platform. With the release of the SDK, we want to enable unleashing the widest range of developer creativity. To reach that goal, we have worked hard to make the platform as attractive to developers as possible.

We promised earlier that we will release the platform under a open license and we delivered. The platform SDK is licensed under a liberal Apache License 2.0 with a binary naming clause. The license basically allows developers to build Tonido applications and release it under whatever terms they want to. They can use the SDK to build both free and paid apps without restrictions or conditions.

Tonido App Store coming soon

Also, as developers start working on building apps, we will be opening the Tonido App Store soon. We want to make developer’s lives as easy as possible by making it free to list your apps on the store and making it even simpler to sell your apps there as well to the expanding Tonido user base.

The Tonido app store will be a ready-made sales platform for Tonido app developers as we will handle all the transactions, patching, updating, licensing, plumbing and other tasks so you can just set the price and concentrate on developing great stuff. (and thinking about how to spend the money)

Tonido Early Bird Developer Challenge

To kick start Tonido App Development, we are announcing a Tonido Early Bird Developer Challenge. The first three Tonido apps submitted and approved for inclusion in our Tonido App store will win an Apple iPod Touch 32 GB. To get selected, the app has to satisfy the following four criteria and at least work fully in one OS.

  1. Originality of Concept–Does the application introduce a great new idea; for example, a new angle on applications?
  2. Effective Use of the Tonido Platform–Does the application take advantage of Tonido’s unique and compelling features?
  3. Polish and Appeal–Is the application easy to use and aesthetically appealing?
  4. Indispensability–Is the application compelling and essential, such as a utility a user can’t live without?
iPod Touch Copyright(c) Apple

iPod Touch Copyright(c) Apple

Getting Started with the SDK

The SDK is available via our SVN repository with anonymous read access. Read more about how to get started at our developers portal at Along with the SDK, there are 3 sample applications bundled to get started. A hello world app, a developer API tester app and finally the complete source for Thots application. All samples are also released under the Apache License 2.0, so developers can borrow, adopt code in their own apps. We plan to open source a few more Tonido Apps under liberal license terms as well in the future.

Tonido’s SDK allows devs to target all four platforms, Windows, MacOSX, Ubuntu Linux and TonidoPlug easily.  So if you are careful about the API’s you use it is extremely easy to make your application work seamlessly multi-platform.

Over the coming days we will share more information in our blog and forum about the SDK and add more developer documentation to our developer website. If you have questions, please give us a shout in the developer forum, or send us an email at

So developers, what else are you waiting for? Download the SDK and get started hacking today.

Announcing SSL support for Tonido and TonidoPlug Users


Security is a big priority for us here at CodeLathe and we take it seriously. One of the top requests we have been getting from our TonidoPlug (and Tonido) users is using Tonido without worrying about data in transit.

Tonido will now support fully secure HTTP connections via SSL. If you don’t know or are not aware, the main idea of HTTPS is to create a secure channel over an insecure network. This ensures reasonable protection from eavesdroppers and man-in-the-middle attacks. Therefore the content you view over a Tonido web server HTTP connection cannot be seen by any thirdparties that are relaying the traffic.

Tonido has always supported AES encrypted P2P communications between two Tonido peers, but now encryption comes to the HTTP interface as well.

New Tonido Release Highlights

We just released a new Tonido release for all 4 platforms. Windows, Mac, Linux and TonidoPlug. This is primarily bug fix release with one major functional update, which we will mention in a subsequent post.

Here are some of the highlights of this release:

Tonido Admin

  • Restricted Group Members can now be removed by Group Owners. Previously this option was disabled.

Tonido Photos

  • Tonido Photos UI has been simplified to make it less cluttered and easier to navigate.
  • Tonido Photos now allows starting manual photos sync whenever you want instead of only when changes are detected.

Tonido WebsharePro

  • DownloadAsZip has been re-written to be less CPU intensive and runs in its own thread. Download File limit is now expanded from 10 MB to about 500 MB.
  • Allow public access to shares without passwords. Now you can share a specific file or photo by simply sending that webshare link to anyone via IM, email etc.  You can also setup a static website for users to visit without needing to enter passwords.  Allow Public  Access is now an option in the User Access dialog box.


Miscellaneous Changes

  • Fix Tonido on Mac OSX update issue
  • Add OpenID for Mac OSX and TonidoPlug
  • Allow explicitly choosing the Network Interface that Tonido binds to via a configuration setting
  • Application Display names will have proper casing (OpenID vs Openid)
  • Numerous minor/major bug fixes in Thots, Workspace, Plug Admin, Torrent apps and much much more

Update to the newest release by clicking on “Check for Updates” button in the Tonido Admin -> Settings tab.

Have fun!

Save hundreds of dollars in electricity costs – TonidoPlug ROI

Yes. TonidoPlug can help you to save hundreds of dollars in electricity costs. In fact, it pays for itself in approximately 9 months.



TonidoPlug is based on Marvell’s 1.2 Ghz Sheeva processor (ARM Architecture) which consumes typically 1/20 of your average desktop power consumption. TonidoPlug consumes power anywhere between 3.1 watts (Min) to 7 watts (Peak) of power. Check out Martin’s blog for more numbers. On average, one can say TonidoPlug will consume 5 watts of power per hour.

Lets us do a little math here. Assume, you are running the TonidoPlug 24/7, 365 days and 1 KW power costs 0.15 cents in your area, then

Total Cost of Running TonidoPlug = (5 * 24 * 365/1000 watts) * .15 cents = $6.57/year.

Now, let us compare TonidoPlug with typical desktop PC’s. Typically desktop PC’s consume 60 watts to 250 watts of power depends on the computer state and CPU type. Check out the power management statistics from Northwestern University for detailed power consumption numbers.

If we assume on average your desktop consumes 120 watts of power ( It can be more if it is a gaming or multimedia system) and runs 24-7, 365 days

Total Cost of Running desktop PC = (120 * 24 * 365/1000 watts) * .15 cents = $157.68/year.

Now you can compare both numbers and see the difference,

TonidoPlug power cost – $6.57/year vs Desktop PC power cost – $157.68/year

If you are php, ruby developer or drupal, joomla web designer and you need a test linux server that runs 24/7 for development needs , now you have a low power, low cost alternative. You can buy TonidoPlug instead of a PC. TonidoPlug comes with standard ubuntu jaunty distribution with ssh access. You can use your favorite package management system to install whatever software you want into TonidoPlug.

Also, if you are a student or a consultant and you need access to files and media 24/7 from anywhere, then TonidoPlug is an ideal option compared to your power hungry PC. TonidoPlug comes with a list of fun and productive web apps that will help you to access your files and media from anywhere.

In summary, TonidoPlug not only offers an array of powerful web applications but also pays for itself by saving electricity costs.

Dude, where is my TonidoPlug?

Due to popular demand we ran out of stock and we are taking back orders for our TonidoPlug.

The back orders will be processed on a first-come-first-serve basis and will be shipped in 2 weeks.

Please note that your credit card will not be charged until your order is shipped. In addition, you will be able to cancel your order during those 2 weeks before your order is shipped.

To order, please go to our Tonido Store.

The Future of Social Networking: Fixing low SNR

overloadOne of the things I ponder about is how the world of social networking is going to evolve and change in the future. It is clear that current modes of communication and interaction are going to change to something else. That will be the next Facebook/Twitter/LinkedIn/Flickr/Ning.

Obviously, it is hard to imagine what those modes of communication will be, but it is somewhat easier to look at the problems with the current social networks and see if the future will fix those shortcomings.

One such problem is the Signal-to-Noise Ratio (SNR). In non-tech speak, it is the amount of useful stuff found in the useless stuff. Applied to social networks, it is the amount of relevant useful information you can use when there is a ton of useless information you don’t care about. Currently the problem is that SNR is real low in many social networks. In Twitter for example, following several people will drown you in a sea of tweets.

The same issue in Facebook.

A poster on Joel on Software forums said it best, which I quote below:

I’m on Facebook, linked up to a few hundred “friends,” most of whom I barely know.  With few exceptions, the most prolific posters/updaters are also the least interesting.  One of the entertaining few is a guy who mostly posts silly cartoons and pictures of dogs.

The signal-to-noise ratio in “social media” is incredibly low.  Jerry Seinfeld, of all people, stated the problem back in the ’90s when cell phones and pagers were becoming commonplace:
“[W]e all have absolutely nothing to say, and we’ve got to talk to someone about it right now.”

The difference is that now, with something like Twitter, we can talk to hundreds (or thousands) of people about it all at once, and without ever having to deal with immediate feedback.

How true.

Is it really humanly possible to keep up with following a few hundred people in Twitter or the dumb “Which kind of vegetable are you?” updates in Facebook? You tell me.

TonidoPlug, A NAS Adapter: How to convert your USB harddisk to NAS

“TonidoPlug is a tiny, low-power, low-cost home server powered by Tonido software that allows you to access your apps, files, music and media from anywhere. “

That is the definition you will see when you goto What is not explained clearly is that it is actually a tiny linux server running Ubuntu 9.0.4 in it and it can function as a NAS adapter out of the box.

USB Hard drives: USB hard drives are very handy to extend the storage of your desktop, to archive documents, photos and other media files. The problem with an USB hard drive is that it can be connected to only one desktop at a time. If you have multiple desktops then it will be difficult to share the drive among them. NAS adapters can help to fix this issue.

NAS Adapter: When you connect an USB drive to a NAS adapter, it makes the drive available on your local network. So multiple desktops can see the drive on the network and read/write files from/to it.

TonidoPlug as a basic NAS adapter: Like any NAS adapter you can connect your USB drive to TonidoPlug and it immediately makes it available on the local network. It understands all the common disk formats such as: FAT16, FAT32, NTFS, EXT2, EXT3. It supports hard drives of capacity upto 2TB. Price tag $99.

How it works:

  1. Power on TonidoPlug and connect a network cable to it.
  2. Now connect your USB hard drive on the USB slot of TonidoPlug.
  3. Access it from any local network. ie., you can access your USB drive at \\<TonidoPlug IP Address>\MediaDisk\

TonidoPlug as an advanced NAS adapter: If you want to setup multiple user accounts by providing private space for each user on the USB hard drive then it is as easy as changing few parameters in the configuration file. Look here for a quick how-to. Also if you are linux user who is familiar with SAMBA then the possibilities are endless.

If you are in the market for looking for NAS storage or NAS adapter then TonidoPlug might be the right choice for all your needs and much more like their definition claims “A tiny, low-power, low-cost home server powered by Tonido software that allows you to access your apps, files, music and media from anywhere. “

New Guy with a New TonidoPlug – Voice of a Happy TonidoPlug Customer

The wait is over; I finally got my Tonido Plug today, courtesy of the UPS.

I plugged it in and was impressed by how easy it was to get running. I didn’t have to hunt around my network (which consists of over 16 devices already) for the Plug; I just went to the url contained in the documentation and was able to get it up on my network and all preliminary setup info set in just a few short minutes.

The biggest surprise for me was the fact that I was able to move a USB drive from my PC to the Plug by just plugging it in. It recognized the NTFS file system and all the folders/files, and served it up in no time. I have a 1TB drive on its way (due to arrive on Thursday) but I wanted to start “playing” with the Plug today. I backed up the data from the USB drive expecting the Plug to format/delete it when I connected it. Imagine my surprise when not only did it not ask to format the new drive, but it found everything on the USB drive and served it right up! I was able to set up a share from my PC to the USB drive in a few short moments, and now it’s as if the USB drive is still attached to my system.

Speed is impressive. The Plug and all of the apps on it are very responsive and fast. I am most impressed with the torrent app. It is very fast, very easy to use, and very efficient. I tested it today with a few torrents, and the results have been stellar.

I have Tonido App installed onto two PC’s in the house and have yet to attach them to the Plug via a group. I don’t know what the benefit of that would be, yet, but I am learning.

I highly recommend getting a Plug. It’s incredibly fast, easy to configure and use, and will use a lot less power than my PC did staying on 24/7 (serving up shares for the family). I will purchase a powered USB hub tomorrow to attach three more USB drives to the Plug, giving me a 1.5 TB storage capability – A Happy Customer.

Thanks Mr.Happy Customer, You made all our efforts worthwhile – Tonido Team.