View low bandwidth version

Archive for January, 2010

Lopad: high speed collaborative text editing over low bandwidths

Saturday, January 30th, 2010

Video of lopad team at #crisiscampLDN

Note: lopad is still a work in progress. The #crisiscampLDN team have made good progress, there will be a first cut up in the next few days. Getting it to the optimised, low bandwidth tool it needs to be is a project for the next few weeks.

I’m in “the ball room” (the other one’s called “the tree room” in case you’re wondering where the heck we are) at #crisiscampLDN and I’m thoroughly impressed by the efforts of @nickstreet and @mrchrisadams from Headshift.

What are they doing? Something really cool – making the first release of lopad. Check out the intro on blip.tv from @leashless above.

What is lopad?

Aptivate makes a service called loband – it takes high-bandwidth webpages and makes them work quickly on slow connections.

There’s a demand (e.g. from staff at UNFAO and users in Rwanda) for a related service, tuned for low bandwidth environments, that lets users easily collaborate over a text file.

This is the first addition to the lo* (pronounced lo-star) family of products: lopad.

Think of it as a super-lightweight Google Docs with no registration, instant visibilty of other user’s changes and fast performane on all internet connections.

There’s already a product called Etherpad which has been open-sourced since Google bought the company (to absorb the team into Google Wave). They plan to discontinue the public service in a few months time. In response to this, there are already some other public instances of Etherpad (e.g. PiratePad) as well as many private ones, but the immediate goal of the lopad project is to:

  • Create lopad.org – a free public instance of etherpad, promoted for use in the relief and development sectors but open to anyone
  • Optimise lopad.org to perform well on low bandwidth and/or high latency connections

Some of the things we’re going to be doing along the way will be getting a production server up and running, getting a copy of etherpad on there, rebranding it to “lopad”, analysing the opportunities for improving the bandwidth performance of the system and then implementing them.

In true meta-style, there’s more info and developer notes online at: http://etherpad.com/crisiscampLDN

Some highlights from the above:

I also think this will be a valuable tool for use by people in the Crisis Camp effort.

So: friends, coders, countrymen, come and join in!

Getting Ready for Crisis Camp London – Day 2

Thursday, January 28th, 2010
Crisis Camp London

Crisis Camp London

We’re getting ready for the second Crisis Camp London day, this Saturday, at the London Knowledge Lab.

Considering how quickly last Saturday was put together we had a great turn out. We’re hoping for, and expecting, an even larger turn out this time.

We’re getting out all the laptops, network gear, and spare projectors we can find. We’ve got enough flip-charts to paper the Albert Hall. I even heard that Domino’s were considering sponsoring the pizza again – and with added vegan options too. Many thanks to them!

We’re on conference calls to the US Crisis Camps and projects. We’re part of a strong team looking after the organisation, infrastructure and facilitation of the London event.

It really is quite something the speed with which this is coming together and the level of interest and motivation. This looks set to become an important movement.

If you are technical (eg. an IT project manager, a coder, a user experience person) or have relief experience and want to help Crisis Camp London support Haiti, then please come along.

You can also help by printing out and displaying the Crisis Camp London Poster

#CrisisCampLDN

Video: Introducing Crisis Camp London #1

Monday, January 25th, 2010
Team at Crisis Camp London

#crisiscampLDN team at work

On Saturday 23rd of January, Aptivate were out in force at Crisis Camp London which was kindly hosted by the London Knowledge Lab.

Björn had a chance to grab some footage on the day and put together a short video explaining what Crisis Camp is all about, what it’s like in London and what you might expect if you come along.

Crisis Camp London will be a regular event for the next few weeks, one which is going to grow in size and impact.

If you’d like to follow what’s going here are the links:

Ning: http://crisiscampldn.ning.com/

Twitter hashtag: #crisiscampldn
Twitter account: @crisiscampLDN

Crisis Camp London wiki: http://wiki.crisiscommons.org/wiki/Crisis_Camp_London

You can also click on the image above for a link you the video on YouTube.

Simulating low bandwidths: how to make sure your apps work in the field

Saturday, January 23rd, 2010

I’m going to write about four ways to simulate a slow internet connection and a bit of background about why you’d want to do it. Simulation is great but I’ll say this now: there’s no substitute for testing stuff in the field. However, before you release to the team on the ground or grab your bag and hop on a plane, read this.

Why simulate low bandwidths?

Aptivate builds online software for people in the international development sector. Our users are in places where internet connections are slow and unreliable – we need to make sure our stuff works for them.

