Adding Proxy support to Ubuntu One

(TL;DR: Proxy support is a complex matter. We asked our Ubuntu One users to help us with a Proxy survey to understand how proxies are used. We’re releasing the results so other developers can benefit from it.)

During the past few weeks I’ve been working on researching the intricacies of adding proxy support to the Ubuntu One client. Allowing proxies to be used is not as easy as it sounds: our codebase relies on many different libraries and frameworks to access the network, and each of those libraries has a range of support for all the various proxy protocols and the many proxy authentication schemes, that varies from “incomplete” to “non-existent”.

Also we need it to work both for the Linux client and for the new Windows client; we need to test all this with a combination of Proxy server software, protocols, authentication schemes and configurations; and we need to take into account that our file synchronization protocol is not based on the very common and well supported HTTP protocol, but instead it uses a custom protocol optimized for our file synchronization use case, and like all non-HTTP protocols it requires special handling when crossing some types of proxies.

After multiplying of all the above issues, Proxy support ends up sounding a bit complicated in fact. So we decided to run a survey with the Ubuntu One users, asking them about the Proxies that they need to use, to help us understand the most common scenarios and to focus our development efforts.

At this point I need to send a huge “THANK YOU” to our Ubuntu One users: just a day after our initial tweet we got the help of a lot of users that need Proxy support. They filled in our small survey, but they gave us a lot of insight into this matter.

Here are the summary graphs (pdf, 93kb), and since the results of this survey may be useful for other developers wanting to implement Proxy support in their own projects we decided to also release the raw survey data (csv, 43kb).

And a few of my thoughts on the survey:

  • I expected most users to use a Proxy at work or at an educational institution, but did not expect so many people using proxies at home. From the “other” descriptions, they are mostly used for VPNs and for anonymizing proxies.
  • Most people don’t know the proxy brand, nor type of authentication that they need to use. I expected this, and it’s just fine! All proxy enabled software should just work.
  • Authentication schemes are more important than the small number of replies, since they are needed to support the big percentage of users that need to use credentials.
  • Site filtering may prove a big issue for some users: many proxy servers are configured to disallow access to video sites, likely on the basis of conserving network bandwidth, and those network admins may be reluctant to allow file synchronization services like Ubuntu One.
  • Protocol filtering will be a challenge for us: a significant number of proxy installations do not allow network traffic other than HTTP and HTTPS, so we’ll need to tunnel our synchronization protocol thru some of the allowed protocols, probably using the CONNECT HTTP method of some proxy servers. And there’s no easy solution for proxy servers that allow only HTTP or HTTPS but not CONNECT.
  • I didn’t expect so many answers in so short a time. Ubuntu One users rule!

Cómo funciona un PyCamp

(Alfonso de la Guarda me contó que están organizando un PyCamp en Lima, y me preguntó como hacemos en PyAr para organizar un PyCamp. Como esto puede que le interese a más gente, respondo por acá).

Que buena idea hacer un PyCamp en Lima! Me encantaría poder asistir. Mientras tanto, les cuento como lo organizamos por acá:

Primero, anunciamos un lugar y fecha, e invitamos a toda la gente que tiene ganas de ir a anotar ideas y proyectos en una página del wiki. Por ejemplo, esta es la lista de temas propuestos en PyCamp 2011. La gente va viendo la lista de asistentes y temas y juntando ganas de ir. Todos tienen que hacer el depósito para pagar alojamiento, comida y conectividad cuanto antes, pero siempre hay alguno que termina asistiendo a último momento.

Una vez en el evento, durante el primer día hacemos la presentación de gente (donde cada asistente tiene 30-60 segundos para contar quién es) y la presentación de proyectos (donde cada persona que propuso un proyecto puede contar un poquito sobre el mismo). Luego medimos cuanta gente hay interesada en cada proyecto, levantando manos, y según la cantidad de interesados repartimos los proyectos en una grilla, para que los proyectos con más interesados comiencen “antes”. Esta es una foto de la grilla:

IMG16948.JPG

Nos resulta importante este paso, porque en la wiki no suelen anotarse todos los proyectos, y también para animar a los asistentes nuevos a que propongan o se enganchen en alguna actividad.

La idea de que los proyectos comiencen a distintas horas es para que si una persona está interesada en varios proyectos, que pueda asistir a la explicación detallada de cada uno que se suele hacer al principio del mismo, para enterarse más del estado del proyecto y poder participar tras el PyCamp.

Uno de los espacios se reserva para una reunión de PyAr (generalmente el sábado a la noche, junto con el asado), donde se charlan cuestiones administrativas del grupo. Y además alguna tarde/noche suele haber alguna actividad, tal como una excursión o algo similar. Y por las noches suelen haber juegos de mesa, de rol y torneos de metegol o Armagetron.

IMG16983.JPG

Pero más allá de la grilla, el PyCamp es “caótico”, en el buen sentido del término. Cada participante tiene libertad de sumarse o restarse de algún proyecto en el momento en que le interese o aburra. Hay proyectos que terminan ocupando la mayor parte del tiempo, por el entusiasmo que los asistentes le ponen al mismo, y hay algunos propuestos que no llegan a tener quorum. Hay participantes que terminan trabajando solos (y eso está bien) y hay otros que terminan descubriendo afinidad y arman un grupo que persiste luego del PyCamp (y eso es lo mejor).

En resumen, el mayor esfuerzo para hacer un PyCamp es conseguir el lugar, asegurarse que tenga una conexión a internet razonable y gestionar las reservas; esta es la infraestructura para que entre todos los participantes vayan organizando las actividades de la manera que les resulte más intersante.

PD: acá hay muchos posts con fotos y más info: http://python.org.ar/pyar/PyCamp