SlideShare a Scribd company logo
Front-End APIs
Powering Fast-Paced Product Iterations
Speakers
​Jeff Weiner
​Chief Executive Officer
​Aditya Modi
​Staff Software Engineer
​Karthik Ramgopal
​Sr Staff Software Engineer
Overview
History and evolution of frontend APIs at LinkedIn
Our API structure today
Learnings and results
Sneak peek at the future
2 Years Ago
Mobile v/s Desktop
Feed on mobile Feed on desktopFeed on iPad
Client - Server setup
mobile-frontend-API tablet-frontend-API homepage-frontend-API profile-frontend-API
Android iOS Tablet homepage-desktop-web profile-desktop-web
• Huge API surface and diversity
• No IDL/schema backing API
• Slow iteration speed
Problems?
Today
Mobile v/s Desktop
Feed on mobile Feed on desktopFeed on iPad
Client - Server setup
flagship-frontend-API
flagship-android flagship-iOS flagship-desktop-webflagship-mobile-web
Rest + JSON over HTTP2
Mid-tier . . . . Mid-tier
• > 120k QPS
• ~425 developers
• ~30 commits per day
Scale
• Automated continuous release
• commit to production in < 3 hours
• 3 deployments a day
3x3 Deployment
Modeling
• Backed by Strongly Typed Schemas
• Backward-compatible evolution
• No endpoint versioning
Principles
{
"type": "record",
"name": "TestRecord",
"namespace": "com.linkedin.test",
"doc": "Test",
"fields": [
{
"name": "id",
"type": "String",
"doc": "ID"
},
{
"name": "name",
"type": "String",
"doc": "Name",
“optional”: true
},
]
}
@interface TestRecord : NSObject
@property(nonnull, copy) NSString *id;
@property(nullable, copy) NSString *name;
@end
class TestRecord {
@NonNull public final String id;
@Nullable public final String name;
}
export default DS.Model.extend({
id: DS.attr(‘string’),
name: DS.attr(‘string’)
});
Schema definition
iOS
Android
Web
Entity Modeling
• Return - Collection<Card>
Composite screens
● Two top level resources
■ Invitations
■ PYMK (People You May Know)
● 1 network call to fetch both resources
■ Infrastructure level aggregation support
• Easy to model
• Decouple API from UI
• Client side consistency
Advantages
Client side consistency
Client side consistency
• Why ?
○ Good UX
○ Optimistic writes
Client side consistency
Can you do this auto-magically?
Client side consistency
Payload Cache
Client side consistency
Payload Cache
Client side consistency
Cache Payload
Everything is awesome, right?
Takes a long time to ship a feature
API Server
1.5 weeks
iOS
2 weeks
Android
2 weeks
Web
2 weeks
Total time
3.5 weeks=+
Use case: Introduce a new kind of notification
• Create new models for every feature
• Write code on each client platform
• Wait for native app release/adoption
Why so long?
Challenge
Cut this down to 1 day!
• Quickly build and release notifications
• Increase user engagement
• Sweet and sticky, just like honey!
Project Honeycomb
• New notifications WITHOUT app updates
• Client side consistency
• Stellar runtime performance
Beyond iteration speed...
• Model based on how the UI view looks
• Similar views grouped into 1 template
• More UI specific logic on API server
View Template API
Share notification
Share Template
● PrimaryImage: URL?
● Title: AttributedString
● Timestamp: Long
● ShareImage: URL?
● ShareTitle: String
● LikeCount: Long? (Default: 0)
● CommentCount: Long? (Default: 0)
Now let’s look at a slightly different notification
Modify Share Template
● PrimaryImage: URL?
● Title: AttributedString
● Timestamp: Long
● ShareImage: URL?
● ShareTitle: String AttributedString
● ShareSubtitle: AttributedString?
● LikeCount: Long? (Default: 0)
● CommentCount: Long? (Default: 0)
How about something radically different?
Work Anniversary Template
● PrimaryImage: URL?
● Title: AttributedString
● Timestamp: Long
Something slightly different again?
Work Anniversary/New Position Template
● PrimaryImage: URL?
● Title: AttributedString
● Timestamp: Long
● BodyText: AttributedString?
How do we return a heterogeneous list?
• Use Rest.li paginated collections. Differentiate between items using a Union.
• JSON payload structure:
{
“elements” : [
{“Share”: {“Title”: “Sarah Clatterbuck shared a…”, ...}},
{“Anniversary”: {“Title”: “Congratulate Nitish Jha…”, ...}},
....
],
“paging”: { “start” : 0, “count”: 10, “paginationToken”: “xydsad”}
}
Minor payload optimization
• Embed the type into the payload to reduce nesting.
• JSON payload structure:
{
“elements” : [
{“Type”: “Share”, “Title”: “Sarah Clatterbuck shared a…”, ...},
{“Type”: “Anniversary”, “Title”: “Congratulate Nitish Jha…”, ...},
....
],
“paging”: { “start” : 0, “count”: 10, “paginationToken”: “xydsad”}
}
• Code-generated response parser
• Bind model to native views
• Write once* per layout, reuse.
Client side rendering
Backward compatibility
{
“elements” : [
{“Stat”: {“Title”: “Your Profile...”, ...}},
{“JYMBII”: {“Title”: “5 Jobs you”, ...}},
{“Share”: {“Title”: “Swati Mathur...”, ...}},
....
],
“paging”: { “start” : 0, “count”: 10,
“paginationToken”: “xydsad”}
}
Drop unknown notification types.
Backward compatibility
Drop unknown fields based on product needs.
• New notification types without client
changes
• Renders faster on the client
Benefits
But… Client side Consistency is lost!
How do we solve this?
How did we solve the AttributedString problem?
• Model formatted text
• Control formatting from the server
• Impractical to use HTML
AttributedString
AttributedString schema
AttributedString
● Text: String
● Attributes: List[Attribute] BOLD, ITALIC, UNDERLINE etc.
Attribute
● Type: AttributeType
● StartIndex: Int
● Length: Int
● Metadata: Any?
Platform specific binding
Infrastructure provided support
iOS
Android
Web
NSAttributedString
Spannable
HTML
AttributedString
What if we extended this concept to entity mentions?
Model entity mentions also as a custom formatting specifier.
Profile mention Profile mention
Introducing TextViewModel
TextViewModel
● Text: String
● Attributes: List[TextViewAttribute]
TextViewAttribute
● Type: TextViewAttributeType
● StartIndex: Int
● Length: Int
● Metadata: Any?
● Profile: Profile?
● Job: Job?
● Company: Company?
● Course: Course?
Flattened canonical entities as optional fields
Similar to AttributedString
Entity mentions
Entities could be mentioned in different ways.
First Name
Full Name
Position
TextViewAttributeType
TextViewAttributeType
● PROFILE_FIRST_NAME
● PROFILE_FULL_NAME
● PROFILE_HEADLINE
● PROFILE_DISTANCE
● COMPANY_NAME
● COMPANY_HEADLINE
● JOB_TITLE
● ….
If a particular type is used, then the corresponding entity is populated by the server.
● PROFILE_XXX types will populate the profile field for example with the corresponding profile.
Backward compatibility++
Old clients cannot handle new mention types. Always send Raw text though redundant.
{
“title” : {
“Text”: “Sarah Clatterbuck shared this”,
“Attributes”: [
{“Type”: “PROFILE_FULL_NAME”,
“StartIndex”: 0….}
]
}
}
• Singular and Plurals
• Possessive forms
• i10n and i18n
Watch Out
How about images?
Use the same concept as TextViewModel. Introduce ImageViewModel.
ImageViewModel
● Attributes: List[ImageViewAttribute]
ImageViewAttribute
● ImageViewAttributeType
● URL: URL?
● ResourceName: String?
● Profile: Profile?
● Job: Job?
● Company: Company?
● Course: Course?
Flattened canonical entities as optional fields
ImageViewAttributeType
ImageViewAttributeType
● URL
● RESOURCE_NAME
● PROFILE_IMAGE
● PROFILE_BACKGROUND
● COMPANY_IMAGE
● ….
If a particular type is used, then the corresponding entity is populated by the server.
● PROFILE_XXX types will populate the profile field for example with the corresponding profile.
● URL type will populate the image URL
● RESOURCE_NAME will populate the pre-canned resource name.
Rendering Images
● Infra code extracts Image URL out of ImageViewModel
● Load into platform specific image view.
One Attribute: Regular ImageView
Multiple Attributes: GridImageView
Performance considerations
Entities may repeat multiple times within the same notification causing payload size bloat.
Tim’s Profile in ImageViewModel Tim’s Profile in TextViewModel
Solution: Response Normalization
All canonical entities have a unique ID. Use a JSON API like response format.
{
“data” : {
“Profile”: “profile:123”, ...
},
“included”: [
{
“id” : “profile:123”, “firstName” : “Tim”, “LastName” : “Jurka”, ... }
},
....
]
}
Performance considerations (Continued)
All fields from the entities may not be used.
ImageURL First Name and Last Name
Solution: Deco
Deco is a LinkedIn framework that allows selective projection and decoration of fields.
Profile in TextViewModel
ID
FirstName
LastName
Profile in ImageViewModel
ID
ImageURL
Profile in Response
ID
FirstName
LastName
ImageURL
Results
Improved Developer and Product Velocity
9 new notification types in all of 2016
16 new notification types in May and June 2017
API model reduction
42 API models for old UI
6 API models for new UI
Code size reduction
15k LOC app and test code for old UI
3k LOC app and test code for new UI
Future Direction
● Extend to other pages in Flagship
● Extend to other LinkedIn apps like JobSeeker, Recruiter etc.
Out of scope for this talk
● Intricate details of client side consistency management
● Generic Modeling of actions
● Challenges in migrating from the old notifications API to the new one
Find us after the talk, and we’re happy to chat about this and more.
Q & A
​amodi@linkedin.com
​https://www.linkedin.com/in/modiaditya/
​
​Aditya Modi
​kramgopal@linkedin.com
​https://www.linkedin.com/in/karthikrg/
​
​
​Karthik Ramgopal
Ad

