ThimphuTech was the first technology blog in Bhutan. We started writing it in 2009, just as broadband and mobile internet started to take off. (Although internet in Bhutan was launched in 1999, it was either super-slow or super-expensive, and was only used by a selected few).

In the blog, we wrote about technology and food, but also about plenty of other stuff. The blog became popular and influential in Bhutan. A companion bi-weekly column -- Ask Boaz -- was published for many years in the Kuensel, Bhutan's national newspaper. (The complete Kuensel columns are available as an ebook, Blogging with Dragons).

We stopped updating the blog when we left Bhutan in 2014, but the information within the posts can still prove useful, and thus we decided to keep it online.

We thank all our readers.
Tashi Delek,
Boaz & Galit.

Wednesday, May 1, 2013

An Even Cheaper KA-Lite + Kiwix Wireless Server

Our recent post about the $99 Khan Academy wireless server made quite a splash, leading to mentions on the official Raspberry Pi blog, comments by the good folks of KA-Lite, and then a few other places.

Another major resource for education is Wikipedia. The most common software for serving offline Wikipedia articles is Kiwix. We recently put KA-Lite, together with Kiwix and other educational resources, on a single Raspberry Pi. We call this project Sherig-in-a-Box. To read more about this initiative (and find out what Sherig means), check out our project page.

While $99 is cheap enough (about Nu 5,300), we can make our box even more affordable. In our original server, we used the Raspberry Pi Model B, which costs $35. Since then, Model A became available. Model A costs $25, which is $10 less than the Model B. Model A lacks the Ethernet port and has only one USB port instead of two, as well as only half the memory (256 MB vs. 512 MB). If you only want to run a wireless server without a wire-line (Ethernet) option, then model A should suffice. Less memory, however, will translate to fewer concurrent clients and possibly sluggish performance.

To reduce the cost even further, we can use a lower-capacity SD Card. In our original prototype, we used a 64 GB card to hold all of KA-Lite's 4,000+ videos as well as a Kiwix database. The 64 GB SD card, which runs at about $50, is the most expensive component of our server. Many schools, however, will not need all 4,000 videos. A primary school, for example, will be happy with a small subset that does not include the high-school-level-and-above material.

In a blog post yesterday, KA-Lite wrote about running a configuration similar to ours, but without the Wikipedia component. The post mentioned that the Pi was able to serve 35 simultaneous wireless users. Assuming users are all concurrently streaming MP4 videos, this is impressive, especially noting that a few of the KA-Lite videos are encoded at around 2 Mbit/sec.

This brings us to a further cost reduction option: Many of KA-Lite's videos are high-resolution (1280x720) with CD-quality audio (44.1 KHz, stereo). While a few of the videos do require high-resolution (for example, a video clip displaying crowded Excel spreadsheets), many others do not. Many low-cost smartphones and tablets will not support such resolutions anyway (e.g., the Indian Aakash low-cost tablet has a 800x480 screen). Thus, transcoding the videos into lower resolution formats and reducing the unnecessarily-high audio quality will result in lower space requirements, as well as lower streaming rate. Serving low-resolution videos will reduce the required WiFi bandwidth and lower the demand on the Pi's CPU, thereby increasing the number of clients that can be served concurrently. Hopefully, KA-Lite will provide a low-resolution video compilation.

A quick back-of-the-envelope calculation shows a few possible configurations of low-cost servers, starting at around $48.

HardwareSoftwareTotal Cost (US)
Raspberry PiSD Card
Class 10
Model A
8 GB
Wikipedia for Schools~ 250 videos
~ $48
Model A
16 GB
Wikipedia for Schools~ 800 videos
~ $52
Model A
32 GB
Wikipedia for Schools~ 1300 videos
~ $64
Model A
64 GB
Wikipedia for Schools4000+ videos
~ $86
(§)Approximate number; assumes existing video encoding. Lower-bit-rate encoding will increase the number of videos.

Using a Model B Raspberry Pi will add the capability for a wired (Ethernet) connection, as well as increased performance. It will also add $10 to the bill.

P.S.: The cost of hardware for equipping all public schools in Bhutan with the most expensive Sherig-in-a-Box Raspberry Pi is around $52,000, or Nu 28 lakh.