SlideShare a Scribd company logo
1 of 26
SpotifyX:
A Framework for the family of applications like Spotify
By: Morteza Zakeri and Arman Sanahmadi
Software Architectures Course
Instructor: Dr. Mehrdad Ashtiani
Iran University of Science and Technology
School of Computer Engineering
Fall 2018
20
Agenda
• Introduction
• Feature list
• Architectural Blueprints
• Physical view (Deployment diagram)
• Development view (Component diagram)
• Logical view (Class diagram)
• References
October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 2
20
Spotify: Music for everyone!
October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 3
Introduction Features
Architectural
Blueprints
Physical view
Development
view
Logical view
20
Spotify: Features
October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 4
Introduction Features
Architectural
Blueprints
Physical view
Development
view
Logical view
Profile
Search
Streaming
Payment
Friendship
Advertisement
Playlist
Recommendation
20
Features list
1. Streaming
2. Search
3. Recommendation
4. Playlist
5. Friendship and Following
6. User management (Profile)
• Signup
• Login
• Logout
• Profile info
7. Payment
• Premium account
October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 5
Introduction Features
Architectural
Blueprints
Physical view
Development
view
Logical view
20
Three main feature
Is it part of the essence
of the system?
What the “heck”
does it mean?
How the “heck”
do I do it?
Streaming Yes
Search Yes
Recommendation No
Playlist No
Friendship and Following No
User management (Profile) Yes
Payment Yes
October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 6
Introduction Features
Architectural
Blueprints
Physical view
Development
view
Logical view
20
4+1 architectural view model
October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 7
Philippe Kruchten, 1995
Introduction Features
Architectural
Blueprints
Physical view
Development
view
Logical view
20
Physical view (Deployment diagram)
October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 8
Introduction Features
Architectural
Blueprints
Physical view
Development
view
Logical view
Client
...
API Gateway
Request
DMZ 1 (Microservices)
Media
Streaming
Media
Search
Microservice Microservice
Media
Recommend
Microservice
Media
Storage
Management
(HDFS)
DMZ 2 (Other Services)
Authentication Profile
Data Provider
...
Business Logic Layer
KubernetesConsul
Low-level Back-end (Third Parties)
Configurations (Git Repository)
Neo4j
Cassandra
Data Model Layer
Response
Firewall
Clients
Servers
Friendship and
Follower
20
Development view (Component diagram)
October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 9
Introduction Features
Architectural
Blueprints
Physical view
Development
view
Logical view
<<component>>
MediaSerach
<<component>>
APIGateway
<<component>>
Client
<<component>>
CassandraDriver
<<component>>
HDFSDriver
<<component>>
MediaStreaming
<<component>>
MediaRecomendation
<<component>>
SearchEngine
<<component>>
Model
<<component>>
Autentication
<<component>>
FreindshipAndFollower
<<component>>
Profile
<<component>>
Neo4jDriver
20
Logical view (Class diagram)
By Arman Sanahmadi
• Today:
1. Media streaming microservice
2. Media search microservice
3. Media recommendation
microservice
• Next Presentation:
4. Profile
5. Payment
6. Playlist
7. Friendship
October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 10
Introduction Features
Architectural
Blueprints
Physical view
Development
view
Logical view
20
Development view (Component diagram)
October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 11
Introduction Features
Architectural
Blueprints
Physical view
Development
view
Logical view
<<component>>
MediaSerach
<<component>>
APIGateway
<<component>>
Client
<<component>>
CassandraDriver
<<component>>
HDFSDriver
<<component>>
MediaStreaming
<<component>>
MediaRecomendation
<<component>>
SearchEngine
<<component>>
Model
<<component>>
Autentication
<<component>>
FreindshipAndFollower
<<component>>
Profile
<<component>>
Neo4jDriver
20
Media streaming microservice
October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 12
Introduction Features
Architectural
Blueprints
Physical view
Development
view
Logical view
<<Abstract>>
ServiceAPI
-baseURL: string
+ServiceAPI(): void
-conn : ServiceConnection
+setBaseURL(string) : void
-initializer(): ServiceConnetion
+geyBaseURL(): string
#requestHandler(IRequest req): IResponse
ServiceConnection
- socket : Socket
+ServiceConnection() : void
+CreateService(string) : void
#requestSerializer(IRequest) : byte[]
#sendRequest(bbyte []) : byte[]
#responseParser(byte[]) : IResponse
StreamMusicAPI
+streamMusic() : IResponse
+pause() : IResponse
+stop() : IResponse
StreamSetting
-qulity: Quality
-id : string<<Interface>>
IAudioStreaming
startStreaming(Stream Setting) : byte[]
pauseStreaming() : void
StreamHQ
startStreaming(String address) : byte[]
+pauseStreaming() : void
StreamLQ
startStreaming(String address) : byte[]
+pauseStreaming() : void
SteamMQ
startStreaming(String address) : byte[]
+pauseStreaming() : void
<<Interface>>
IResponse
+getResponseContent() : byte[]
+setResponseContent(byte [] ) : void
<<Interface>>
IRequest
+getRequestContent() : byte[]
+setRequestContent (byte[]) : void
StreamResponse
+getBuffer() : byte[]
+getProgress() : int
+resume() : boolean
+pause() : boolean
+getChannel() : Channel
StreamRequest
+getchannel() : Channel
+setChannel(Channel) : void
+setChannel(Channel) : void
-address : string
getQuality() : enum
-AudioStreaming
setAddress(string) : void
+setQuality(enum) : void
+getAddress() : string
+getID() : string
+setID(string) : void
<<Enumeration>>
Quality
+High
+Medium
+Low
DBHandler
+getConnection() : Connection
20
Media search microservice
October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 13
Introduction Features
Architectural
Blueprints
Physical view
Development
view
Logical view
<<Abstract>>
HttpServlet
-baseURL: string
+ServiceAPI(): void
-conn : ServiceConnection
+setBaseURL(string) : void
-initializer(): ServiceConnetion
+geyBaseURL(): string
ServiceConnection
- socket : Socket
+ServiceConnection() : void
+CreateService(string) : void
#requestSerializer(IRequest) : byte[]
#sendRequest(bbyte []) : byte[]
#responseParser(byte[]) : IResponse
SearchAPI
+search(iReq: IRequest, iRes: IResponse): void
+getUserHistory(iReq: IRequest, iRes: IResponse): void
SearchEngine
-resultList: List<SearchResult>
<<Interface>>
IResponse
+getResponseContent() : byte[]
+setResponseContent(byte [] ) : void
<<Interface>>
IRequest
+getRequestContent() : byte[]
+setRequestContent (byte[]) : void
RESTResponse
+getResponseBody():JSONParser
+getResponseCode() : int
+getResponseContent(): byte[]
+getHeaders() : Headers[]
RESTRequest
+getHeaders() : Headers[]
+getRequestContent(): byte[]
-saveHistory(): void
+find(tag: string, userID: string): List<SearchResult>
+retrieveHistory(userID: string): List<SearchResult>
SearchResult
-id: string
-name: string
-type: Type
1
*
+getRequestBody():JSONParser
+setRequestBody(body: JSONParser):void
+setRequestContent(content: byte[]): void
+setHeaders(headers: Headers[]) : void+setResponseBody(body: JSONParser):void
+setHeaders(headers: Headers[]) : void
+setResponseContent(content: byte[]): void
+setResponseCode(code: int): void
+seters and getters()
DBHandler
+getConnection() : Connection
#processRequest(iReq: IRequest, iRes: IResponse): void
<<Enumeration>>
Type
+type1
+type2
+type3
20
Media recommendation microservice
October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 14
Introduction Features
Architectural
Blueprints
Physical view
Development
view
Logical view
<<Abstract>>
HttpServlet
-baseURL: string
+ServiceAPI(): void
-conn: ServiceConnection
+setBaseURL(s: string) : void
-initializer(): ServiceConnetion
+geyBaseURL(): string
ServiceConnection
- socket : Socket
+ServiceConnection(): void
+CreateService(s: string): void
#requestSerializer(iReq: IRequest): byte[]
#sendRequest(b: byte []): byte[]
#responseParser(b: byte[]): IResponse
RecommendationAPI
+findRecom(iReq: IRequest, iRes: IResponse): void
<<Inteface>>
RecommendationAlgorithm
+produceRecommendation(userID: String): List<SearchResult>
Algorithm1 Algorithm2 Algorithm3
<<Interface>>
IResponse
+getResponseContent() : byte[]
+setResponseContent(b: byte []) : void
<<Interface>>
IRequest
+getRequestContent() : byte[]
+setRequestContent (b: byte[]) : void
RESTResponse
+getResponseBody():JSONParser
+getResponseCode() : int
+getResponseContent(): byte[]
+getHeaders() : Headers[]
RESTRequest
+getHeaders() : Headers[]
+getRequestContent(): byte[]
+getRequestBody():JSONParser
+setRequestBody(body: JSONParser):void
+setRequestContent(content: byte[]): void
+setHeaders(headers: Headers[]) : void+setResponseBody(body: JSONParser):void
+setHeaders(headers: Headers[]) : void
+setResponseContent(content: byte[]): void
+setResponseCode(code: int): void
+ProduceRecommendation(userID: String):List<SearchResult> +ProduceRecommendation(userID: String): List<SearchResult>
+getHistory(userID: String): List<SearchResult>
SearchResult
-id: string
-name: string
-type: Type
+seters and getters()
-results : List<searchResult> -results : List<searchResult> -results : List<searchResult>
+getHistory(userID: String): List<SearchResult> +getHistory(userID: String):List<SearchResult> +getHistory(userID: String): List<SearchResult>
<<Enumeration>>
Type
+type1
+type2
+type3
DBHandler
+getConnection(): Connection
+ProduceRecommendation(userID: String): List<SearchResult>
#processRequest(iReq: IRequest, iRes: IResponse): void
-recomAlg: RecommendationAlgorithm
20
Model
October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 15
Introduction Features
Architectural
Blueprints
Physical view
Development
view
Logical view
User
-username: String
-password: String
-email: String
-isPremium: Boolean
-playlists: List<Playlist>
-friends:List<User>
-following: List<Artist>
Artist
-biography : String
-albums: List<Album>
-followers: List<User>
+seters(args-to-set): void
+getters(): Property
+seters(args-to-set): void
+getters(): Property
<<Interface>><<Interface>>
IModel
+toJSON(): String
+fromJSON(s: String): void
Album
-id: long
-title: String
-publishDate: Date
-tracks: List<Music>
-description: String
+seters(args-to-set): void
+getters(): Property
-artist:Artist
Music
-id: long
-title: String
-publishDate: Date
-geners: List<Gener>
-isSingleTrack: boolean
-lyric: Map<Date, String>
+seters(args-to-set): void
+getters(): Property
-artist:Artist
Playlist
-id: long
-title: String
-createDate: Date
-tracks: List<Music>
-description: String
+seters(args-to-set): void
+getters(): Property
-length: double
-rate: int
<<Enumeration>>
Gener
+Pop
+Rock
+Rap
+...
-firstName : String
-lastName: String
-photo: Picture
-firstName : String
-lastName: String
-aliasName: String
-photo: Picture
-id: long -id: long
1
*
m
n
1
*
1
*
1
*
1 *
DBHandler
+getConnection(): Connection+save():void
+read(query: String):IModel
20
Accounting
October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 16
Introduction Features
Architectural
Blueprints
Physical view
Development
view
Logical view
Transaction
-status : TransactionStatus
+getStatus():TransactionStatus
-date: Date
-amount: float
-setStatus(): transactionStatus
+commit(): bool
+rollback(): bool
+getDate(): date
+getAmount(): float
+setAmount(float f): void
+setDate(Date d): void
<<Enumeration>>
TransactionStatus
+Done
+Pending
+Failed
Premium
-offers: List<Offer>
+buyPremium(offer): Transaction
-transaction: Transaction
+getExpireDate(): Date
+getTransaction(): Transaction
1
*
Account
-user: User
+doLogin(): session
-permium: Premium
-session: Session
+doLogout(session): void
+getAccountType(): Premium
+getSession(): Session
<<Interface>>
ILogin
+doLogin(Stringuser,Stringpass):Session
-checkUserExist(String username):boolean
GoogleLogin
+doLogin(Stringuser,Stringpass):Session
-checkUserExist(String username):boolean
SpotifyLogin
-checkUserExist(username: String):boolean
+doLogin(username: String, password:
String):Session
Session
-sessionID: String
getinstance(): Session
-user: User
-LoginType LoginType
Offer
-id
+setterAndGetters()
-duration: int
-price: double
-discount double
-memberName
1
*
+doSignUp(): Session
<<Interface>><<Interface>>
IModel
+toJSON(): String
+fromJSON(s: String)
+save():void
+read(id: String):IModel
DBHandler
+getConnection(): Connection
<<Enumeration>>
LoginType
+google
+spotify
getinstance(User u): Session
20
High-level services (Logic)
October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 17
Introduction Features
Architectural
Blueprints
Physical view
Development
view
Logical view
<<Abstract>>
HttpServlet
-baseURL: string
+ServiceAPI(): void
-conn: ServiceConnection
+setBaseURL(s: string) : void
-initializer(): ServiceConnetion
+geyBaseURL(): string
ServiceConnection
- socket : Socket
+ServiceConnection(): void
+CreateService(s: string): void
#requestSerializer(iReq: IRequest): byte[]
#sendRequest(b: byte []): byte[]
#responseParser(b: byte[]): IResponse
AuthenticationAPI
+Login(iReq: IRequest, iRes: IResponse): void
<<Interface>>
IResponse
+getResponseContent() : byte[]
+setResponseContent(b: byte []) : void
<<Interface>>
IRequest
+getRequestContent() : byte[]
+setRequestContent (b: byte[]) : void
RESTResponse
+getResponseBody():JSONParser
+getResponseCode() : int
+getResponseContent(): byte[]
+getHeaders() : Headers[]
RESTRequest
+getHeaders() : Headers[]
+getRequestContent(): byte[]
+getRequestBody():JSONParser
+setRequestBody(body: JSONParser):void
+setRequestContent(content: byte[]): void
+setHeaders(headers: Headers[]) : void+setResponseBody(body: JSONParser):void
+setHeaders(headers: Headers[]) : void
+setResponseContent(content: byte[]): void
+setResponseCode(code: int): void
+Logout(iReq: IRequest, iRes: IResponse): void
+signup(iReq: IRequest, iRes: IResponse): void
ProfileManagerAPI
+CreatePlayList(iReq: IRequest, iRes: IResponse): void
+DeletePlayList(iReq: IRequest, iRes: IResponse): void
+RemoveMusicfromPlaylist(iReq: IRequest, iRes: IResponse): void
+AddMusicToPlaylist(iReq: IRequest, iRes: IResponse): void
+EditPlayList(iReq: IRequest, iRes: IResponse): void
+BuyPremium(iReq: IRequest, iRes: IResponse): void
+GetPlayLists(iReq: IRequest, iRes: IResponse): void
FriendshipAndFollowerAPI
+addFriend(iReq: IRequest, iRes: IResponse): void
+removeFriend(iReq: IRequest, iRes: IResponse): void
+addFollower(iReq: IRequest, iRes: IResponse): void
+removeFollower(iReq: IRequest, iRes: IResponse): void
+checkIsPremium(iReq: IRequest, iRes: IResponse): void
20
Demo Code (in Java)
October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 18
Service model
Introduction Features
Architectural
Blueprints
Physical view
Development
view
Logical view
20
References
[1] P. Kruchten, “The 4+1 view model of architecture,” IEEE Software., vol. 12,
no. 6, pp. 42–50, Nov. 1995.
[2] Spotify Labs., “architecture,” 2018. [Online]. Available:
https://labs.spotify.com/tag/architecture/. [Accessed: 20-Dec-2018].
 [3] B.D. McLaughlin, G. Pollice, and D. West, Head first object-oriented analysis