More Related Content

What's hot (20)

Web Apps atop a Content Repository
Web Apps atop a Content RepositoryWeb Apps atop a Content Repository
Web Apps atop a Content Repository
Gabriel Walt
 
Codemotion 2013 - Designing complex applications using html5 and knockoutjs
Codemotion 2013 - Designing complex applications using html5 and knockoutjsCodemotion 2013 - Designing complex applications using html5 and knockoutjs
Codemotion 2013 - Designing complex applications using html5 and knockoutjs
Fabio Franzini
 
Office 2013 loves web developers slide
Office 2013 loves web developers   slideOffice 2013 loves web developers   slide
Office 2013 loves web developers slide
Fabio Franzini
 
Dineshotham Kumar Khambhammettu
Dineshotham Kumar KhambhammettuDineshotham Kumar Khambhammettu
Dineshotham Kumar Khambhammettu
Dineshotham Kumar Khambhammettu
 
Sid K
Sid KSid K
Sid K
Sid K
 
Sviluppare app per office
Sviluppare app per officeSviluppare app per office
Sviluppare app per office
Fabio Franzini
 
Deep dive into SharePoint 2013 hosted apps - Chris OBrien
Deep dive into SharePoint 2013 hosted apps - Chris OBrienDeep dive into SharePoint 2013 hosted apps - Chris OBrien
Deep dive into SharePoint 2013 hosted apps - Chris OBrien
Chris O'Brien
 
