SlideShare a Scribd company logo
1 of 36
Download to read offline
Nazariy Hazdun
● Co-Owner & CTO of Geniusee
● 8+ years of experience in IT industry
● 4+ years of team leading experience
● Co-founder of 2 startups: LimpidArmor (AR/MR/IoT),
UALight (IoT)
About me
Agenda
1. Why microservices?
2. Authorization
3. Graph social relationships
4. News feed
5. Microservices
communication
Why
microservices?
1
Why microservices (1/3)
● Authorization
● Feed
● Groups
● Friendships
● Messenger
● Search
● Notifications
Basic Social Network
Components
Why microservices (2/3)
● Performance
● Team scalability
● Quick time to market
Non-functional
requirements
Why microservices (3/3)
CONS PROS
● Each microservice is simple
● Scalability
● Each unit can use own stack
● Many cooperation units
● Network latencies
● No transactions
● Slower time to market
Authorization2
Authorization (1/5)
AaaS
Authorization (2/5)
● Integration with API Gateway
● Clients SDK (Web, iOS, Android)
● Social sign-in with Facebook, Google, and possibility to
extend drivers.
● User directory management and user profiles.
● Security features such as multi-factor authentication
(MFA), checks for compromised credentials, account
takeover protection, and phone and email verification.
Amazon Cognito
advantages
Authorization (3/5)
Cognito authorization
life cycle
Authorization (4/5)
SDK AWS SDK for PHP
Wrappers
Authorization (5/5)
You pay based on your monthly active users (MAUs) only. A
user is counted as a MAU if, within a calendar month, there is
an identity operation related to that user, such as sign-up,
sign-in, token refresh, or password change.
Cost
Pricing Tier (MAUs) Price per MAU
First 50,000 Free
Next 50,000 $0.00550
Next 900,000 $0.00460
Next 9,000,000 $0.00325
Greater than 10,000,000 $0.00250
Graph social
relationships
3
Graph social relationships (1/8)
Classification of
graph databases
Graph social relationships (2/8)
Friendships graph
Graph social relationships (3/8)
RDBS friendship
tables
id name
1 Nazar
2 Pavlo
3 Taras
4 Alex
5 Oksana
6 Taya
7 Roman
user_id friend_id
1 2
2 5
1 7
7 4
... ….
users friendships
Graph social relationships (4/8)
Neo4j vs RDBS
300xfaster
Graph social relationships (5/8)
● Creating friendship request
● List of requests
● Request approving
● Request cancellation
● List of friends. Depth from 1 to N.
● Friends suggestions
● Suggestions based on Facebook Graph
Use Cases
Graph social relationships (6/8)
Neo4j ORM drivers NeoEloquent
Neo4j PHP OGM
Graph social relationships (7/8)
Managed Neo4j
Graph social relationships (8/8)
Books
News feed4
News feed (1/3)
Timeline Feeds
● Basic feeds contain a simple list
of chronologically sorted
activities from the topics or
people you follow.
Ranked Feeds
● Ranking allows you to take
control over how activities are
sorted. Ranking activities can
help improve engagement.
News feed (2/3)
EdgeRank
News feed (3/3)
Aggregated Feeds
● Aggregation enables you to
group activities together based
on rules. This help keeps the
feed relevant when there is a
lot of activity.
Notification Feeds
● Notification feeds add the
concept of “seen” or “read” to
the activities. Commonly used
with Aggregation.
Personalized Feeds
● Leverage machine learning to further
improve the relevancy of your feed. Top
companies such as YouTube, Etsy, Linkedin
and Instagram all leverage personalization.
Microservices
Сommunication
5
Microservices Сommunication (1/5)
Request-Reply
Microservices Сommunication (2/5)
Push-Pull:
Amazon SQS
Microservices Сommunication (3/5)
● Mails sending
● Facebook invites sending
● Push notifications
● Files processing
Use Сases
Microservices Сommunication (4/5)
Pub/Sub Messaging:
Amazon SNS
Microservices Сommunication (5/5)
● Microservices communication
● Write data into ElasticSearch
● Messenger
Use Сases
On completion...
On completion (1/3)
Bicycles as a
service
On completion (2/3)
BIG BALL OF MUD
On completion (3/3)
Q&A