and design, O’Reilly Media, 2007.
 [4] Visual Paradigm, “What is unified modeling language (UML)?,” Visual
Paradigm, 2018. [Online]. Available: https://www.visual-
paradigm.com/guide/uml-unified-modeling-language/what-is-uml/. [Accessed:
26-Dec-2018].
October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 19
20
4+1 architectural view model
October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures +1
Philippe Kruchten, 1995
Backup slides
20
Process view (Activity diagram)
• To be added
October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures +2
Backup slides
20
Scenarios (Use cases)
• Demo code
• Code template (demonstrated by test scenarios)
• By Arman Sanahmadi
• Using Postman to develop
• APIs
October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures +3
Backup slides
20
Technologies we used
• And some other libraries,
packages and tools
Backup slides
October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures +4
20
UML diagrams we used
October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures +6
Backup slides
20
UML diagrams we used
October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures +5
Backup slides

More Related Content

What's hot

Streaming Trend Discovery: Real-Time Discovery in a Sea of Events with Scott ...
Streaming Trend Discovery: Real-Time Discovery in a Sea of Events with Scott ...Streaming Trend Discovery: Real-Time Discovery in a Sea of Events with Scott ...
Streaming Trend Discovery: Real-Time Discovery in a Sea of Events with Scott ...
Databricks
 