tTecniche di sviluppo mobile per share point 2013 e office 365
tTecniche di sviluppo mobile per share point 2013 e office 365 tTecniche di sviluppo mobile per share point 2013 e office 365
tTecniche di sviluppo mobile per share point 2013 e office 365
Fabio Franzini
 
JavaCro'15 - Web UI best practice integration with Java EE 7 - Peter Lehto
JavaCro'15 - Web UI best practice integration with Java EE 7 - Peter LehtoJavaCro'15 - Web UI best practice integration with Java EE 7 - Peter Lehto
JavaCro'15 - Web UI best practice integration with Java EE 7 - Peter Lehto
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Picking the Right Node.js Framework for Your Use Case
Picking the Right Node.js Framework for Your Use CasePicking the Right Node.js Framework for Your Use Case
Picking the Right Node.js Framework for Your Use Case
Jimmy Guerrero
 
SPCA2013 - Building Windows Client Applications for SharePoint 2013
SPCA2013 - Building Windows Client Applications for SharePoint 2013SPCA2013 - Building Windows Client Applications for SharePoint 2013
SPCA2013 - Building Windows Client Applications for SharePoint 2013
NCCOMMS
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
aswapnal
 
Spring Mvc
Spring MvcSpring Mvc
Spring Mvc
ifnu bima
 