More people are accessing the web using mobile handsets or mobile internet connections (3G dongles and tethered phones). The bandwidth, latency and stability characteristics of these links are very different to the “always on broadband” that most developers target.

Finally, we’re involved with CrisisCamp London over the next few weeks – part of an international effort by dedicated volunteers to provide remote technical support and build tools for individuals and organisations working in Haiti. What they build needs to work in that environment – hopefully this post is going to be useful.

So, if you think your technology is going to be used in the scenarios above, read on. If you’re just awesome and like to know about this stuff, read on too…

Four ways to simulate a slow connection

  1. Use a profiler, your brain and some common sense (easiest)
  2. Use Aptivate’s online low bandwidth simulator (easy)
  3. Use Sloppy a desktop Java app that simulates slow web links (pretty easy)
  4. Get a machine (with maybe two network interfaces) and do some IP traffic shaping (best results, not easy)

There are probably a few more but I’m on a plane from Rome to London to go the the first CrisisCamp and can’t think properly!

1. A profiler + simulate it in your brain.

This is particularly useful if you’re developing for the web.

YSlow Running on Reliefweb.int

There are a few online and in-browser tools that give you a breakdown of the resources your website is using.

Three important things to get from these tools is:

  1. What’s the bandwidth usage of each of my pages and typical interactions?
  2. How many individual requests are required for each page?
  3. How much content is cached?

The overall bandwidth is a feasibility test. We say aim for 25k per page, but use your own judgement – how fast is your user’s connection, how long will it take for them to get to something useful (hint – if it’s longer than 5-10 seconds: #FAIL)

The number of requests also gives you an indication about performance over high latency or intermittent connections – in short, use fewer objects and cache them when you can.

Finally, if you’ve got a network usage meter (I have a noddy one running that comes with iStatMenus on the Mac ) you can get a rough idea of how much bandwidth an app is consuming (should work fine even if you’re developing an app in a mobile simulator). I’ve seen stuff for Windows I can’t remember, on Linux you could use BWM or get fancy with logging modes in IPTables – Google for more.

That’s it.

2. Use Aptivate’s online Low Bandwidth Simulator

Aptivates Low Bandwidth Simulator

This technique is only useful if your site is accessible from a public URL. It only simulates bandwidth, not latency or packet loss.

We make Loband, and online service that strips the junk out of webpages and gives you a compressed, simplified version that works better on slow links.

As part of the Loband code, there’s a simulator which you can access here.

You plug in the URL of your site, select the bandwidth you want to simulate and hit go. I haven’t tested it recently with any serious AJAX/HTML5/Flex/Flash stuff so your mileage may vary if you make heavy use of these tools.

Do what a user would do with your app and see if it’s usable.

That’s it.

3. Use the Sloppy desktop Java app

Sloppy Java desktop bandwidth simulator

This technique is great if your site is running on a local dev box or even if it’s online. It only simulates bandwidth, not latency or packet loss.

Make sure Java lives on your machine. Download Sloppy. Run it, start it, point it at your app.

Do what you would have done with 2.

That’s it.

4. Get a machine, (maybe two network cards) do IP traffic shaping.

This technique is the best of the bunch: you can simulate bandwidth, latency and packet loss and do so for anything running on your machine or LAN. That’s anything: browser apps, mail clients, Skype, mobile simulators etc. It’s not hard but is a little fiddly. There are two broad ways you could do this: for yourself on a single machine or, for a bunch of people on a LAN.

Terminal Showing iperf measuring different bandwidths throttled by dummynet

iperf showing a dummynet throttled link

Quickly,  to do it for yourself, on your own machine to do app testing: if you’re running FreeBSD / MacOSX,, follow Bjørn Hansen’s tutorial.

It gets a bit trickier if you want to do it for several machines at once.

What we’re trying to do is turn a machine with two network interfaces (NICs) into a “router”. Traffic goes in/out of the first interface at normal speeds, but the traffic goes in/out of the second interface at user-selected levels of crapness (bandwidth, latency, packet loss)

Relatively speaking: this is easy on a Mac / BSD box, trickier on Linux and hard on Windows. While most laptops actually have 2 network interfaces (wifi + ethernet) – I normally do this with a desktop that’s got 2 NICs  or a laptop + a USB / CardBus/PCMCIA NIC.

On a Mac/BSD you’re going to be using ipfw to control the dummnynet traffic shaper. Man up to find out more. In short: ipfw’s a firewall that classifies packets (e.g. by which port or IP they’re going to) into “flows”. Dummynet takes a flow and sticks it in a “pipe”. A pipe emulates a link with given bandwidth, propagation delay, queue size and packet loss rate.

….how on earth do we get this working?

There are better tutorials than I can write quickly here and  here. But in brief:

  1. Get a BSD machine with dummynet (OSX 10.4+ is enabled by default, might need a kernel rebuild for FreeBSD) running with 2 NICs. Fire up a terminal, type in ifconfig and make sure you can see the two interfaces (en0 and en2 for me)
  2. Make sure you can route packets between interfaces.
  3. Make a pipe for the traffic between interfaces
  4. Configure your pipe, stick your traffic in there and smoke it.
  5. Tweak the pipe and simulate to you heart’s content.

In reality, this always takes me half an hour to get right – I’ve never had this go smoothly first time.

First things I check if it’s not working:

  • Is OSX / BSD doing some daft routing / automatic internet connection sharing that messing with your ipfw settings?
  • Are you routing using the right interfaces? I’ve actually got 7 network interfaces that show up in ifconfig to choose from (firewire, bt, vm, wifi, ethernet etc.)
  • bit/s and Byte/s are quite different…
  • Don’t despair, it will work, there’s pictures of me doing it here. :-)