Apache spark-the-definitive-guide-excerpts-r1
Apache spark-the-definitive-guide-excerpts-r1Apache spark-the-definitive-guide-excerpts-r1
Apache spark-the-definitive-guide-excerpts-r1
AjayRawat971036
 

What's hot (20)

Streaming Trend Discovery: Real-Time Discovery in a Sea of Events with Scott ...
Streaming Trend Discovery: Real-Time Discovery in a Sea of Events with Scott ...Streaming Trend Discovery: Real-Time Discovery in a Sea of Events with Scott ...
Streaming Trend Discovery: Real-Time Discovery in a Sea of Events with Scott ...
 
A Data Lake and a Data Lab to Optimize Operations and Safety within a nuclear...
A Data Lake and a Data Lab to Optimize Operations and Safety within a nuclear...A Data Lake and a Data Lab to Optimize Operations and Safety within a nuclear...
A Data Lake and a Data Lab to Optimize Operations and Safety within a nuclear...
 
Simplifying Big Data Applications with Apache Spark 2.0
Simplifying Big Data Applications with Apache Spark 2.0Simplifying Big Data Applications with Apache Spark 2.0
Simplifying Big Data Applications with Apache Spark 2.0
 
Exploring Titan and Spark GraphX for Analyzing Time-Varying Electrical Networks
Exploring Titan and Spark GraphX for Analyzing Time-Varying Electrical Networks Exploring Titan and Spark GraphX for Analyzing Time-Varying Electrical Networks
Exploring Titan and Spark GraphX for Analyzing Time-Varying Electrical Networks
 
