Music Smart Enhancer

MuSeR

What is MuSeR?

  1. Alexandru - Gabriel Cristea
  2. Dan - Stefan Cehan
  3. Lila - Ciprian Lazar
  4. Silviu - Cristian Lupu
  1. Faculty of Computer Science

Abstract

MuSeR (Music Smart Enhancer) is a cross-platform application developed for music lovers that intend to have a centralized point of playlists management. The underlying mechanisms of the application are smartly interconnecting the entities (Artists, Songs, Albums etc.) using the principles of semantic Web.

Users will be able to import and export playlists, find artists, songs, albums and also nearby events. By using modern Web technologies, MuSeR can suggest entities and offer 'smart' playlist recommendations based on 'search keywords', already added songs in the personal playlists and based on historical data.

Technologies

Architecture

The general architecture of Music Smart Enhancer

'serverless'-side

'serverless' states that the functionalities of the application should not depend on any server entity and they should run unknowingly 'anywhere' (e.g. cloud). The Node module 'serverless' toolkit helps us describe and deploy the mechanisms of our application in the AWS Lambda, the cloud service used to 'host' the main workhorses.

Microservices architectural style represents a distinctive method of conceiving software systems. Each functionality or service is independent, deployable, small and modular, meaning that each one is as decoupled as possible from another. Combining this concept with the 'serverless' concept, each microservice in our application runs in a separate AWS Lambda unified by a central API Gateway. This one respects the REST API concepts and it will expose different paths for each microservice:

  • PlaylistService - the main, most important service of MuSeR; it will provide 'C.R.U.D.' operations for playlists and the data will be fetched by executing calls to other services (described below)

  • ArtistService - the service used to fetch information about artists, their records, biography and other details

  • SongService - the service that finds recordings and details about their creators and albums containing them

  • AlbumService - the service that searches collections created by artists and that contain songs

  • GenreService - the service that finds genres entities

  • EventService - the service used to discover nearby events related to music

An OpenAPI specification has been developed that describes the API paths and behaviour as you can see here: MuSeR Swaggerhub - OpenAPI. Each microservice interrogates RDF datasources - WikiData and DBPedia - and also the Spotify service to find information, entities and relationships between entities and stores them into MuSeR's RDF storage implemented with GraphDB.

Authentication component relies on the JSON Web Token technology that is used by an 'authorizer' represented by an AWS Lambda function. Each call of the REST API exposed by MuSeR requires the auth token and the access is forbidden if it is invalid or missing.

Client-side

The User Interface of the application will be created with the help of - maybe - the most popular cross-platform 'web-technologies' framework: Ionic, a fully fledged framework having Angular as the foundation client-side framework and Cordova as the main development environment which supports mobile devices and plugins for a whole suite of services and features.

Home View is the starting view of the application and it provides a list of the most popular songs 'Made for you'. The user is also able to browse genres and the top charts for each one them
Genre View will show the most popular songs for the respective genre and a timeline with notable events
Discover View is the main way of finding artists, songs, albums; the user can specify what kind of entity to look for and the results will be displayed in a paginated list below
Artist View contains the biography of the respective artist (or band) and the most popular songs recorded by him (them); the application will also suggest artists featured on the main artist's songs, the last release albums and also events that the artist will attend to
Album View shows information about the record and the list of songs contained by it; it will also suggest other albums from the same artist
Song Page exposes available links to Spotify / YouTube that the user can access to listen to the song; it can be also added to a personal list
Library Page can be used to manage the personal playlists (import, export, edit); an interesting feature of this view is the 'smart playlist' generation that can be done via user-typed keywords, historical data or entities contained by other playlists

Design Details

  • Being a 'microservices-serverless-oriented' application, each functionality will dwell into a AWS Lambda. Each of it will interrogate different datasources upon the search request of an entity. After the result will be returned successfully, the entity instance will be saved in the MuSeR's RDF storage and interlinked with other entities.

  • The user must register and generate a JWT before using the REST API exposed by MuSeR. Every subsequent call of the API will require the token.

  • The 'preferred' data transfer MIME type of MuSeR is application/json for the ease of use and the nice integration with Javascript and NodeJS.

  • Each instance's view for an entity type (e.g. an Artist or a Song) will smartly suggest other instances of the same entity type taking into consideration different aspects related to it: genre, time period, preferences etc.

  • Playlists can be accessed via a SPARQL endpoint that will provide a way of accessing the data from the RDF Storage (GraphDB). They can also be imported into / exported from MuSeR under the JSPF format.

Sequence Diagram: Get Artist

The above shown sequence diagram presents the workflow of retrieving information about an artist. First, the authorizer validates the token received from the client and if the validation is successful, a lambda function will be triggered. The function will retrieve the information from the RDF datasource, based on the id that was received with the request. Otherwise, if the token validation fails, the request will be denied.

Sequence Diagram: Generate 'smart' playlist