Optimizing HTML5 Sites with CQ5/WEM
Optimizing HTML5 Sites with CQ5/WEMOptimizing HTML5 Sites with CQ5/WEM
Optimizing HTML5 Sites with CQ5/WEM
Gabriel Walt
 
Neeraja ganesh fs-v1
Neeraja ganesh fs-v1Neeraja ganesh fs-v1
Neeraja ganesh fs-v1
Neeraja Ganesh
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
Abhishek Sur
 
Vaadin, Rich Web Apps in Server-Side Java without Plug-ins or JavaScript: Joo...
Vaadin, Rich Web Apps in Server-Side Java without Plug-ins or JavaScript: Joo...Vaadin, Rich Web Apps in Server-Side Java without Plug-ins or JavaScript: Joo...
Vaadin, Rich Web Apps in Server-Side Java without Plug-ins or JavaScript: Joo...
jaxconf
 
Krishnagopal Thogiti_Java
Krishnagopal Thogiti_JavaKrishnagopal Thogiti_Java
Krishnagopal Thogiti_Java
Krishnagopal Thogiti
 
Externalizing Chatter Using Heroku, Angular.js, Node.js and Chatter REST APIs
Externalizing Chatter Using Heroku, Angular.js, Node.js and Chatter REST APIsExternalizing Chatter Using Heroku, Angular.js, Node.js and Chatter REST APIs
Externalizing Chatter Using Heroku, Angular.js, Node.js and Chatter REST APIs
Salesforce Developers
 
Bala Sr Java Developer
Bala  Sr Java DeveloperBala  Sr Java Developer
Bala Sr Java Developer
Java Dev
 
Web Apps atop a Content Repository
Web Apps atop a Content RepositoryWeb Apps atop a Content Repository
Web Apps atop a Content Repository
Gabriel Walt
 
Codemotion 2013 - Designing complex applications using html5 and knockoutjs
Codemotion 2013 - Designing complex applications using html5 and knockoutjsCodemotion 2013 - Designing complex applications using html5 and knockoutjs
Codemotion 2013 - Designing complex applications using html5 and knockoutjs
Fabio Franzini
 
Office 2013 loves web developers slide
Office 2013 loves web developers   slideOffice 2013 loves web developers   slide
Office 2013 loves web developers slide
Fabio Franzini
 
Sid K
Sid KSid K
Sid K
Sid K
 
Sviluppare app per office
Sviluppare app per officeSviluppare app per office
Sviluppare app per office
Fabio Franzini
 
Deep dive into SharePoint 2013 hosted apps - Chris OBrien
Deep dive into SharePoint 2013 hosted apps - Chris OBrienDeep dive into SharePoint 2013 hosted apps - Chris OBrien
Deep dive into SharePoint 2013 hosted apps - Chris OBrien
Chris O'Brien
 
tTecniche di sviluppo mobile per share point 2013 e office 365
tTecniche di sviluppo mobile per share point 2013 e office 365 tTecniche di sviluppo mobile per share point 2013 e office 365
tTecniche di sviluppo mobile per share point 2013 e office 365
Fabio Franzini
 
Picking the Right Node.js Framework for Your Use Case
Picking the Right Node.js Framework for Your Use CasePicking the Right Node.js Framework for Your Use Case
Picking the Right Node.js Framework for Your Use Case
Jimmy Guerrero
 
SPCA2013 - Building Windows Client Applications for SharePoint 2013
SPCA2013 - Building Windows Client Applications for SharePoint 2013SPCA2013 - Building Windows Client Applications for SharePoint 2013
SPCA2013 - Building Windows Client Applications for SharePoint 2013
NCCOMMS
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
aswapnal
 
Optimizing HTML5 Sites with CQ5/WEM
Optimizing HTML5 Sites with CQ5/WEMOptimizing HTML5 Sites with CQ5/WEM
Optimizing HTML5 Sites with CQ5/WEM
Gabriel Walt
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
Abhishek Sur
 
Vaadin, Rich Web Apps in Server-Side Java without Plug-ins or JavaScript: Joo...
Vaadin, Rich Web Apps in Server-Side Java without Plug-ins or JavaScript: Joo...Vaadin, Rich Web Apps in Server-Side Java without Plug-ins or JavaScript: Joo...
Vaadin, Rich Web Apps in Server-Side Java without Plug-ins or JavaScript: Joo...
jaxconf
 