What to Expect for Big Data and Apache Spark in 2017
What to Expect for Big Data and Apache Spark in 2017 What to Expect for Big Data and Apache Spark in 2017
What to Expect for Big Data and Apache Spark in 2017
 
Spark Summit EU talk by Kaarthik Sivashanmugam
Spark Summit EU talk by Kaarthik SivashanmugamSpark Summit EU talk by Kaarthik Sivashanmugam
Spark Summit EU talk by Kaarthik Sivashanmugam
 
A Deep Dive into Query Execution Engine of Spark SQL
A Deep Dive into Query Execution Engine of Spark SQLA Deep Dive into Query Execution Engine of Spark SQL
A Deep Dive into Query Execution Engine of Spark SQL
 
Bringing an AI Ecosystem to the Domain Expert and Enterprise AI Developer wit...
Bringing an AI Ecosystem to the Domain Expert and Enterprise AI Developer wit...Bringing an AI Ecosystem to the Domain Expert and Enterprise AI Developer wit...
Bringing an AI Ecosystem to the Domain Expert and Enterprise AI Developer wit...
 
Apache Arrow at DataEngConf Barcelona 2018
Apache Arrow at DataEngConf Barcelona 2018Apache Arrow at DataEngConf Barcelona 2018
Apache Arrow at DataEngConf Barcelona 2018
 
Sa introduction to big data pipelining with cassandra &amp; spark west mins...
Sa introduction to big data pipelining with cassandra &amp; spark   west mins...Sa introduction to big data pipelining with cassandra &amp; spark   west mins...
Sa introduction to big data pipelining with cassandra &amp; spark west mins...
 
Introduction to Apache Spark
Introduction to Apache SparkIntroduction to Apache Spark
Introduction to Apache Spark
 
New Features in Neo4j 3.4 / 3.3 - Graph Algorithms, Spatial, Date-Time & Visu...
New Features in Neo4j 3.4 / 3.3 - Graph Algorithms, Spatial, Date-Time & Visu...New Features in Neo4j 3.4 / 3.3 - Graph Algorithms, Spatial, Date-Time & Visu...
New Features in Neo4j 3.4 / 3.3 - Graph Algorithms, Spatial, Date-Time & Visu...
 
2016 Spark Summit East Keynote: Matei Zaharia
2016 Spark Summit East Keynote: Matei Zaharia2016 Spark Summit East Keynote: Matei Zaharia
2016 Spark Summit East Keynote: Matei Zaharia
 
Graph Analytics in Spark
Graph Analytics in SparkGraph Analytics in Spark
Graph Analytics in Spark
 
Webinar: Fusion for Data Science
Webinar: Fusion for Data ScienceWebinar: Fusion for Data Science
Webinar: Fusion for Data Science
 
Spark Summit EU talk by Emlyn Whittick
Spark Summit EU talk by Emlyn WhittickSpark Summit EU talk by Emlyn Whittick
Spark Summit EU talk by Emlyn Whittick
 
Neo4j Morpheus: Interweaving Table and Graph Data with SQL and Cypher in Apac...
Neo4j Morpheus: Interweaving Table and Graph Data with SQL and Cypher in Apac...Neo4j Morpheus: Interweaving Table and Graph Data with SQL and Cypher in Apac...
Neo4j Morpheus: Interweaving Table and Graph Data with SQL and Cypher in Apac...
 
Real-Time Log Analysis with Apache Mesos, Kafka and Cassandra
Real-Time Log Analysis with Apache Mesos, Kafka and CassandraReal-Time Log Analysis with Apache Mesos, Kafka and Cassandra
Real-Time Log Analysis with Apache Mesos, Kafka and Cassandra
 
Apache Arrow -- Cross-language development platform for in-memory data
Apache Arrow -- Cross-language development platform for in-memory dataApache Arrow -- Cross-language development platform for in-memory data
Apache Arrow -- Cross-language development platform for in-memory data
 
Apache spark-the-definitive-guide-excerpts-r1
Apache spark-the-definitive-guide-excerpts-r1Apache spark-the-definitive-guide-excerpts-r1
Apache spark-the-definitive-guide-excerpts-r1
 

Similar to SpotifyX Architectural Review

Weaving Microservices into a Unified GraphQL Schema with graph-quilt - Ashpak...
Weaving Microservices into a Unified GraphQL Schema with graph-quilt - Ashpak...Weaving Microservices into a Unified GraphQL Schema with graph-quilt - Ashpak...
Weaving Microservices into a Unified GraphQL Schema with graph-quilt - Ashpak...
All Things Open
 
DataFusion-and-Arrow_Supercharge-Your-Data-Analytical-Tool-with-a-Rusty-Query...
DataFusion-and-Arrow_Supercharge-Your-Data-Analytical-Tool-with-a-Rusty-Query...DataFusion-and-Arrow_Supercharge-Your-Data-Analytical-Tool-with-a-Rusty-Query...
DataFusion-and-Arrow_Supercharge-Your-Data-Analytical-Tool-with-a-Rusty-Query...
aiuy
 
DataFusion and Arrow_ Supercharge Your Data Analytical Tool with a Rusty Quer...
DataFusion and Arrow_ Supercharge Your Data Analytical Tool with a Rusty Quer...DataFusion and Arrow_ Supercharge Your Data Analytical Tool with a Rusty Quer...
DataFusion and Arrow_ Supercharge Your Data Analytical Tool with a Rusty Quer...
Medcl1
 
An Architecture for Agile Machine Learning in Real-Time Applications
An Architecture for Agile Machine Learning in Real-Time ApplicationsAn Architecture for Agile Machine Learning in Real-Time Applications
An Architecture for Agile Machine Learning in Real-Time Applications
Johann Schleier-Smith
 
Flink for Everyone: Self Service Data Analytics with StreamPipes - Philipp Ze...
Flink for Everyone: Self Service Data Analytics with StreamPipes - Philipp Ze...Flink for Everyone: Self Service Data Analytics with StreamPipes - Philipp Ze...
Flink for Everyone: Self Service Data Analytics with StreamPipes - Philipp Ze...
Flink Forward
 

Similar to SpotifyX Architectural Review (20)

Weaving Microservices into a Unified GraphQL Schema with graph-quilt - Ashpak...
Weaving Microservices into a Unified GraphQL Schema with graph-quilt - Ashpak...Weaving Microservices into a Unified GraphQL Schema with graph-quilt - Ashpak...
Weaving Microservices into a Unified GraphQL Schema with graph-quilt - Ashpak...
 
