App Developer Week -- Make your applications work in the cloud with Ubuntu One -- aquarius -- Wed, Apr 13th, 2011

   1 [18:02] <aquarius> Hi, all!
   2 [18:02] <aquarius> I'm Stuart Langridge, from the Ubuntu One team, and I'm here to talk about our upcoming app developer programme.
   3 [18:02] <aquarius> Do please ask questions throughout the talk: in the #ubuntu-classroom-chat channel, write QUESTION: here is my question
   4 [18:02] <aquarius> and so, on with the show. :)
   5 [18:02] <aquarius> Up until now, your ability as developers to do cool things with Ubuntu One has been limited.
   6 [18:02] <aquarius> But I'm going to change all that.
   7 [18:03] <aquarius> We want to make it possible, and easy, for you to add the cloud to your apps and to make new apps for the cloud
   8 [18:03] <aquarius> So we do all the heavy lifting, and your users (and you!) get the benefits.
   9 [18:03] <aquarius> Imagine, for example, you've made a recipe manager application.
  10 [18:03] <aquarius> So you can type in all the recipes you like to cook, and you've got a permanent record of them.
  11 [18:04] <aquarius> (For me, that would be: get a pizza base; put pepperoni on it. You'll be better at that than me.)
  12 [18:04] <aquarius> Don't really want to take your laptop into the kitchen, though, of course.
  13 [18:04] <aquarius> So, build a mobile app which you sign into with Ubuntu One, and have that show all your recipes too.
  14 [18:04] <aquarius> And a web app which you sign into with Ubuntu One, so that you can look up recipes while you're at a friend's house.
  15 [18:04] <aquarius> This is the sort of thing that we want to make easy; giving your users and you quick access to the Ubuntu One technology.
  16 [18:05] <aquarius> Mobile access to your data; web app access to your data; saving files direct into Ubuntu One; publishing files and photos from all your apps; adding playlists to the Ubuntu One music streaming app; streaming the user's own music into a game you've written.
  17 [18:06] <aquarius> Bringing all that stuff into apps on Ubuntu; Quickly apps or Qt Quick apps or Flash apps or C apps or JavaScript apps or Air apps or whatever you want to develop.
  18 [18:06] <aquarius> We give you the APIs to do it; you build cool stuff. Deal? Deal.
  19 [18:06] <aquarius> This stuff is all being heavily worked on right now as we speak.
  20 [18:06] <aquarius> So this talk won't be too detailed with specifics, because they might change.
  21 [18:06] <aquarius> I want to give you a flavour of what will soon be possible, and answer questions, and give some pointers, and get your thoughts.
  22 [18:07] <aquarius> Also, this is App Developer Week, so I can talk about what the components we're working on are and then admire all the cool ways you all come up with for snapping them together, rather than waiting for marketing to come up with a "product" for you to use :)
  23 [18:07] <aquarius> So, some components that can be snapped together.
  24 [18:07] <aquarius> You'll be able to sign in to a web application with Ubuntu One.
  25 [18:08] <aquarius> This means that you don't have to manage your own identity system, think about password renewal, all that.
  26 [18:08] <aquarius> And that's the hard annoying part of running web apps; working out what to do if a user forgets their password, etc, etc. "Enter the name of your first pet", etc.
  27 [18:08] <aquarius> This is just like "sign in with Facebook" or "sign in with Twitter"; it's OpenID-based, and lets your users sign in to a web app and you'll know their Ubuntu identity.
  28 [18:09] <aquarius> Once you've signed in to an app with Ubuntu One, that app can ask for permission to work with your data.
  29 [18:09] <aquarius> This lets you, developers, build applications that work on the desktop, on the web, on mobile phones.
  30 [18:10] <aquarius> The recipe manager example I mentioned above is one sort of thing you could do, there
  31 [18:11] <aquarius> Your users use the nice recipe manager app on Ubuntu, which you've built with Quickly or whatever you prefer
  32 [18:11] <aquarius> (QML, now that you're all experts in it :))
  33 [18:11] <aquarius> And then they can go to yourrecipemanager.com and sign in with Ubuntu One
  34 [18:11] <aquarius> yourrecipemanager.com then asks them for permission to access their "recipes" database
  35 [18:11] <aquarius> and can then show them all their recipes on the web!
  36 [18:12] <aquarius> Your app (yourrecipemanager.com) does this via OAuth; it goes through the standard OAuth dance to get an OAuth token which can be used to access the user's recipes CouchDB database
  37 [18:12] <aquarius> And your users can be happy that it's secure, because yourrecipemanager.com will only have access to their recipes database; it can't read their contacts, or their files, or their credit card info.
  38 [18:13] <aquarius> So, this gives you the chance to build a brilliant Ubuntu app and yet still extend that app out to other platforms, for people who end up sometimes being away from their Ubuntu machine
  39 [18:13] <aquarius> so they can use the website when they're at work, and the Ubuntu app when they're at home
  40 [18:14] <aquarius> But you can imagine sharing other sorts of data between applications.
  41 [18:14] <aquarius> Imagine, for example, an achievements system.
  42 [18:14] <aquarius> You write a few games; some on the web, some on mobile phones, some on the Ubuntu desktop, some on Windows.
  43 [18:15] <aquarius> And every time the user achieves something in a game, you save that achievement to that user's "achievements" database.
  44 [18:15] <aquarius> ("100 levels completed!", or perhaps "100 enemies killed" if it's that sort of game...)
  45 [18:16] <aquarius> On Ubuntu, you'd save it into desktopcouch, and Ubuntu One will take care of synchronising that into the cloud.
  46 [18:16] <aquarius> On Android, your game would include the DroidCouch library which gives you simple access to save data directly into the user's personal cloud databases.
  47 [18:17] <aquarius> On the web, your game's backend could use the u1couch Python library to do the same thing, save directly into the cloud, or you could just use the underlying REST API (which is just standard CouchDB with OAuth signing; u1couch is just a wrapper)
  48 [18:17] <aquarius> The u1couch library is at https://launchpad.net/ubuntuone-couch for people who want to play with it.
  49 [18:18] <aquarius> it's Python, but it provides a good example of how to take a request to Ubuntu One, discover the user's Ubuntu One tokens, and maek requests using them
  50 [18:18] <aquarius> Or you could write your own wrapper library for PHP or Rails or Flash or whatever you prefer (and then tell me about it so I can point to the documentation for it!)
  51 [18:18] <aquarius> (feel free to use u1couch as a basis, or develop your own if you prefer)
  52 [18:18] <aquarius> At that point, all your games save achievements to the same place, so all your games can show you the achievements you've won in any game
  53 [18:19] <aquarius> And, as before, you can set up yourachievements.com where a user can log in and see all their achievements.
  54 [18:19] <aquarius> There's loads of stuff you can do with shared data.
  55 [18:19] <aquarius> The idea here is that all your stuff is everywhere -- more importantly, all your users' stuff is everywhere.
  56 [18:19] <aquarius> So they get the benefit of all their machines sharing the same information.
  57 [18:20] <aquarius> win an achievement in a game on your Ubuntu laptop, and your Ubuntu netbook also knows you've won that achievement, and which level you got up to
  58 [18:20] <aquarius> and so does your port of the game to a tablet or a web app or whichever other platform you want.
  59 [18:21] <aquarius> and you, developer with limited time, can concentrate on the stuff you're interested in -- making your app, your game, your program -- be great, and just not have to worry about all this data storage stuff.
  60 [18:21] <aquarius> your apps look better because they handle all this, and you don't have to worry about how to do it. :)
  61 [18:22] <aquarius> But Ubuntu One's not just about data.
  62 [18:23] <aquarius> Take the music streaming service, for example.
  63 [18:23] <aquarius> You can currently stream music to Android and iPhone, and you'll be able to add that music to the cloud from Ubuntu and Windows.
  64 [18:24] <aquarius> any music your users have got, that they've purchased from U1 or from elsewhere or ripped from their own CDs or whatever, they sync with U1, and then they can stream it to their mobiles.
  65 [18:24] <aquarius> Maybe you want to be able to stream music back to your Ubuntu machine without syncing it, or your Mac, or your Palm Pre, or your LG mobile phone, or your toaster.
  66 [18:24] <aquarius> So, just use the music streaming API, which is a simple REST HTTP API, based on the Subsonic API, or help people to get at their music by showing them our HTML5 web player for streaming music.
  67 [18:25] <aquarius> But there's more interesting ideas around music streaming than just "listen to the music".
  68 [18:26] <aquarius> Playlists, for example. The Ubuntu One Streaming apps on Android and iPhone know how to create playlists.
  69 [18:26] <aquarius> But how they do that is not a secret. Your playlists are just stored in your cloud databases.
  70 [18:27] <aquarius> So, why not sync your playlists from Banshee or Rhythmbox or Amarok or Exaile or Quod Libet or iTunes or Windows Media Player?
  71 [18:27] <aquarius> (or whichever music player you use yourself. :))
  72 [18:27] <aquarius> Copy the playlists from your media player into desktopcouch on Ubuntu or into the cloud directly with u1couch on Windows or the Mac or anywhere else, in the correct format, and those playlists will instantly show up on your phone!
  73 [18:28] <aquarius> A simple example of this is https://code.launchpad.net/~sil/%2Bjunk/m3u2u1ms/ which is a quick script I wrote to take an m3u playlist and store it in desktopcouch on Ubuntu.
  74 [18:29] <aquarius> the whole script is about 200 lines, so as you can see this isn't hard
  75 [18:29] <aquarius> it just walks through an m3u file, finds a reference to all the songs in it, and creates that as a U1 playlist
  76 [18:29] <aquarius> So you can make your Banshee playlists available to the Ubuntu One app on your Android phone by exporting them as m3u and then importing them with the script.
  77 [18:31] <aquarius> Tighter integration is great, here; what we want to do is to make it easy for you all to build the stuff that you want on top of Ubuntu One.
  78 [18:31] <aquarius> So if you want to have your Amarok playlists available for streaming, it should be possible to do.
  79 [18:31] <aquarius> I rather like the idea of playing a Flash game on the web and having the background music be the most appropriate music chosen from *my* music collection. That'd be cool.
  80 [18:32] <aquarius> Ubuntu One also, as you know, does file sync.
  81 === tubadaz is now known as tubadaz_away
  82 [18:32] <aquarius> But just syncing files is already taken care of by Ubuntu One itself, on Ubuntu and Windows.
  83 [18:33] <aquarius> What's more interesting is working with those files.
  84 [18:33] <aquarius> So, for example, imagine being able to instantly, one-click-ly, publish a file from your application to a public URL and then tweet that URL.
  85 [18:34] <aquarius> Instant get-this-out-there-ness from your apps.
  86 [18:34] <aquarius> The screenshot tool Shutter, for example, can do this already; PrtSc to take a screenshot, then "Export > Ubuntu One".
  87 [18:34] <aquarius> They did a bunch of hard work to do that, and I massively applaud them; nice one Shutter team!
  88 [18:34] <aquarius> Based on what they did, that's the sort of thing that should be easier to do.
  89 [18:35] <aquarius> The shutter team built U1 publishing into their app, and it was harder than it should have been because the APIs were very much in flux, and they weren't very well documented
  90 [18:35] <aquarius> and we recognised that that needs fixing :)
  91 [18:36] <aquarius> So there will be easy-to-use APIs so your apps can do the same. Imagine quickly sharing your newly created image or document or recipe with the world.
  92 [18:36] <aquarius> Your app could have a button to "store all my files in the cloud", or "publish all my files when I save them", or "automatically share files that are part of Project X with my boss".
  93 [18:37] <aquarius> More to the point, you'll be able to work with files directly *in* the cloud.
  94 [18:37] <aquarius> So a backup program, for example, could back up your files straight into Ubuntu One and not sync them to your local machines.
  95 [18:38] <aquarius> that makes it easy for your app's files to be saved away from the local machine if that's what you want
  96 [18:39] <aquarius> which is ideal if you're a backup program, as mentioned
  97 [18:39] <aquarius> so your users can just say "yeah, save this straight into my online storage, I don't need it locally"
  98 [18:40] <aquarius> And of course being able to save things in and out of the cloud means that you can get an Ubuntu One sync solution on other platforms.
  99 [18:40] <aquarius> So you could work with your files from your non-Android mobile phone (we've already got the great mkarnicki working on that for Android!)
 100 [18:40] <aquarius> Build a fuse or gvfs backend for Ubuntu or Fedora or SuSE or Arch Linux. Build a WebDAV server which works with Ubuntu One and mount your Ubuntu One storage as a remote folder on your Mac.
 101 [18:41] <aquarius> so if you prefer to think of your online storage as a drive, rather than something which files are synced to, you can make that happen for yourself and for your users if you want to
 102 [18:42] <aquarius> And web apps can work with your cloud too, for files as well as data.
 103 [18:45] <aquarius> Imagine, say, a torrent client, running on the web, which can download something like a movie or music from legittorrents.info and save it directly into your cloud storage.
 104 [18:45] <aquarius> So you see an album you want on that torrent site (say, Ghosts I by Nine Inch Nails) and go tell this web torrent client about it (and you've signed in to that web torrent client with Ubuntu One)
 105 [18:46] <aquarius> And the website then downloads that NIN album directly into your personal cloud -- which of course makes it available for streaming direct to your phone.
 106 [18:47] <aquarius> You could do that with videos as well: choose a torrentable video (say, Beyond the Game, the documentary about World of Warcraft) and download that directly into your cloud, if someone built the web torrent client.
 107 [18:47] <aquarius> (Of course, that would be cooler if Ubuntu One offered a video streaming service as well as music streaming, wouldn't it. Hm... ;-)
 108 [18:47] <aquarius> But it's not just about your content for yourself; think about sharing.
 109 === tubadaz_away is now known as tubadaz
 110 [18:48] <aquarius> Ubuntu One lets you share a folder with people. This would be great for distribution.
 111 [18:48] <aquarius> Imagine that you publish an online magazine.
 112 [18:48] <aquarius> So, you create a folder on your desktop, and put issues of the magazine in it.
 113 [18:48] <aquarius> Then, you put a button on your website saying "Sign in with Ubuntu One to get our magazine".
 114 [18:49] <aquarius> When someone signs in, your website connects to the Ubuntu One files API, with your private OAuth token, and adds that signed-in user to the list of people that your magazine folder is shared with.
 115 [18:49] <aquarius> Then, whenever your magazine has a new issue, you just drop it into that folder on your desktop.
 116 [18:49] <aquarius> (Or even upload it to Ubuntu One directly through the website.)
 117 [18:49] <aquarius> All the subscribed people will get the new issue instantly, on all the machines they want it on, and in the cloud.
 118 [18:50] <aquarius> No-one has to do anything. No polling of RSS feeds, no bandwidth use by your website
 119 [18:51] <aquarius> You could build a cool Ubuntu app for your readers which would see that a new issue of the magazine has arrived on the machine and lets them read it
 120 [18:51] <aquarius> You could distribute anything like this. Imagine a podcast, or chapters of a novel.
 121 [18:51] <aquarius> It would also work for paid-for content; when someone pays, have your code share a folder with them, and put their paid-for stuff in that folder. That's all doable through the files API.
 122 [18:51] <ClassBot> There are 10 minutes remaining in the current session.
 123 [18:51] <aquarius> We're building the files API itself (an HTTP-based REST API) and also some wrappers for it to make it easier to use in your apps from Python and the like.
 124 [18:52] <aquarius> OK, I've talked about a blizzard of ideas that'll be made possible, and shown you almost no code.
 125 [18:52] <aquarius> Which is because, as mentioned at the beginning, a lot of this code is currently being written and tested as part of the 11.04 release :)
 126 [18:52] <aquarius> However, code is nothing without documentation, and that's really important.
 127 [18:52] <aquarius> My main task for this cycle is to build documentation for all of this stuff; how to use Ubuntu One and all the APIs we provide in the cloud, on Android, on Windows, on iOS, on Ubuntu.
 128 [18:52] <aquarius> So there'll be documentation for all this stuff so all of you clever people can build things that I haven't even dreamed of.
 129 [18:52] <aquarius> We did some user research (thanks ivanka and the user research team!) on which sites have great API documentation and which don't, so we have an idea of good directions to go in.
 130 [18:53] <aquarius> And I'm working away feverishly on getting an alpha version out!
 131 [18:53] <aquarius> So, what I'd like to know is: what are your cool ideas? What help do you need from me in making them happen? What do you want to use Ubuntu One for in your apps and your scripts and your work?
 132 [18:53] <aquarius> and I've got about five minutes left, I think, so I'm happy to answer questions if anyone has any
 133 [18:54] <aquarius> otherwise, thanks for listening and I can hand over to alecu who is going to talk about DBus :)

MeetingLogs/appdevweek1104/UbuntuOneCloudApps (last edited 2011-04-14 07:10:47 by 178)