Our second sequence diagram shows the actions that will be performed to generate a 'smart' playlist. First, a token validation is executed and if it is successful, the playlist will be generated base on the options that have been selected by the user. This action is being performed by a specialized lambda function. The client will be able to generate 'smart' playlist based on: keywords, history and owned playlists. Otherwise, if the token validation fails, the request will be denied.

Data Modelling

The diagram representing the RDF graph - Music Ontology

The MuSeR's main storage is the RDF solution GraphDB. Every entity is saved in the graph (see the diagram above) by interconnecting the relationship with other entities and properties.

In the tables below we describe each entities' properties.

By using the ontology / RDF concepts, MuSeR is able to suggest smartly entities based on the relationships between instances. For example, upon creating a 'smart' playlist, the underlying mechanisms use other playlists created, stored and interlinked from the RDF storage to suggest similar songs / artists, based on the keywords provided by the user and also on the historical search data.

Playlist
Property
Type
Description
id UUID the unique UUID of the playlist
title string the title of the playlist
songs array [Song] the list of songs
date_created date the creation date of the playlist
creator string the creator of the playlist
duration int the total duration of the playlist (sum of duration of all the songs)
The list of properties of the Playlist entity along with their data types.
Artist
Property
Type
Description
id UUID the unique UUID of the playlist
id_wikidata string the unique ID from Wikidata
id_dbpedia string the unique ID from DBPedia
id_spotify string the unique ID from Spotify
about string description of the artist (band)
name string the artist's (band's) full name
genres array [Genre] the list of genres representing the artist's (band's) style
members array [Artist] array of Artist members - composite relationship
country string the origin country of the artist (band)
songs array [Song] the list of songs recorded by artist (band)
inception_date date the inception date of the artist (band)
retiring_date date the retiring date of the artist (band)
The list of properties of the Artist entity along with their data types.
Song
Property
Type
Description
id UUID the unique UUID of the song
id_wikidata string the unique ID from Wikidata
id_dbpedia string the unique ID from DBPedia
id_spotify string the unique ID from Spotify
artists array [Artist] the list of artists
title string the title of the song
duration int the duration of the song
genre Genre the genre of the song
album Album the album that features the song
The list of properties of the Song entity along with their data types.
Album
Property
Type
Description
id UUID the unique UUID of the song
id_wikidata string the unique ID from Wikidata
id_dbpedia string the unique ID from DBPedia
id_spotify string the unique ID from Spotify
title string the title of the album
artists array [Artist] the list of artists
year date the year of album release
songs array [Song] the list of songs
duration int the duration of the album
genres array [Genre] the genres of the album
The list of properties of the Album entity along with their data types.
Genre
Property
Type
Description
id UUID the unique UUID of the song
id_wikidata string the unique ID from Wikidata
id_dbpedia string the unique ID from DBPedia
id_spotify string the unique ID from Spotify
name string the name of the Genre
related array [Genre] the list of genres related
The list of properties of the Genre entity along with their data types.
Event
Property
Type
Description
id UUID the unique UUID of the song
title string the title of the event
start_date date the start date of the event
end_date date the end date of the event
country string the country where the event is held
city string the city where the event is held
place string the place where the event is held
about string description of the event
artists array [Artist] the list of artists that attend the event
The list of properties of the Event entity along with their data types.

Tables Users and History will be created too using the AWS DynamoDB. They will store information about the registered persons and the historical search data for each individual.

Use-Cases

Use-Case diagram

As we can observe in the diagram shown above, all of the MuSeR's features require the authentication of the user. The user can import playlist or visualize the already created playlists. During the visualization, users will be able to export them, edit them or display them as smartly generated graphs based on the RDF relationships.

Another aspect of the application that can be observed in the diagram is the content finding mechanism. Users - for example - can find artists based on keywords specified by them. After finding the desired entity, he can select and add a specific song played by the respective artist into a personal playlist.

Aside from this, the application will recommend other artists based on 'featurings' of the visualized artist or based personal preferences of the user. All the required data fetching implies the interogation of the datasources and saving it into the MuSeR's own storage.

Conclusion & Future considerations

MuSeR has been created to ease up the management of playlists for music enthusiasts by providing an intuitive platform that uses semantic Web concepts to enhance the way of visualizing the relationships between various entities in the context of musical domain. The application can be extended and improved in different ways by conceiving new mechanisms and architectural ideas.

References

NodeJS, 2017
NodeJS , by Joyent, Inc.
Ionic Framework, 2017
Ionic , by Drifty Co.
Angular Framework, 2017
Angular , by Google
serverless, 2017
serverless , by The Serverless Team
Amazon Web Services, 2017
AWS , by Amazon
GraphDB, 2017
GraphDB , by Ontotext
JSON Web Tokens, 2017
JWT , by Auth0
JSON Shareable Playlist Format, 2007
JSPF , by Xiph.Org
SwaggerHub - OpenAPI, 2017
SwaggerHub , by SmartBear Software