A Practical Deep Dive into Observability of Streaming Applications with Kosta...
A Practical Deep Dive into Observability of Streaming Applications with Kosta...A Practical Deep Dive into Observability of Streaming Applications with Kosta...
A Practical Deep Dive into Observability of Streaming Applications with Kosta...
 
RICOH THETA x IoT Developers Contest : Cloud API Seminar (2nd installation)
RICOH THETA x IoT Developers Contest : Cloud API Seminar (2nd installation)RICOH THETA x IoT Developers Contest : Cloud API Seminar (2nd installation)
RICOH THETA x IoT Developers Contest : Cloud API Seminar (2nd installation)
 
Supercharging Self-Service API Integration with AI
Supercharging Self-Service API Integration with AI Supercharging Self-Service API Integration with AI
Supercharging Self-Service API Integration with AI
 
SharePoint REST vs CSOM
SharePoint REST vs CSOMSharePoint REST vs CSOM
SharePoint REST vs CSOM
 
Sprint 63
Sprint 63Sprint 63
Sprint 63
 
DataFusion-and-Arrow_Supercharge-Your-Data-Analytical-Tool-with-a-Rusty-Query...
DataFusion-and-Arrow_Supercharge-Your-Data-Analytical-Tool-with-a-Rusty-Query...DataFusion-and-Arrow_Supercharge-Your-Data-Analytical-Tool-with-a-Rusty-Query...
DataFusion-and-Arrow_Supercharge-Your-Data-Analytical-Tool-with-a-Rusty-Query...
 
Best of barcelona symposium experience
Best of barcelona symposium experienceBest of barcelona symposium experience
Best of barcelona symposium experience
 
DataFusion and Arrow_ Supercharge Your Data Analytical Tool with a Rusty Quer...
DataFusion and Arrow_ Supercharge Your Data Analytical Tool with a Rusty Quer...DataFusion and Arrow_ Supercharge Your Data Analytical Tool with a Rusty Quer...
DataFusion and Arrow_ Supercharge Your Data Analytical Tool with a Rusty Quer...
 
Managing microservices with istio on OpenShift - Meetup
Managing microservices with istio on OpenShift - MeetupManaging microservices with istio on OpenShift - Meetup
Managing microservices with istio on OpenShift - Meetup
 
An Architecture for Agile Machine Learning in Real-Time Applications
An Architecture for Agile Machine Learning in Real-Time ApplicationsAn Architecture for Agile Machine Learning in Real-Time Applications
An Architecture for Agile Machine Learning in Real-Time Applications
 
SharePoint for the .NET Developer
SharePoint for the .NET DeveloperSharePoint for the .NET Developer
SharePoint for the .NET Developer
 
Flink for Everyone: Self Service Data Analytics with StreamPipes - Philipp Ze...
Flink for Everyone: Self Service Data Analytics with StreamPipes - Philipp Ze...Flink for Everyone: Self Service Data Analytics with StreamPipes - Philipp Ze...
Flink for Everyone: Self Service Data Analytics with StreamPipes - Philipp Ze...
 
Learning with F#
Learning with F#Learning with F#
Learning with F#
 
#CNX14 - Dive Deep into the ExactTarget Fuel APIs
#CNX14 - Dive Deep into the ExactTarget Fuel APIs#CNX14 - Dive Deep into the ExactTarget Fuel APIs
#CNX14 - Dive Deep into the ExactTarget Fuel APIs
 
How Spotify reaches the 80%+ of satisfaction of the techies making developers...
How Spotify reaches the 80%+ of satisfaction of the techies making developers...How Spotify reaches the 80%+ of satisfaction of the techies making developers...
How Spotify reaches the 80%+ of satisfaction of the techies making developers...
 
Hard learned CSOM and REST tips
Hard learned CSOM and REST tipsHard learned CSOM and REST tips
Hard learned CSOM and REST tips
 
Introducing MongoDB Stitch, Backend-as-a-Service from MongoDB
Introducing MongoDB Stitch, Backend-as-a-Service from MongoDBIntroducing MongoDB Stitch, Backend-as-a-Service from MongoDB
Introducing MongoDB Stitch, Backend-as-a-Service from MongoDB
 
Apollo Cloud Edge Solution - 20180518
Apollo Cloud Edge Solution - 20180518Apollo Cloud Edge Solution - 20180518
Apollo Cloud Edge Solution - 20180518
 
Microsoft Graph: Connect to essential data every app needs
Microsoft Graph: Connect to essential data every app needsMicrosoft Graph: Connect to essential data every app needs
Microsoft Graph: Connect to essential data every app needs
 

More from Morteza Zakeri

More from Morteza Zakeri (20)

Antlr part3 getting_started_in_c_sharp
Antlr part3 getting_started_in_c_sharpAntlr part3 getting_started_in_c_sharp
Antlr part3 getting_started_in_c_sharp
 
Antlr part1 introduction
Antlr part1 introductionAntlr part1 introduction
Antlr part1 introduction
 
Antlr part2 getting_started_in_java
Antlr part2 getting_started_in_javaAntlr part2 getting_started_in_java
Antlr part2 getting_started_in_java
 
9-roslyn-guidelines
9-roslyn-guidelines9-roslyn-guidelines
9-roslyn-guidelines
 
7-clean-code
7-clean-code7-clean-code
7-clean-code
 
8-bad-smells
8-bad-smells8-bad-smells
8-bad-smells
 
6-TDD
6-TDD6-TDD
6-TDD
 
3-use-casemodelling
3-use-casemodelling3-use-casemodelling
3-use-casemodelling
 
5-modular-design
5-modular-design5-modular-design
5-modular-design
 
4-architectural-views
4-architectural-views4-architectural-views
4-architectural-views
 
2-requirements-modelling
2-requirements-modelling2-requirements-modelling
2-requirements-modelling
 
1-requirements-elicitation
1-requirements-elicitation1-requirements-elicitation
1-requirements-elicitation
 
Analysis of Social Phenomena Using Machine Learning Techniques: A Mixed Resea...
Analysis of Social Phenomena Using Machine Learning Techniques: A Mixed Resea...Analysis of Social Phenomena Using Machine Learning Techniques: A Mixed Resea...
Analysis of Social Phenomena Using Machine Learning Techniques: A Mixed Resea...
 
