Import jQuery

Chavah – Now With Thumb Ups

Chavah, the no-nonsense, frictionless Messianic music player, has been overloaded with some very cool new features in the last week. The biggest of which is the new “thumb up/down” functionality:

ChavahLike

Notice the “thumb up” and “thumb down” button beneath each song:

  • Thumb up a song, and Chavah will play more of that kind of music.
  • Thumb down a song, and Chavah will refrain from playing that song (or at least, won’t play it as much).

And of course, Chavah will remember your thumb ups forever – you can close it, open it later, and Chavah knows who you are, no sign-up/sign-in required.

Nerd Notes

(Here be technical dragons…)

The Chavah backend – the web service, the communication mechanism, the database – has all been scrapped and replaced with newer and better.

When I started Chavah, thinking it would be a tiny service mostly for myself, I just stored data in text files on the server. But Chavah has outgrown her crib, and it was high time to use a real database, especially in the face of new features like thumb up.

Database: SQLite

I moved all data out of text files and into a database. I used a self-contained, lightweight database called SQLite. After some initial issues getting the web service to be able to write to this database, things went smoothly. I did lose some data related to the number of tunes served, but it was negligible.

Object/relational mapping (ORM)

I don’t know about you, but I absolutely despise writing SQL code by hand. Nobody does that crap anymore. I had no idea what ORM options were available for SQLite. Seeing as how this is .NET software, I found the System.Data.SQLite provider for .NET. That was a start.

I stumbled on some old, abandoned ORMs for SQLite. They didn’t really work. It occurred to me that .NET 3’s new Entity Framework ORM tools might work. Sure enough, Entity Framework works just fine on SQLite databases.

EF spits out ORM code, and I’m a happy camper.

Web service

Originally developed as a .NET 2 ASP.NET web service, but was limited – I couldn’t pass back .NET objects from my web service to the Silverlight Chavah player. That sucked hugely. I created a new .NET 3 WCF web service, and voila, the magic started happening, I could pass back most anything I liked, and Silverlight picked it up no problem.

Release notes

The “does this user like this song/genre” logic is still in its infancy. Give it a little time to get smart, and pardon the occasional play of a song you dislike.

Hope you all enjoy the brand-spankin’ new Chavah bits. :-)

9 comments:

  1. Looks like I would have to install Silverlight to enjoy Chavah. Have you had any problems with Silverlight so far?

    I'm running Vista and use Google chrome for a browser. Does it work OK with that?

    Thanks

    ReplyDelete
  2. Let me guess. It only works on Windows, right?

    ReplyDelete
  3. Oh, I'm ashamed of you both, having never tried the magnificent service that is Chavah Music. :-)

    Seriously, give it a try. It works on Mac and Windows, whether you're running IE, Firefox, Chrome, Safari ... it's cross platform in a big way.

    Try it, you'll like it! Stream some Messiah tunes now. :-)

    ReplyDelete
  4. Oh, and the install is a 1-time thing. Takes about 10 seconds, and you're home free. Give it a spin, I'd like to hear your thoughts.

    ReplyDelete
  5. It should work on Linux, too, via Moonlight.

    :-)

    Now, will ya try it already, boy? :-)

    ReplyDelete
  6. Works fine. I like it. When we get our songs recorded I'll ask how to upload them.

    Nice job there youngster.

    ReplyDelete
  7. Glad to hear it works well for ya!

    Yeah, absolutely, I am always on the lookout for good Messianic music. Send it along!

    ReplyDelete
  8. When I get a chance. I was a zombie yesterday due to lack of sleep. I must have been snoring, cuz the missus retreated to the spare bedroom. Got the sleep I needed, though. My brain is back (everyone's snide comments aside, of course). :)

    ReplyDelete

Appending "You might like" to each post.