Externalizing Chatter Using Heroku, Angular.js, Node.js and Chatter REST APIs
Externalizing Chatter Using Heroku, Angular.js, Node.js and Chatter REST APIsExternalizing Chatter Using Heroku, Angular.js, Node.js and Chatter REST APIs
Externalizing Chatter Using Heroku, Angular.js, Node.js and Chatter REST APIs
Salesforce Developers
 
Bala Sr Java Developer
Bala  Sr Java DeveloperBala  Sr Java Developer
Bala Sr Java Developer
Java Dev
 

Similar to Frontend APIs powering fast paced product iterations (20)

Dust.js
Dust.jsDust.js
Dust.js
Yevgeniy Brikman
 
Resume latest Update
Resume latest UpdateResume latest Update
Resume latest Update
Vaibhav soni
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titanium
Naga Harish M
 
Sibananda_DotNet
Sibananda_DotNetSibananda_DotNet
Sibananda_DotNet
Sibananda Jena
 
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator Titanium
Techday7
 
Angular js firebase-preso
Angular js firebase-presoAngular js firebase-preso
Angular js firebase-preso
Avinash Kondagunta
 
GraphQL: The Missing Link Between Frontend and Backend Devs
GraphQL: The Missing Link Between Frontend and Backend DevsGraphQL: The Missing Link Between Frontend and Backend Devs
GraphQL: The Missing Link Between Frontend and Backend Devs
Sashko Stubailo
 
Introduction to Backend Development (1).pptx
Introduction to Backend Development (1).pptxIntroduction to Backend Development (1).pptx
Introduction to Backend Development (1).pptx
OsuGodbless
 
icv
icvicv
icv
Imran Raza
 
Resume_Vivek_Bishnoi
Resume_Vivek_BishnoiResume_Vivek_Bishnoi
Resume_Vivek_Bishnoi
vivek bishnoi
 
Are API Services Taking Over All the Interesting Data Science Problems?
Are API Services Taking Over All the Interesting Data Science Problems?Are API Services Taking Over All the Interesting Data Science Problems?
Are API Services Taking Over All the Interesting Data Science Problems?
IDEAS - Int'l Data Engineering and Science Association
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontend
Vlad Fedosov
 
ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...
ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...
ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...
European Collaboration Summit
 
Sudhir srivastava profile
Sudhir srivastava profileSudhir srivastava profile
Sudhir srivastava profile
Sudhir Srivastava
 
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB
 
Evolving your Data Access with MongoDB Stitch - Drew Di Palma
Evolving your Data Access with MongoDB Stitch - Drew Di PalmaEvolving your Data Access with MongoDB Stitch - Drew Di Palma
Evolving your Data Access with MongoDB Stitch - Drew Di Palma
MongoDB
 
VidyaBhooshanMishra_CV
VidyaBhooshanMishra_CVVidyaBhooshanMishra_CV
VidyaBhooshanMishra_CV
Landis+Gyr
 
MongoDB.local Sydney: Evolving your Data Access with MongoDB Stitch
MongoDB.local Sydney: Evolving your Data Access with MongoDB StitchMongoDB.local Sydney: Evolving your Data Access with MongoDB Stitch
MongoDB.local Sydney: Evolving your Data Access with MongoDB Stitch
MongoDB
 
Funky serverless features at aws
Funky serverless features at awsFunky serverless features at aws
Funky serverless features at aws
Doug Winter
 
Running Data Platforms Like Products
Running Data Platforms Like ProductsRunning Data Platforms Like Products
Running Data Platforms Like Products
VMware Tanzu
 
Resume latest Update
Resume latest UpdateResume latest Update
Resume latest Update
Vaibhav soni
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titanium
Naga Harish M
 
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator Titanium
Techday7
 
GraphQL: The Missing Link Between Frontend and Backend Devs
GraphQL: The Missing Link Between Frontend and Backend DevsGraphQL: The Missing Link Between Frontend and Backend Devs
GraphQL: The Missing Link Between Frontend and Backend Devs
Sashko Stubailo
 