Internet of Things: Middle-ware Platforms, Security, and Intrusion Detection
Internet of Things: Middle-ware Platforms, Security, and Intrusion DetectionInternet of Things: Middle-ware Platforms, Security, and Intrusion Detection
Internet of Things: Middle-ware Platforms, Security, and Intrusion Detection
 
Community Detection with Genetic Algorithm
Community Detection with Genetic AlgorithmCommunity Detection with Genetic Algorithm
Community Detection with Genetic Algorithm
 
An overview of anomaly detection techniques
An overview of anomaly detection techniquesAn overview of anomaly detection techniques
An overview of anomaly detection techniques
 
SQLite and object-relational mapping in Java
SQLite and object-relational mapping in JavaSQLite and object-relational mapping in Java
SQLite and object-relational mapping in Java
 
یادگیری توالی به توالی با شبکه های عصبی
یادگیری توالی به توالی با شبکه های عصبییادگیری توالی به توالی با شبکه های عصبی
یادگیری توالی به توالی با شبکه های عصبی
 
Sequence to sequence learning with neural networks
Sequence to sequence learning with neural networksSequence to sequence learning with neural networks
Sequence to sequence learning with neural networks
 
Bridge Management System Using NoSQL Solutions
Bridge Management System Using NoSQL SolutionsBridge Management System Using NoSQL Solutions
Bridge Management System Using NoSQL Solutions
 

Recently uploaded

Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 

Recently uploaded (20)

WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfAzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
 
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & InnovationWSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
WSO2CON 2024 - Not Just Microservices: Rightsize Your Services!
 