Typical bandwidth / latency / loss scenarios

The key commands you’ll be running to set parameters will look like:

ipfw pipe 1 config bw 50Kbit
ipfw pipe 1 config delay 200ms
ipfw pipe 1 config plr 0.2

The three variables you have to play with are bw (bandwidth) plr (random packet loss rate) and delay (latency). Here’s a super-rough guestimate for some typical scenarios, please advise if I’m way out or there are other common scenarios:

Scenario Bw (Kbit) delay (ms) pr (ratio)
2.5G mobile (GPRS) 50 200 0.2
3G mobile 1000 200 0.2
VSAT 5000 500 0.2
Busy LAN on VSAT 300 500 0.4

What about windows and linux?!

I promise to update this bit with more info when I’ve got Linux, Windows boxes and Chris to hand.

In short though: with linux it’s the same idea, machine with 2 NICS, get them routing, use IPTables and the linux traffic shaper, tc. It’s not as good as dummynet (no packet loss IIRC) but gets the job done. For Windows, I’d honestly have to do some more research, last time I tried it, I just pulled out my Macbook.

Please add any tips and corrections of  below!

Tariq

Crisis Camp Haiti – London

Friday, January 22nd, 2010

Following in the example in the US, Crisis Camp has come to London!

The first “work day” will be Saturday 23rd January… that’s tomorrow.

10am at the London Knowledge Lab.

It’s going to be a cross between a BarCamp and a HackDay. The purpose is to allow volunteers to contribute to technical projects that will help the relief efforts in Haiti. In the first instance these projects will be largely IT related.

Aptivate are supporting Crisis Camp. They’ve let me (Alan) help organise and facilitate the event on work time (thanks guys!!!). And Martin, one of our great software engineers will be coming along tomorrow to get involved… and bring projectors, laptops and networking gear. He’s got a big rucksack and is strong. (But if anyone is coming down from Cambridge and wants to help him carry some equipment, please get in touch).

Aptivate have also bought a heap of stationery for the project teams – flip charts, pens, index cards – we’re showing our Agile roots. Low-bandwidth High-value facilitation tools.

If you’d like to follow what’s going here are the links:

Twitter “hashtag”: #crisiscampldn
Twitter account: @crisiscampLDN

Crisis Camp London wiki: http://wiki.crisiscommons.org/wiki/Crisis_Camp_London

And if you would like to come along and help out – which I hope you do – you can register here:

http://crisiscamphaiti-london.eventbrite.com/

Crisis Camp Haiti – London is one of the international Crisis Camps organized in support of Haiti.

The day is dedicated to working on Crisis Commons projects, hoping to make life easier for people on the ground by doing what we can do from here. Common tasks are programming, working on maps, and helping to gather information from around the web into usable forms.

Please come if you think you can help in any way, even simple things like helping peoplewho are not at the camp keep in touch with what is going on, or keeping the hackers fed-and-watered. There are plenty of tasks anybody can do.

We are actively looking for people to help resource and organize Crisis Camp London. There is a lot to do!

Please bring a laptop if you have one. 3G dongles/Mefi may be very useful as venue wifi often has problems with the large load. Pens, pencils, paper, anything you need to be productive.

This is a day at the office, saving the world.

London Knowledge Lab are hosting the event. Vinay Gupta (Hexayurt Shelter Project) (hexayurt+ccl@gmail.com, @leashless) will be lead on the day, with Barry Sage(@OBazaS) leading overall.