More Related Content

Similar to Scalable social network API on AWS - Fwdays '18

Proiect florea robert
Proiect   florea robertProiect   florea robert
Proiect florea robert
Roby Florea
 

Similar to Scalable social network API on AWS - Fwdays '18 (20)

Neo4j GraphDay Seattle- Sept19- Connected data imperative
Neo4j GraphDay Seattle- Sept19- Connected data imperativeNeo4j GraphDay Seattle- Sept19- Connected data imperative
Neo4j GraphDay Seattle- Sept19- Connected data imperative
 
How Lyft Drives Data Discovery
How Lyft Drives Data DiscoveryHow Lyft Drives Data Discovery
How Lyft Drives Data Discovery
 
Sebastian Hellmann
Sebastian HellmannSebastian Hellmann
Sebastian Hellmann
 
Neo4j GraphTour Santa Monica 2019 - Amundsen Presentation
Neo4j GraphTour Santa Monica 2019 - Amundsen PresentationNeo4j GraphTour Santa Monica 2019 - Amundsen Presentation
Neo4j GraphTour Santa Monica 2019 - Amundsen Presentation
 
Be Part of a Community
Be Part of a CommunityBe Part of a Community
Be Part of a Community
 
Disrupting Data Discovery
Disrupting Data DiscoveryDisrupting Data Discovery
Disrupting Data Discovery
 
MuleSoft Nashik Meetup#7 - Building FHIR applications in MongoDB using MuleSoft
MuleSoft Nashik Meetup#7 - Building FHIR applications in MongoDB using MuleSoftMuleSoft Nashik Meetup#7 - Building FHIR applications in MongoDB using MuleSoft
MuleSoft Nashik Meetup#7 - Building FHIR applications in MongoDB using MuleSoft
 
Self service BI for humans
Self service BI for humansSelf service BI for humans
Self service BI for humans
 
Ai presentatie
Ai presentatieAi presentatie
Ai presentatie
 
Clickstream data with spark
Clickstream data with sparkClickstream data with spark
Clickstream data with spark
 
Ai presentatie
Ai presentatieAi presentatie
Ai presentatie
 
Tendencias en herramientas de monitorización de redes y modelo de madurez en ...
Tendencias en herramientas de monitorización de redes y modelo de madurez en ...Tendencias en herramientas de monitorización de redes y modelo de madurez en ...
Tendencias en herramientas de monitorización de redes y modelo de madurez en ...
 
Proiect florea robert
Proiect   florea robertProiect   florea robert
Proiect florea robert
 
How to win a machine learning competition pavel pleskov
How to win a machine learning competition   pavel pleskovHow to win a machine learning competition   pavel pleskov
How to win a machine learning competition pavel pleskov
 
JCP How to Participate @ JavaOne Russia
JCP How to Participate @ JavaOne RussiaJCP How to Participate @ JavaOne Russia
JCP How to Participate @ JavaOne Russia
 
[DSC DACH 23] Go with the flow – Track your machine learning lifecycle using ...
[DSC DACH 23] Go with the flow – Track your machine learning lifecycle using ...[DSC DACH 23] Go with the flow – Track your machine learning lifecycle using ...
[DSC DACH 23] Go with the flow – Track your machine learning lifecycle using ...
 
Data science at OLX
Data science at OLXData science at OLX
Data science at OLX
 
Social Network Analysis dengan NetworkX
Social Network Analysis dengan NetworkXSocial Network Analysis dengan NetworkX
Social Network Analysis dengan NetworkX
 
Domain Semantics
Domain SemanticsDomain Semantics
Domain Semantics
 
Data Discovery and Metadata
Data Discovery and MetadataData Discovery and Metadata
Data Discovery and Metadata
 

Recently uploaded

VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 

Recently uploaded (20)

VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 

Scalable social network API on AWS - Fwdays '18