Technology

One small step for Amarok…

June 20th, 2008  |  Published in Code, Technology

I’m very excited to announce that the first Amarok->Cloud transfer has taken place. Just moments ago, for the first time ever (as far as I’m aware), a track was sent up into the Cloud from a desktop media player, escaping the local collection prison. This track shed the chains of limited accessibility, and is no longer doomed to obscurity, lost in an sql database in my home directory.

This lucky track happened to be Making Me Nervous by Brad Sucks available over at the great indie music label Magnatune.

Early this morning I committed the last bit of code that allows you to upload tracks to your MP3tunes Locker from Amarok. Amarok is the first client, besides the official client, to allow you to do such a thing. One of the great things about this feature is it’s seamless integration in the UI.

Click for the full view
Amarok 2: Copy to Mp3tunes

After a short upload I go check the MP3tunes Web Player
Listening to Brad Sucks via MP3tunes

From this point I can listen to the track on my phone, on my squeezebox, or any other MP3tunes supported devices.

Of course there are some caveats, but I aim to fix these over the next several days:

  • No upload progress information.
  • No error handling when you attempt to upload a filetype mp3tunes doesn’t support.
  • It’s not possible to upload non-local content (say from magnatune or ampache)

Don’t start thinking that things are winding down; uploading and downloading are only one small part of the show. The end goal is fully automated bi-directional syncing between Amarok and MP3tunes with 100% support for the MP3tunes API.

What exactly does this entail?

  1. I foresee a “keep in sync with MP3tunes” checkbox for each playlist in the Amarok playlist browser, so you can add/remove tracks from your favorite playlists and thoughtlessly have access to them on any MP3tunes enabled device.
  2. Imagine clicking “Purchase” at an online music store (like eclassical) and having the tracks instantly available in Amarok and anywhere else you have access to your locker.
  3. Your friend beams you a track from his Android phone to your Android phone while you are out on the town, and when you get home the track is all ready in your local Amarok collection, added to your smart playlists ready to jam.
  4. You subscribe to an awesome podcast using Amarok’s built in podcast directory, and seconds after a new episode is released it’s available on your wifi enabled portable player (or phone)

And it all started today.

GSoC Report Week 3: Tanstaafl

June 17th, 2008  |  Published in Code, Technology

Project: MP3tunes + Amarok Integration

Total Commits: 51 Weekly Commits: 12

Past 7 Days

It was another productive week in #amarok with over 150 commits! In the 12 of those that were mine I managed to do several things.

  • Added elegant session handling to the MP3tunes service
  • Fixed the collection search box, so you can filter your MP3tunes Locker.
  • Enabled Copy To Collection functionality, so you can now copy (read: download) mp3tunes tracks to some other collection!

Of course, implementing those items wasn’t as simple as it sounds, but the features are essential and basic.

The search box (filtering) could use some improvement as currently it only filters via the artist field, but that is a limitation of the MP3tunes API. When I say it
“only filters via the artist field” I mean that it only matches against artists, so searching for a particular track name will not work. To fully support the filtering feature the MP3tunes API would need to allow you to do something like get a list of artists based on a partial track name in a single request. That is just one example, and yes, I could workaround it by doing multiple queries, however that would slow the entire operation significantly. Users expect the search fields in Amarok to be snappy, not take ~5 seconds per. token they supply. It is certainly not a showstopper, and it functions well enough for now, but hopefully MP3tunes will be open to expanding their API later on down the rode. To be fair I have never come across a web API that supported that sort of complex searching. The Ampache service in Amarok suffers from the same lack of functionality.

Interjection: Major props to my GSoC mentor, Nikolaj, for attempting to explain various parts of Amarok’s innards to me, not only once, but the several times it took to get the concepts through my thick skull. Also, he’s helped me track down several childish mistakes I’ve made when I was at my wits end trying to locate them. I can’t thank him enough. Hands down he’s the best GSoC mentor.

With the addition of “Copy to Collection” Amarok has taken a large step towards being fully integrated with MP3tunes. Up till this week all you could do was browse and stream your MP3tunes Locker. That is fine and dandy, but you could do that from the MP3tunes web player, their mobile player, your PS3, or any other number of their supported devices. However, none of those options allow you to seamlessly download and organize your stored music into your local music collection at the click of a button.

There is one shortcoming that needs to be addressed at some point before I’m satisfied: there is no progress indicator of any kind when you download tracks. The only way to see if tracks are being downloaded after you press Go is to watch the destination directory for changes. Thankfully this affects all collections you can “copy to/from”, not just MP3tunes, so perhaps someone else will feel inclined to whip up a progress indicator. There’s no such thing as a free lunch.

Upcoming 7 Days:

