Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
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
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
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
Outline
Agenda
Page numbering is activated.
The three Qs of architectureWhen you’re trying to figure out if something is architecturallysignificant, there are three questions you can ask:
Is it part of the essence of the system?Is the feature really core to what a systemactually is? Think about it this way: can youimagine the system without that feature? If not,then you’ve probably found a feature that is part of theessence of a system.
Is it part of the essence of the system?Is the feature really core to what a systemactually is? Think about it this way: can youimagine the system without that feature? If not,then you’ve probably found a feature that is part of theessence of a system.
How the “heck” do I do it?Another place to focus your attention earlyon is on features that seem really hard toimplement, or are totally new programmingtasks for you. If you have no idea how you’regoing to tackle a particular problem, youbetter spend some time up front looking at that feature, so itdoesn’t create lots of problems down the road.
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
Component diagram vs Package diagram.
Component diagram vs Package diagram.
Order by most using…
Do you agree???
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