SpotifyX Architectural Review

  • 1. SpotifyX: A Framework for the family of applications like Spotify By: Morteza Zakeri and Arman Sanahmadi Software Architectures Course Instructor: Dr. Mehrdad Ashtiani Iran University of Science and Technology School of Computer Engineering Fall 2018
  • 2. 20 Agenda • Introduction • Feature list • Architectural Blueprints • Physical view (Deployment diagram) • Development view (Component diagram) • Logical view (Class diagram) • References October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 2
  • 3. 20 Spotify: Music for everyone! October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 3 Introduction Features Architectural Blueprints Physical view Development view Logical view
  • 4. 20 Spotify: Features October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 4 Introduction Features Architectural Blueprints Physical view Development view Logical view Profile Search Streaming Payment Friendship Advertisement Playlist Recommendation
  • 5. 20 Features list 1. Streaming 2. Search 3. Recommendation 4. Playlist 5. Friendship and Following 6. User management (Profile) • Signup • Login • Logout • Profile info 7. Payment • Premium account October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 5 Introduction Features Architectural Blueprints Physical view Development view Logical view
  • 6. 20 Three main feature Is it part of the essence of the system? What the “heck” does it mean? How the “heck” do I do it? Streaming Yes Search Yes Recommendation No Playlist No Friendship and Following No User management (Profile) Yes Payment Yes October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 6 Introduction Features Architectural Blueprints Physical view Development view Logical view
  • 7. 20 4+1 architectural view model October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 7 Philippe Kruchten, 1995 Introduction Features Architectural Blueprints Physical view Development view Logical view
  • 8. 20 Physical view (Deployment diagram) October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 8 Introduction Features Architectural Blueprints Physical view Development view Logical view Client ... API Gateway Request DMZ 1 (Microservices) Media Streaming Media Search Microservice Microservice Media Recommend Microservice Media Storage Management (HDFS) DMZ 2 (Other Services) Authentication Profile Data Provider ... Business Logic Layer KubernetesConsul Low-level Back-end (Third Parties) Configurations (Git Repository) Neo4j Cassandra Data Model Layer Response Firewall Clients Servers Friendship and Follower
  • 9. 20 Development view (Component diagram) October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 9 Introduction Features Architectural Blueprints Physical view Development view Logical view <<component>> MediaSerach <<component>> APIGateway <<component>> Client <<component>> CassandraDriver <<component>> HDFSDriver <<component>> MediaStreaming <<component>> MediaRecomendation <<component>> SearchEngine <<component>> Model <<component>> Autentication <<component>> FreindshipAndFollower <<component>> Profile <<component>> Neo4jDriver
  • 10. 20 Logical view (Class diagram) By Arman Sanahmadi • Today: 1. Media streaming microservice 2. Media search microservice 3. Media recommendation microservice • Next Presentation: 4. Profile 5. Payment 6. Playlist 7. Friendship October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 10 Introduction Features Architectural Blueprints Physical view Development view Logical view
  • 11. 20 Development view (Component diagram) October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 11 Introduction Features Architectural Blueprints Physical view Development view Logical view <<component>> MediaSerach <<component>> APIGateway <<component>> Client <<component>> CassandraDriver <<component>> HDFSDriver <<component>> MediaStreaming <<component>> MediaRecomendation <<component>> SearchEngine <<component>> Model <<component>> Autentication <<component>> FreindshipAndFollower <<component>> Profile <<component>> Neo4jDriver
  • 12. 20 Media streaming microservice October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 12 Introduction Features Architectural Blueprints Physical view Development view Logical view <<Abstract>> ServiceAPI -baseURL: string +ServiceAPI(): void -conn : ServiceConnection +setBaseURL(string) : void -initializer(): ServiceConnetion +geyBaseURL(): string #requestHandler(IRequest req): IResponse ServiceConnection - socket : Socket +ServiceConnection() : void +CreateService(string) : void #requestSerializer(IRequest) : byte[] #sendRequest(bbyte []) : byte[] #responseParser(byte[]) : IResponse StreamMusicAPI +streamMusic() : IResponse +pause() : IResponse +stop() : IResponse StreamSetting -qulity: Quality -id : string<<Interface>> IAudioStreaming startStreaming(Stream Setting) : byte[] pauseStreaming() : void StreamHQ startStreaming(String address) : byte[] +pauseStreaming() : void StreamLQ startStreaming(String address) : byte[] +pauseStreaming() : void SteamMQ startStreaming(String address) : byte[] +pauseStreaming() : void <<Interface>> IResponse +getResponseContent() : byte[] +setResponseContent(byte [] ) : void <<Interface>> IRequest +getRequestContent() : byte[] +setRequestContent (byte[]) : void StreamResponse +getBuffer() : byte[] +getProgress() : int +resume() : boolean +pause() : boolean +getChannel() : Channel StreamRequest +getchannel() : Channel +setChannel(Channel) : void +setChannel(Channel) : void -address : string getQuality() : enum -AudioStreaming setAddress(string) : void +setQuality(enum) : void +getAddress() : string +getID() : string +setID(string) : void <<Enumeration>> Quality +High +Medium +Low DBHandler +getConnection() : Connection
  • 13. 20 Media search microservice October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 13 Introduction Features Architectural Blueprints Physical view Development view Logical view <<Abstract>> HttpServlet -baseURL: string +ServiceAPI(): void -conn : ServiceConnection +setBaseURL(string) : void -initializer(): ServiceConnetion +geyBaseURL(): string ServiceConnection - socket : Socket +ServiceConnection() : void +CreateService(string) : void #requestSerializer(IRequest) : byte[] #sendRequest(bbyte []) : byte[] #responseParser(byte[]) : IResponse SearchAPI +search(iReq: IRequest, iRes: IResponse): void +getUserHistory(iReq: IRequest, iRes: IResponse): void SearchEngine -resultList: List<SearchResult> <<Interface>> IResponse +getResponseContent() : byte[] +setResponseContent(byte [] ) : void <<Interface>> IRequest +getRequestContent() : byte[] +setRequestContent (byte[]) : void RESTResponse +getResponseBody():JSONParser +getResponseCode() : int +getResponseContent(): byte[] +getHeaders() : Headers[] RESTRequest +getHeaders() : Headers[] +getRequestContent(): byte[] -saveHistory(): void +find(tag: string, userID: string): List<SearchResult> +retrieveHistory(userID: string): List<SearchResult> SearchResult -id: string -name: string -type: Type 1 * +getRequestBody():JSONParser +setRequestBody(body: JSONParser):void +setRequestContent(content: byte[]): void +setHeaders(headers: Headers[]) : void+setResponseBody(body: JSONParser):void +setHeaders(headers: Headers[]) : void +setResponseContent(content: byte[]): void +setResponseCode(code: int): void +seters and getters() DBHandler +getConnection() : Connection #processRequest(iReq: IRequest, iRes: IResponse): void <<Enumeration>> Type +type1 +type2 +type3
  • 14. 20 Media recommendation microservice October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 14 Introduction Features Architectural Blueprints Physical view Development view Logical view <<Abstract>> HttpServlet -baseURL: string +ServiceAPI(): void -conn: ServiceConnection +setBaseURL(s: string) : void -initializer(): ServiceConnetion +geyBaseURL(): string ServiceConnection - socket : Socket +ServiceConnection(): void +CreateService(s: string): void #requestSerializer(iReq: IRequest): byte[] #sendRequest(b: byte []): byte[] #responseParser(b: byte[]): IResponse RecommendationAPI +findRecom(iReq: IRequest, iRes: IResponse): void <<Inteface>> RecommendationAlgorithm +produceRecommendation(userID: String): List<SearchResult> Algorithm1 Algorithm2 Algorithm3 <<Interface>> IResponse +getResponseContent() : byte[] +setResponseContent(b: byte []) : void <<Interface>> IRequest +getRequestContent() : byte[] +setRequestContent (b: byte[]) : void RESTResponse +getResponseBody():JSONParser +getResponseCode() : int +getResponseContent(): byte[] +getHeaders() : Headers[] RESTRequest +getHeaders() : Headers[] +getRequestContent(): byte[] +getRequestBody():JSONParser +setRequestBody(body: JSONParser):void +setRequestContent(content: byte[]): void +setHeaders(headers: Headers[]) : void+setResponseBody(body: JSONParser):void +setHeaders(headers: Headers[]) : void +setResponseContent(content: byte[]): void +setResponseCode(code: int): void +ProduceRecommendation(userID: String):List<SearchResult> +ProduceRecommendation(userID: String): List<SearchResult> +getHistory(userID: String): List<SearchResult> SearchResult -id: string -name: string -type: Type +seters and getters() -results : List<searchResult> -results : List<searchResult> -results : List<searchResult> +getHistory(userID: String): List<SearchResult> +getHistory(userID: String):List<SearchResult> +getHistory(userID: String): List<SearchResult> <<Enumeration>> Type +type1 +type2 +type3 DBHandler +getConnection(): Connection +ProduceRecommendation(userID: String): List<SearchResult> #processRequest(iReq: IRequest, iRes: IResponse): void -recomAlg: RecommendationAlgorithm
  • 15. 20 Model October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 15 Introduction Features Architectural Blueprints Physical view Development view Logical view User -username: String -password: String -email: String -isPremium: Boolean -playlists: List<Playlist> -friends:List<User> -following: List<Artist> Artist -biography : String -albums: List<Album> -followers: List<User> +seters(args-to-set): void +getters(): Property +seters(args-to-set): void +getters(): Property <<Interface>><<Interface>> IModel +toJSON(): String +fromJSON(s: String): void Album -id: long -title: String -publishDate: Date -tracks: List<Music> -description: String +seters(args-to-set): void +getters(): Property -artist:Artist Music -id: long -title: String -publishDate: Date -geners: List<Gener> -isSingleTrack: boolean -lyric: Map<Date, String> +seters(args-to-set): void +getters(): Property -artist:Artist Playlist -id: long -title: String -createDate: Date -tracks: List<Music> -description: String +seters(args-to-set): void +getters(): Property -length: double -rate: int <<Enumeration>> Gener +Pop +Rock +Rap +... -firstName : String -lastName: String -photo: Picture -firstName : String -lastName: String -aliasName: String -photo: Picture -id: long -id: long 1 * m n 1 * 1 * 1 * 1 * DBHandler +getConnection(): Connection+save():void +read(query: String):IModel
  • 16. 20 Accounting October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 16 Introduction Features Architectural Blueprints Physical view Development view Logical view Transaction -status : TransactionStatus +getStatus():TransactionStatus -date: Date -amount: float -setStatus(): transactionStatus +commit(): bool +rollback(): bool +getDate(): date +getAmount(): float +setAmount(float f): void +setDate(Date d): void <<Enumeration>> TransactionStatus +Done +Pending +Failed Premium -offers: List<Offer> +buyPremium(offer): Transaction -transaction: Transaction +getExpireDate(): Date +getTransaction(): Transaction 1 * Account -user: User +doLogin(): session -permium: Premium -session: Session +doLogout(session): void +getAccountType(): Premium +getSession(): Session <<Interface>> ILogin +doLogin(Stringuser,Stringpass):Session -checkUserExist(String username):boolean GoogleLogin +doLogin(Stringuser,Stringpass):Session -checkUserExist(String username):boolean SpotifyLogin -checkUserExist(username: String):boolean +doLogin(username: String, password: String):Session Session -sessionID: String getinstance(): Session -user: User -LoginType LoginType Offer -id +setterAndGetters() -duration: int -price: double -discount double -memberName 1 * +doSignUp(): Session <<Interface>><<Interface>> IModel +toJSON(): String +fromJSON(s: String) +save():void +read(id: String):IModel DBHandler +getConnection(): Connection <<Enumeration>> LoginType +google +spotify getinstance(User u): Session
  • 17. 20 High-level services (Logic) October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 17 Introduction Features Architectural Blueprints Physical view Development view Logical view <<Abstract>> HttpServlet -baseURL: string +ServiceAPI(): void -conn: ServiceConnection +setBaseURL(s: string) : void -initializer(): ServiceConnetion +geyBaseURL(): string ServiceConnection - socket : Socket +ServiceConnection(): void +CreateService(s: string): void #requestSerializer(iReq: IRequest): byte[] #sendRequest(b: byte []): byte[] #responseParser(b: byte[]): IResponse AuthenticationAPI +Login(iReq: IRequest, iRes: IResponse): void <<Interface>> IResponse +getResponseContent() : byte[] +setResponseContent(b: byte []) : void <<Interface>> IRequest +getRequestContent() : byte[] +setRequestContent (b: byte[]) : void RESTResponse +getResponseBody():JSONParser +getResponseCode() : int +getResponseContent(): byte[] +getHeaders() : Headers[] RESTRequest +getHeaders() : Headers[] +getRequestContent(): byte[] +getRequestBody():JSONParser +setRequestBody(body: JSONParser):void +setRequestContent(content: byte[]): void +setHeaders(headers: Headers[]) : void+setResponseBody(body: JSONParser):void +setHeaders(headers: Headers[]) : void +setResponseContent(content: byte[]): void +setResponseCode(code: int): void +Logout(iReq: IRequest, iRes: IResponse): void +signup(iReq: IRequest, iRes: IResponse): void ProfileManagerAPI +CreatePlayList(iReq: IRequest, iRes: IResponse): void +DeletePlayList(iReq: IRequest, iRes: IResponse): void +RemoveMusicfromPlaylist(iReq: IRequest, iRes: IResponse): void +AddMusicToPlaylist(iReq: IRequest, iRes: IResponse): void +EditPlayList(iReq: IRequest, iRes: IResponse): void +BuyPremium(iReq: IRequest, iRes: IResponse): void +GetPlayLists(iReq: IRequest, iRes: IResponse): void FriendshipAndFollowerAPI +addFriend(iReq: IRequest, iRes: IResponse): void +removeFriend(iReq: IRequest, iRes: IResponse): void +addFollower(iReq: IRequest, iRes: IResponse): void +removeFollower(iReq: IRequest, iRes: IResponse): void +checkIsPremium(iReq: IRequest, iRes: IResponse): void
  • 18. 20 Demo Code (in Java) October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 18 Service model Introduction Features Architectural Blueprints Physical view Development view Logical view
  • 19. 20 References [1] P. Kruchten, “The 4+1 view model of architecture,” IEEE Software., vol. 12, no. 6, pp. 42–50, Nov. 1995. [2] Spotify Labs., “architecture,” 2018. [Online]. Available: https://labs.spotify.com/tag/architecture/. [Accessed: 20-Dec-2018].  [3] B.D. McLaughlin, G. Pollice, and D. West, Head first object-oriented analysis and design, O’Reilly Media, 2007.  [4] Visual Paradigm, “What is unified modeling language (UML)?,” Visual Paradigm, 2018. [Online]. Available: https://www.visual- paradigm.com/guide/uml-unified-modeling-language/what-is-uml/. [Accessed: 26-Dec-2018]. October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures 19
  • 20.
  • 21. 20 4+1 architectural view model October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures +1 Philippe Kruchten, 1995 Backup slides
  • 22. 20 Process view (Activity diagram) • To be added October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures +2 Backup slides
  • 23. 20 Scenarios (Use cases) • Demo code • Code template (demonstrated by test scenarios) • By Arman Sanahmadi • Using Postman to develop • APIs October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures +3 Backup slides
  • 24. 20 Technologies we used • And some other libraries, packages and tools Backup slides October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures +4
  • 25. 20 UML diagrams we used October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures +6 Backup slides
  • 26. 20 UML diagrams we used October 2018 SpotifyX - Morteza Zakeri and Arman Sanahmadi- Software Architectures +5 Backup slides