Technology decisions in organisations great and small

Thursday, January 21st, 2010

Ken Banks often writes about Social Mobile’s Long tail – it’s a really helpful concept; one that I find myself frequently using when explaining our work to others.

Ken Banks Social Mobile Long Tail Graphic

Social Mobile's Long Tail by Ken Banks

Whenever I see Ken’s picture, I’m reminded of the similar relationship between complexity and organisational size and I’m proud of how Aptivate works successfully across this spectrum. We try to bring the breadth of our knowledge, skills and experience to bear when working with everyone from communities in rural Zambia, to NGOs in the UK, international agencies in Europe and governments across Africa.

I think this is really important.

It’s great to be “the policy people” or “the community technology people” but you need people who span these worlds and can join the dots.

That’s us.

We’ve spent months in rural Zambia working with young women getting low-power computers, GPRS connections and mobile systems working to support local entrepreneurship. Now we have greater confidence offering advice on mobile monitoring and evaluation strategies for NGOs in the region, and in turn, to guide an international agency wanting to know what kind of policy monitoring is possible, and how data might integrate into their wider systems.

I had an enjoyable conversation yesterday with the folks at CAFOD who want to know if mobiles could strengthen their work at the local partner and international levels. I met them through BarCampAfricaUK last November and finally had a chance to catch up.

Personally, I’m really interested in working with medium-sized organisations trying to make better use of technology. I probably have similar conversations 2-3 times a month.

I think there are some common characteristics and challenges for these organisations:

  • They already use some technology in the areas you’d expect: fundraising, communications, advocacy, admin and finance, and monitoring and evaluation.
  • They don’t have much capacity to explore and understand how new technologies (e.g. mobiles, collaboration tools and media capture) or advances in current technologies (e.g. open standards, APIs, social media) can help their programmes.
  • Local partners are already ahead of the game when it comes to the use of mobiles. This is typically out of necessity – even basic SMS is an astoundingly versatile medium.
  • The “technology champions” in an organisation, the individuals who appreciate the possibilities, are not always the decision makers. They often don’t have the time to investigate these opportunities and present information around which decisions can be taken.
  • Experimenting with the various tools out there can be challenging for the non-geek and it’s hard to find out about the realities of implementation.
  • Consultants are expensive and companies who sell “off the shelf products” might not have the best interest of the organisation at heart.
  • There are some great resources out there that catalogue technologies, there are also some good case studies that cover certain scenarios but there are few resources that specifically help people make decisions at the organisational level.

So here’s a promise: we’ll help you make decisions about technology. We’ll do a whole lot more, but at its simplest, we’ll do what it takes for you to decide what do to.

The first three things on my list of “how to support decisions” after my conversations yesterday are:

  • Write a blog post on technology decision making for medium-sized organisations, reassuring them that they’re in good company. (done)
  • Write a primer on “why use mobiles for data gathering and communication” with a goal to support decisions.
  • Put together a “mobile gadget lab in a briefcase” to take to organisations so they can play with pre-configured versions of various tools on various devices supporting a couple of different workflows.

Do any of these thoughts resonate with you?

Comments most welcome!

Tariq

Large Wireless Networks

Tuesday, January 5th, 2010

I saw an interesting request on the AfNOG mailing list:

How does one determine the number of users,  a wireless network can support. I need to buy a wireless router to support 2000 users within an organization. The problem is how do I determine this capability given the specs of the wireless router.

To put it in a better way “what determines the number of users a wireless router can support”[?]

Although I’m not an expert on wireless networks, I have worked with them a bit, and I sent a reply that might be useful to others (I hope).