Introduction to Backend Development (1).pptx
Introduction to Backend Development (1).pptxIntroduction to Backend Development (1).pptx
Introduction to Backend Development (1).pptx
OsuGodbless
 
Resume_Vivek_Bishnoi
Resume_Vivek_BishnoiResume_Vivek_Bishnoi
Resume_Vivek_Bishnoi
vivek bishnoi
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontend
Vlad Fedosov
 
ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...
ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...
ECS19 - Bill Ayers - UNLOCK YOUR BUSINESS KNOWLEDGE WITH THE MICROSOFT GRAPH,...
European Collaboration Summit
 
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB
 
Evolving your Data Access with MongoDB Stitch - Drew Di Palma
Evolving your Data Access with MongoDB Stitch - Drew Di PalmaEvolving your Data Access with MongoDB Stitch - Drew Di Palma
Evolving your Data Access with MongoDB Stitch - Drew Di Palma
MongoDB
 
VidyaBhooshanMishra_CV
VidyaBhooshanMishra_CVVidyaBhooshanMishra_CV
VidyaBhooshanMishra_CV
Landis+Gyr
 
MongoDB.local Sydney: Evolving your Data Access with MongoDB Stitch
MongoDB.local Sydney: Evolving your Data Access with MongoDB StitchMongoDB.local Sydney: Evolving your Data Access with MongoDB Stitch
MongoDB.local Sydney: Evolving your Data Access with MongoDB Stitch
MongoDB
 
Funky serverless features at aws
Funky serverless features at awsFunky serverless features at aws
Funky serverless features at aws
Doug Winter
 
Running Data Platforms Like Products
Running Data Platforms Like ProductsRunning Data Platforms Like Products
Running Data Platforms Like Products
VMware Tanzu
 
Ad

Recently uploaded (20)

FL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full VersionFL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full Version
tahirabibi60507
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Ranjan Baisak
 
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
Egor Kaleynik
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025
kashifyounis067
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]
saniaaftab72555
 
Shift Left using Lean for Agile Software Development
Shift Left using Lean for Agile Software DevelopmentShift Left using Lean for Agile Software Development
Shift Left using Lean for Agile Software Development
SathyaShankar6
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Maxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINKMaxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINK
younisnoman75
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
FL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full VersionFL Studio Producer Edition Crack 2025 Full Version
FL Studio Producer Edition Crack 2025 Full Version
tahirabibi60507
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Ranjan Baisak
 
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
Egor Kaleynik
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025
kashifyounis067
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]
saniaaftab72555
 
Shift Left using Lean for Agile Software Development
Shift Left using Lean for Agile Software DevelopmentShift Left using Lean for Agile Software Development
Shift Left using Lean for Agile Software Development
SathyaShankar6
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Maxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINKMaxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINK
younisnoman75
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Ad