Editor's Notes

  1. SpotifyX: Framework for the family of applications like Spotify By: Morteza Zakeri Nasrabadi and Arman SanAhmadi Software Architectures Course – Winter 2018 Instructor: Dr. Mehrdad Ashtiani School of Computer Engineering Iran University of Science and Technology Final slides
  2. Outline Agenda Page numbering is activated.
  3. The three Qs of architecture When you’re trying to figure out if something is architecturally significant, there are three questions you can ask: Is it part of the essence of the system? Is the feature really core to what a system actually is? Think about it this way: can you imagine the system without that feature? If not, then you’ve probably found a feature that is part of the essence of a system. Is it part of the essence of the system? Is the feature really core to what a system actually is? Think about it this way: can you imagine the system without that feature? If not, then you’ve probably found a feature that is part of the essence of a system. How the “heck” do I do it? Another place to focus your attention early on is on features that seem really hard to implement, or are totally new programming tasks for you. If you have no idea how you’re going to tackle a particular problem, you better spend some time up front looking at that feature, so it doesn’t create lots of problems down the road.
  4. Design is ART! We modified our design many times. Design is a teamwork. Every body has is own ART! This may be the final version, version 5. Not YET? Arman should see it 
  5. Component diagram vs Package diagram.
  6. Component diagram vs Package diagram.
  7. Order by most using… Do you agree???
  8. Thank you for your attention! Framework for the family of applications like Spotify By: Morteza Zakeri See backup slides section for more information. Last edit: 1397 09 26– Monday – presentation day; after presentation. Edit 2: 1397 07 27 Edit 1: 1397 10 05