This is a rather broad question and not code-specific. I am looking for opinions that people who know how to implement this requirement

I am building a music application where people can queue music objects. A music object looks like

url: name: views:

A user can queue this song for playing by clicking on the list. At this time I want to build a queue of music objects which then start playing. A very similar example is what grooveshark does:

I pretty much want to implement the same which has following capabilities

Ability to persist queue even when browser is closed

Ability to retrieve any queue if exists

Ability to shuffle, force order on the objects in the queue to play

I am very new to this so have no idea where to store such data. Please help me understand what is that I need to learn to implement this.