Frontend APIs powering fast paced product iterations

  • 2. Speakers ​Jeff Weiner ​Chief Executive Officer ​Aditya Modi ​Staff Software Engineer ​Karthik Ramgopal ​Sr Staff Software Engineer
  • 3. Overview History and evolution of frontend APIs at LinkedIn Our API structure today Learnings and results Sneak peek at the future
  • 5. Mobile v/s Desktop Feed on mobile Feed on desktopFeed on iPad
  • 6. Client - Server setup mobile-frontend-API tablet-frontend-API homepage-frontend-API profile-frontend-API Android iOS Tablet homepage-desktop-web profile-desktop-web
  • 7. • Huge API surface and diversity • No IDL/schema backing API • Slow iteration speed Problems?
  • 9. Mobile v/s Desktop Feed on mobile Feed on desktopFeed on iPad
  • 10. Client - Server setup flagship-frontend-API flagship-android flagship-iOS flagship-desktop-webflagship-mobile-web Rest + JSON over HTTP2 Mid-tier . . . . Mid-tier
  • 11. • > 120k QPS • ~425 developers • ~30 commits per day Scale
  • 12. • Automated continuous release • commit to production in < 3 hours • 3 deployments a day 3x3 Deployment
  • 14. • Backed by Strongly Typed Schemas • Backward-compatible evolution • No endpoint versioning Principles
  • 15. { "type": "record", "name": "TestRecord", "namespace": "com.linkedin.test", "doc": "Test", "fields": [ { "name": "id", "type": "String", "doc": "ID" }, { "name": "name", "type": "String", "doc": "Name", “optional”: true }, ] } @interface TestRecord : NSObject @property(nonnull, copy) NSString *id; @property(nullable, copy) NSString *name; @end class TestRecord { @NonNull public final String id; @Nullable public final String name; } export default DS.Model.extend({ id: DS.attr(‘string’), name: DS.attr(‘string’) }); Schema definition iOS Android Web
  • 16. Entity Modeling • Return - Collection<Card>
  • 17. Composite screens ● Two top level resources ■ Invitations ■ PYMK (People You May Know) ● 1 network call to fetch both resources ■ Infrastructure level aggregation support
  • 18. • Easy to model • Decouple API from UI • Client side consistency Advantages
  • 20. Client side consistency • Why ? ○ Good UX ○ Optimistic writes
  • 21. Client side consistency Can you do this auto-magically?
  • 26. Takes a long time to ship a feature API Server 1.5 weeks iOS 2 weeks Android 2 weeks Web 2 weeks Total time 3.5 weeks=+ Use case: Introduce a new kind of notification
  • 27. • Create new models for every feature • Write code on each client platform • Wait for native app release/adoption Why so long?
  • 29. • Quickly build and release notifications • Increase user engagement • Sweet and sticky, just like honey! Project Honeycomb
  • 30. • New notifications WITHOUT app updates • Client side consistency • Stellar runtime performance Beyond iteration speed...
  • 31. • Model based on how the UI view looks • Similar views grouped into 1 template • More UI specific logic on API server View Template API
  • 32. Share notification Share Template ● PrimaryImage: URL? ● Title: AttributedString ● Timestamp: Long ● ShareImage: URL? ● ShareTitle: String ● LikeCount: Long? (Default: 0) ● CommentCount: Long? (Default: 0)
  • 33. Now let’s look at a slightly different notification Modify Share Template ● PrimaryImage: URL? ● Title: AttributedString ● Timestamp: Long ● ShareImage: URL? ● ShareTitle: String AttributedString ● ShareSubtitle: AttributedString? ● LikeCount: Long? (Default: 0) ● CommentCount: Long? (Default: 0)
  • 34. How about something radically different? Work Anniversary Template ● PrimaryImage: URL? ● Title: AttributedString ● Timestamp: Long
  • 35. Something slightly different again? Work Anniversary/New Position Template ● PrimaryImage: URL? ● Title: AttributedString ● Timestamp: Long ● BodyText: AttributedString?
  • 36. How do we return a heterogeneous list? • Use Rest.li paginated collections. Differentiate between items using a Union. • JSON payload structure: { “elements” : [ {“Share”: {“Title”: “Sarah Clatterbuck shared a…”, ...}}, {“Anniversary”: {“Title”: “Congratulate Nitish Jha…”, ...}}, .... ], “paging”: { “start” : 0, “count”: 10, “paginationToken”: “xydsad”} }
  • 37. Minor payload optimization • Embed the type into the payload to reduce nesting. • JSON payload structure: { “elements” : [ {“Type”: “Share”, “Title”: “Sarah Clatterbuck shared a…”, ...}, {“Type”: “Anniversary”, “Title”: “Congratulate Nitish Jha…”, ...}, .... ], “paging”: { “start” : 0, “count”: 10, “paginationToken”: “xydsad”} }
  • 38. • Code-generated response parser • Bind model to native views • Write once* per layout, reuse. Client side rendering
  • 39. Backward compatibility { “elements” : [ {“Stat”: {“Title”: “Your Profile...”, ...}}, {“JYMBII”: {“Title”: “5 Jobs you”, ...}}, {“Share”: {“Title”: “Swati Mathur...”, ...}}, .... ], “paging”: { “start” : 0, “count”: 10, “paginationToken”: “xydsad”} } Drop unknown notification types.
  • 40. Backward compatibility Drop unknown fields based on product needs.
  • 41. • New notification types without client changes • Renders faster on the client Benefits
  • 42. But… Client side Consistency is lost!
  • 43. How do we solve this?
  • 44. How did we solve the AttributedString problem? • Model formatted text • Control formatting from the server • Impractical to use HTML AttributedString
  • 45. AttributedString schema AttributedString ● Text: String ● Attributes: List[Attribute] BOLD, ITALIC, UNDERLINE etc. Attribute ● Type: AttributeType ● StartIndex: Int ● Length: Int ● Metadata: Any?
  • 46. Platform specific binding Infrastructure provided support iOS Android Web NSAttributedString Spannable HTML AttributedString
  • 47. What if we extended this concept to entity mentions? Model entity mentions also as a custom formatting specifier. Profile mention Profile mention
  • 48. Introducing TextViewModel TextViewModel ● Text: String ● Attributes: List[TextViewAttribute] TextViewAttribute ● Type: TextViewAttributeType ● StartIndex: Int ● Length: Int ● Metadata: Any? ● Profile: Profile? ● Job: Job? ● Company: Company? ● Course: Course? Flattened canonical entities as optional fields Similar to AttributedString
  • 49. Entity mentions Entities could be mentioned in different ways. First Name Full Name Position
  • 50. TextViewAttributeType TextViewAttributeType ● PROFILE_FIRST_NAME ● PROFILE_FULL_NAME ● PROFILE_HEADLINE ● PROFILE_DISTANCE ● COMPANY_NAME ● COMPANY_HEADLINE ● JOB_TITLE ● …. If a particular type is used, then the corresponding entity is populated by the server. ● PROFILE_XXX types will populate the profile field for example with the corresponding profile.
  • 51. Backward compatibility++ Old clients cannot handle new mention types. Always send Raw text though redundant. { “title” : { “Text”: “Sarah Clatterbuck shared this”, “Attributes”: [ {“Type”: “PROFILE_FULL_NAME”, “StartIndex”: 0….} ] } }
  • 52. • Singular and Plurals • Possessive forms • i10n and i18n Watch Out
  • 53. How about images? Use the same concept as TextViewModel. Introduce ImageViewModel. ImageViewModel ● Attributes: List[ImageViewAttribute] ImageViewAttribute ● ImageViewAttributeType ● URL: URL? ● ResourceName: String? ● Profile: Profile? ● Job: Job? ● Company: Company? ● Course: Course? Flattened canonical entities as optional fields
  • 54. ImageViewAttributeType ImageViewAttributeType ● URL ● RESOURCE_NAME ● PROFILE_IMAGE ● PROFILE_BACKGROUND ● COMPANY_IMAGE ● …. If a particular type is used, then the corresponding entity is populated by the server. ● PROFILE_XXX types will populate the profile field for example with the corresponding profile. ● URL type will populate the image URL ● RESOURCE_NAME will populate the pre-canned resource name.
  • 55. Rendering Images ● Infra code extracts Image URL out of ImageViewModel ● Load into platform specific image view. One Attribute: Regular ImageView Multiple Attributes: GridImageView
  • 56. Performance considerations Entities may repeat multiple times within the same notification causing payload size bloat. Tim’s Profile in ImageViewModel Tim’s Profile in TextViewModel
  • 57. Solution: Response Normalization All canonical entities have a unique ID. Use a JSON API like response format. { “data” : { “Profile”: “profile:123”, ... }, “included”: [ { “id” : “profile:123”, “firstName” : “Tim”, “LastName” : “Jurka”, ... } }, .... ] }
  • 58. Performance considerations (Continued) All fields from the entities may not be used. ImageURL First Name and Last Name
  • 59. Solution: Deco Deco is a LinkedIn framework that allows selective projection and decoration of fields. Profile in TextViewModel ID FirstName LastName Profile in ImageViewModel ID ImageURL Profile in Response ID FirstName LastName ImageURL
  • 61. Improved Developer and Product Velocity 9 new notification types in all of 2016 16 new notification types in May and June 2017
  • 62. API model reduction 42 API models for old UI 6 API models for new UI
  • 63. Code size reduction 15k LOC app and test code for old UI 3k LOC app and test code for new UI
  • 64. Future Direction ● Extend to other pages in Flagship ● Extend to other LinkedIn apps like JobSeeker, Recruiter etc.
  • 65. Out of scope for this talk ● Intricate details of client side consistency management ● Generic Modeling of actions ● Challenges in migrating from the old notifications API to the new one Find us after the talk, and we’re happy to chat about this and more.
  • 66. Q & A ​[email protected] ​https://www.linkedin.com/in/modiaditya/ ​ ​Aditya Modi ​[email protected] ​https://www.linkedin.com/in/karthikrg/ ​ ​ ​Karthik Ramgopal