I have one big goal this week:

  • Add MP3tunes Upload features

By Monday next week, you will be able to do Copy tracks from your local collection, Ampache collection, and the Magnatune database, to your MP3tunes locker.

Copy to Collection

There is quite a bit of work to be done before this can happen, but I will spare you the gritty implementation details until next week after I’ve committed the code where my mouth is (?).

Of course my weekly predictions wouldn’t be complete without a task to fall back on if I happen to complete the aforementioned task in a Ballmer-Fueled rage. After upload is in place there is only one major item left: Syncing. I need to break “Syncing” into manageable actionables (quite a term, eh?) and then lay out some mid-level designs for the process. Later on during the week I will dedicate an entire post to this topic.

Life in the Cloud

March 23rd, 2008  |  Published in Technology

Internet technology is seeing an overall trend towards increased connectivity (always on), information sharing (openness), and most importantly, data existing in “the Cloud” (anywhere access). This is a fascinating prospect, because no one can tell what the results will be.

Exempli Gratia: The Amazon Kindle. At the core this device does something that many devices have done before, that is, it offers always on transparent connectivity, but it took this commonplace technology and applied it to an entirely different market.

Wait just a second — taking a technology to another market happens all the time, so why is this case special? Because the Kindle did not just take an existing technology. It took a technology and gave users access to the Cloud.

With the Kindle you have access to books, newspapers, blogs, Wikipedia, and the internet in general, all without connecting to a computer. You can buy books through the Kindle store and while they are sent to your device Amazon keeps a copy of everything you purchase (subscriptions, books, magazines) in the Cloud. Not only that but the Kindle automatically sends your notes, annotations, clippings, and bookmarks in the Cloud.

But this post isn’t supposed to be Kindle advertisement.

What the Kindle lacks is openness. Being wrapped in layers of DRM forces the Kindle into not sharing nicely with others. Openness will be crucial to life in the Cloud.

What is this Cloud thing anyway?

Many people are already accustomed to the idea of a global village facilitated through the internet. In fact, Herbert Marshall McLuhan used the term “global village” way back in his 1962 book The Gutenberg Galaxy: The Making of Typographic Man1. He discusses how the traditional space-time communication barriers between humans topple with the invention of an electronic mass media. This creates a world where there are virtually no limits, and people can exchange ideas, share knowledge, and provide services on an global scale. Sound familiar? The internet has enabled all of these feats, however so far there is a very physical limit to our interactions within this global village.

Playing off the village metaphor, this physical limit could be analogized as personal houses in the cyber-village. At your metaphorical house is everything important to you. You have

  • a closet full of email
  • stacks of MP3s and movies
  • filing cabinets full of documents from your first 9th grade paper
  • your finances
  • your latest business model

Not to mention the room dedicated to your photo albums and the basement/workshop with toolboxes containing:

  • word processors
  • media players
  • text editors
  • photo editing tools

In real life, of course, this house is your computer.
Rather, it is probably a couple of computers: at work, home, or in your pocket. The thought of losing your virtual house to any number of possible disasters (e.g., theft, crackers, disk corruption) is devastating. The dread is a consequence of the technology shift. An information technology shift from the analog to the digital, from physical to abstract. Technology is making another shift towards an age of truly ubiquitous information storage and retrieval.

  1. Courtesy of wikipedia The Gutenberg Galaxy []

Microsoft WPA Shenanigans

January 24th, 2007  |  Published in Technology

“If you think technology can solve your security problems, then you don’t understand the problems and you don’t understand the technology.” (Bruce Schneier)

From the Windows XP EULA:

1.1 Installation and use. You may install, use, access,
display and run one copy of the Software on a single
computer
, such as a workstation, terminal or other
device (“Workstation Computer”). The Software may not
be used by more than two (2) processors at any one
time on any single Workstation Computer. [Emphasis Added]

The Issue: If you have one legal installation of windows on a partition, and also have Linux, MacOS, or some other OS on another partition you can dualboot just fine. If you install VMware workstation on your other OS and configure it with raw disk access to read and boot from your one legal installation of windows on your one computer WPA detects the different hardware configurations and forces you to re activate. If you use different hardware profiles for virtual native boots.. you are still borked.

The White Elephant: Doesn’t this seem like a perfect opportunity for the use of Hardware profiles? Since you only have one installation with different hardware setups this should not break the EULA, or at least the part I quoted above. Since it is impossible to talk to a real life Microsoft technician or lawyer we are at the mercy of their poorly thought out WPA malware.

The Source: If you want to see firsthand the uncanny silence of a MS representative, and simultaneously the inane chatter of MS volunteers (I admit some of them were helpful/sympathetic) check out the posts on the MS forums dealing with this topic.