What is MuSeR?
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
-
NodeJS is an open-source server side runtime environment built on Chrome's V8 JavaScript engine. It provides an event driven, non-blocking (asynchronous) I/O and cross-platform runtime environment for building highly scalable server-side application using JavaScript.
-
serverless is a framework & toolkit that helps developers focus on the application architecture, functionalities and details and not on the infrastructure. It provides various useful mechanisms for deploying code in the Cloud provider services (e.g. AWS Lambda), Cloud authorization, testing and much more.
-
AWS (Amazon Web Services) is the Cloud product - IaaS - provided by Amazon featuring a huge set of services, technologies, storage solutions, logging and many others more. MuSeR mainly uses Lambda, Elastic Cloud Computing and API Gateway.
-
Ionic is the open-source mobile app development framework that makes it easy to build top quality native and progressive web apps with web technologies. Ionic is based on Angular and comes with many significant performance, usability, and feature improvements over the past versions.
-
Angular is a structural framework for dynamic web apps. It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly and succinctly. AngularJS's data binding and dependency injection eliminate much of the code you would otherwise have to write. And it all happens within the browser, making it an ideal partner with any server technology.
-
JWT (JSON Web Tokens) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object. This information can be verified and trusted because it is digitally signed. JWTs can be signed using a secret (with the HMAC algorithm) or a public/private key pair using RSA.
-
GraphDB is a highly-efficient and robust graph database - a semantic repository that stores and manipulates RDF data along with an inference engine that uses rules to infer new knowledge - and SPARQL support.
-
JSPF represents the JSON version of the XSPF (XML Shareable Playlist Format) and it is a next-generation playlist format for digital media (songs).
Architecture
'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 detailsSongService- the service that finds recordings and details about their creators and albums containing themAlbumService- the service that searches collections created by artists and that contain songsGenreService- the service that finds genres entitiesEventService- the service used to discover nearby events related to music
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.
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/jsonfor 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.
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.
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 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.
|
|
|
|
|---|---|---|
| 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) |
|
|
|
|
|---|---|---|
| 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) |
| 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 |
| 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 |
| 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 |
| 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 |
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
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