I’m not sure there’s an easy answer to that question. Some factors that may influence the decision are:

  • The total bandwidth available to a single wireless access point (AP), e.g. 54 MBps for an 802.11g router. This also depends on the level of 802.11 that the clients support. An 802.11b client will use much more airtime per packet than an 802.11g client, so if most of your clients are 802.11b then you won’t get more than 11MBps per AP, regardless of the theoretical maximum of the AP.
  • The frequency space available. There are only three non-overlapping 802.11b bands (maybe fewer for 802.11g), so no matter how many APs you have, the most bandwidth you could get in a given spot cannot be more than three times the bandwidth of one AP. Also, if they form a contiguous roaming network (same SSID and key) you have little or no control over which one a client will associate with, so you can’t evenly divide the available bandwidth between the three that you can see.
  • The guard time between different transmissions and for RTS/CTS round trips. This will cut your available bandwidth at least in half from the theoretical maximum, and more if you have hidden nodes (which is close to inevitable with thousands of clients, unless they are all in the same room).
  • The maximum number of clients that can associate with a given router. Most APs don’t publish this number, but Cradlepoint routers can handle between 4 and 64 clients per router. Keenan Systems reckons that “Once you have more than 25 clients associated most access points start to break down”. I’d guess that Cisco kit has the highest limit, especially the professional versions (not Linksys branded) and el cheapo generic Chinese kit has the lowest.
  • If the AP is serving DHCP and running NAT (acting as a router as well as an AP) then the translation and DHCP tables of the router will be a limit. Some router DHCP servers only allow class C subnets, with a maximum of 253 usable client IP addresses per AP. It’s probably more advisable to use a real machine (with a hard disk) as a DHCP server.
  • Similarly, if you don’t do NAT on the AP, then whatever handles the NAT on your Internet gateway will see the IPs of the individual machines, and will therefore need to be able to handle however many simultaneous IPs your clients have, and connections that they make.
  • Whatever your DHCP server, the number of IPs available in your network subnet will limit the number of clients who can have a valid unique IP address at one time.
  • The bandwidth of your Internet connection. The minimum that I’ve seen working at all is 3kbps per client, or 6 MBps with 2000 clients. That should be real bandwidth, not contended upstream by the ISP, otherwise multiply by the contention ratio. Don’t forget to include your fixed clients as well.

The best advice I can give you, never having built a wireless network this large myself, is to:

  • Grit your teeth and buy the best kit you can find on the market. Be prepared to pay through the nose, e.g. $1000 per AP or more.
  • Talk to the manufacturers about the maximum number of associated clients, and get assurances in writing that their kit can handle the load. Preferably get them to propose a solution for 2000 clients, also in writing.
  • Use small cells with directional antennae and lots of APs in areas where you expect more than 10 clients at peak times.
  • Try to scale your network up smoothly rather than buying a complete solution in one go. Don’t try to support 2000 clients in the first year, let alone the first day.
  • Monitor and graph the performance of the network, particularly bandwidth, wireless contention, number of errors and number of associated clients, and identify hotspots.
  • Keep one or two APs spare, and deploy them in the areas that are seeing the most activity.

Sunday Folayan wrote:

Must this network be implemented with JUST ONE wireless router? With one router … If you run 802.11bg at 2.4ghz, you have just about 2Mbps of bandwidth to play with, from one AP. If you deploy 802.11a at 5.8Ghz, you should get better than 10Mbps. If any of the clients is 802.11bg, the AP will default to 802.11bg, even if it is capable of 802.11a. With 2000 users, that is an average of 1Kbps or 5kbps at the best per subscriber! Could this be what you want?

To put it in a different way … One single AP cannot do it.

And Hervey Allen wrote:

From what I’ve experienced wireless router specifications and claims often do not match what you will experience in real-world use. I know of several large-scale installations (10,000+ users and above) who ended up using Cisco Aironet series routers with Power over Ethernet capabilities (PoE).

I will double-check, but last time I was on-site the upper limit for one of these wireless routers was around 50 concurrent users with light to moderate use. That is, a single user running a torrent can make an access point almost unusable for the other 49 potential users…

It would be interesting to hear from others on the list who have large wireless installations what their experience has been, and what hardware they have used.

Issues of giving out addresses, roaming, recapturing addresses, etc… are quite important.

Patrick Okui wrote:

Joel Ja did a pretty good presentation on what he’s learned from setting up wifi installations for the various meetings/events at NANOG27. A few things have changed in the wifi world since 2003 but the concepts are still valid.

Hamish Downer wrote in a comment to this post:

This page has some good answers. It is about tech conferences, but the basic problem of getting lots of people on wifi in a single space is covered by the solutions.

I fully agree with Hamish, the page has excellent advice from people who have actually done this, unlike me.

Finally, Mark Tinka replied:

I generally wouldn’t recommend vendors on a public mailing list in such variable matters as wireless deployments, but given the scale you’re considering, Aruba came to see me once (uninvited, as usual), and they seemed to have some rather interesting things to say re: their wireless product portfolio, with particular regard to large scale installations.

You might want to add them to your shopping list, but my guess is the price point is way-up-there, what with their controllers and all.

But be careful about “buying” everything they tell you (same goes for other vendors). As others have mentioned, binding assurances from them as well as PoC’s (proof of concept) before you sign would be great!

I hope this helps someone. Please let us know how you get on.