|
Mobile - Web - Media
Tuesday, Jan 10, 2006 11:58:25 AM
Web Service Mashup: Last.fm and Amazon.com
Hey, Happy New Years everyone! As usual, my wife and I had a mellow celebration - we aren't big partiers or go for the massive crowds, but we brought in the New Year with a toast of champagne and a kiss. Resolutions? No, sorry - I've never been one to create New Years resolutions. I can completely understand why people do, and that the new year psychologically helps people move forward - as if they are drawing from the concept of "starting over." Ideally, if you want to be a progressive person, and if you want to discover your true potential - you must entertain the idea of resolutions all year long. We are delicate machines needing little tweaks here and there - if you only get a goal realignment once a year, your wasting fuel, missing opportunities and not meeting your potential. Now onto the New Year... so, what's currently on my plate? My first attempt at a Web Mashup :) What's a Web Mashup? At a bare minimum, it's when you take two or more Web services and use them together to create something else or new. A Web Service could be thought of as a Web site's data and logic without the actual site. For example - you could go to a weather site and view the data as they present it on their site, or, you could connect to the weather site's Web services, and request the data you want, then display it on your site or in your application. If this is new to you, welcome to the Read/Write Web - the Programmable Web - Web 2.0 - etc. :) I have a few goals and plans for using Web Services, and since a few of those ideas pertain to Amazon.com, I started there. I'm going to talk about two projects below, so before I continue, I'll list the projects. - Similar Artists - My plan was to pass a genre name and return a selection of CDs/Artists associated to that genre, or allow people to search for commercial artists they know, and return a selection of related artists. This is for a potential project I'm working on where I'm looking to connect music fans to ArtistServer.com artists though the artists people already know and listen to. One of the hardest parts of getting listens as an independent artist, is being found - and one way to help people find these artists is by allowing them to select who they do know and like, and have that selection connect to ArtistServer and display similar artists. This is basically one of the foundations of learning - you take things you already know, you discover something, you mentally assoicate it to what you already know, then integrate the new knowledge or experience into your memory. This is currently just an experiment, but it may get launched as another 'satellite site' for ArtistServer. Possibly under the name GenreTree.com.
What is a "satellite site?" It's a site you create and manage that serves to transmit traffic to your central site. Ideally, a satellite site will have some value and not be spam/fluff - but it's main focus is to sit out there and function as an advertisement for your main business. I have no idea if this is a term currently in use, but I believe it to be a good strategy that you could apply to all kinds of sites.
- Music Banner Ads - This second project is where Last.fm comes in. Here I was looking to create a system where anyone who uses Last.fm could first join the Associate program at Amazon.com, then come to the site I have running and have the ability to generate dynamic music banner ads based on what they listen to. Last.fm already provides an excellent means to list your "top artists" and "recently listened songs" on your site, but it lacks the means to generate revenue. If you are going to advertise what you listen to, why not earn revenue from it? If you look at how Last.fm works, they have a page setup for every artist in their system, and if possible, they have the artist's CDs listed with amazon.com their Associate ID attached. So, if Last.fm can use your data to drive affiliate sales through Amazon, so should you!
I first connected into Amazon, and that was working great - so I clicked over to Last.fm and began working on consuming their XML feeds. Ten minutes into it, Last.fm went offline for the next 6-8hrs. Perfect timing eh? The next morning I dive into it again - Last.fm is back online and in a few hours, I finished the code to consume seven of their offered XML feeds (along with caching them locally for speed). I had already achieved the goal for the first project, the only thing I needed to do was adjust the formatting and build a site around the idea. The second project is where I ran into some trouble. The code was functioning just fine, the trouble was the results coming back from Amazon. In order to minimize the number of requests to Amazon (you are allowed 1 request per second per IP address) I was using their "TextStream" search and passing the artists or artists and albums as a string of text. It seems the searching functionality of Amazon's TextStream isn't as great as I was thinking it would be. The results it returned usually only found 1 out of 6 artists I would pass it. I tried passing them as a comma list, in quotes, as one text string, and while the results did vary - they never improved. As a check, I would visit Amazon and search for each item separately, and return results.
With the TextStream search being nearly useless, I've concluded that the only way I can reach the level of quality I'm expecting, is to search for each entry (artist or artist/album combo) individually. Unfortunately, that doesn't scale very well when done in real-time. The only way that would work is to distribute the requests to Amazon to the actual sites that will display the end results. I'm not sure that can work though, since the XML file needs to be saved (cached) so the banner ad can be built from it. Another method is obviously needed where I would store all the data locally on my server.
I'm now thinking that the only way to offer this as a service, would be to consume the users Last.fm XML files on a daily basis, then extract any new artists and store them in a database table. Then hit Amazon's Web services with that list, and return the results back to another table. With Amazon's data now cached on a daily basis, my application could then consume Last.fm Web services for a user, query the local database, then generate the music banner ad with their Associate ID. Then I'd need a scheduled task to run each day to harvest new artists from the Last.fm profiles of the users of this service, store the results, and repopulate the Amazon table based on the new collection of artists in the Last.fm table. With this solution, the application/service could scale and provide nearly perfect output for the banner ads. If Amazon's TextStream search was more rocking, I could launch the service in the next week, but since it retuns things like "Carole King" when I pass it "King Tubby," the service would suck, even if it was free - which it will be. Unfortunately, I'm not sure when I can dedicate the time to building a version that would store all the artists and albums from the users profiles, in addition to requesting and storing the data from Amazon. That's going to take a lot more time to develop and test. Bummer. But all is not lost :), my work this last weekend on Web services taught me more about the technologies being used, about the parsing of XML files, how to build a dynamic query from XML contents, how to consume and cache an external XML file, and I've started to understand the Amazon Web service platform. While I'm sad that I didn't succeed in launching the Music Banner Ad service, I am quite excited about the world of Web services and I'm sure that after I do some additional work with some other site's APIs, I'll become more motivated about the creation of ArtistServer.com's API - which is in the plans - but not until the end of the year. If you are interested in my Music Banner Ad idea, or if you have any ideas about it, please feel free to comment or send me an email to discuss.
amazon.com
API
Feeds
last.fm
REST
web services
xml
- ADD TO:
-
Blink
-
Del.icio.us
-
Digg
-
Furl
-
Google
-
Simpy
-
Spurl
-
Y! MyWeb
ArtistServer
Saturday, Jun 25, 2005 2:46:30 PM
ArtistServer - Stations, Playlists, Feeds and Tags Development of the stations/playlist tools: =========================== Development of the stations/playlist tools is nearing completion. Everything is basically done, but I want to go in and try to break it to make sure I have all the holes filled.
What are stations and playlists? =========================== You probably already know what a playlist is - but in terms of using and creating them on ArtistServer.com, we are about to step into an explosion of music distribution and discovery. Our stations will be created and managed by the artists and members on the site - you name it, give it an icon, and a description. Next - you create a playlist - you add songs, resort them, write notes/comments next to each song, assign an icon to your playlist, add tags (keywords)... click and listen. If you want to create another playlist - no problem - make as many as you like.
What about Podcasting/Audio Feeds? =========================== Each Station and Playlist will have a feed URL to subscribe to for both RSS feeds (For Podcasting) and XSPF (XML Sharable Playlist Format). BUT - not every song in a playlist will be served in these feeds - ONLY songs by artists with upgraded accounts will be tagged as 'PodCast compatible.' To make the process of creating playlists for Podcasting easy, the playlist builder tools allow you to filter out all songs that are not 'PodCast compatible.'
Currently, all artists who were previously paying members are available for Podcasting/Audio Feeds.
Current Development Status =========================== Right now I'm working on the pages that display the stations, playlists and provide a listing/search page for all playlists.
Once those are done, I'll modify the current .m3u generator on the site so it will generate streaming files from the playlists.
Then... I'll add in the RSS feeds with 'enclosures' - which is another way to say "Podcast" or "music feed" or "audio feed" - it's basically a way for people to 'subscribe' to your playlists.
Tags - the 'proper' way to categorize content =========================== If you have some time, read this: http://shirky.com/writings/ontology_overrated.html
We're going to start using 'tags' as a means of organizing content on the site. A tag is just a modern term for 'keyword' :) If you've used sites like http://www.technorati.com or http://del.icio.us or http://www.flickr.com - then you've probably seen how 'tags' work. If you dont' know what I'm talking about, go http://www.flickr.com/photos/tags/ - that's a 'tag cloud' - then read this: http://en.wikipedia.org/wiki/Tags
This doesn't mean 'genres' are going to be removed - not at all. It just means that we'll also have an alternate way of organizing and searching for content across the site.
Tags will most likely be applied to playlists first. After this, I hope to apply the newly developed 'tag manager'to Songs, Images, Artists, Articles, links, and all future content on the site. Then - maybe later down the road, you'll simiply define how 'you' want to consume ArtistServer.
For example... let's say you are a massage therapist, and you are always looking for music that is: "quite instrumental mellow." What you would do, is search on this - then add the generated feed URL to your feed program (like FeedDemon - or when Longhorn comes out, your feed reader will be embeded in Windows, or iPodder, etc.). Once you are subscribing to the feed, your software will download any songs that are tagged with these keywords.
Another example... let's say you want to be aware of Hip Hop in New York. No problem - you would search on, "New York Hip Hop" - then save the link to your feed reader - and there you go.
Yes - the future will be served to you in feeds. :)
ArtistServer
Feeds
Playlists
Stations
Tags
web
- ADD TO:
-
Blink
-
Del.icio.us
-
Digg
-
Furl
-
Google
-
Simpy
-
Spurl
-
Y! MyWeb
|
 |