SlideShare a Scribd company logo
Mobile API
                             Design & Techniques.
                             Fred Brunel
                             CTO




Wednesday, 29 February, 12
Wednesday, 29 February, 12
Wednesday, 29 February, 12
Wednesday, 29 February, 12
Why?




Wednesday, 29 February, 12
Though for CPU power
                             Though for bandwidth
                             Lazy designed.
                             Too close to database.


Wednesday, 29 February, 12
A mobile device is
                             Low powered
                             Low bandwidth
                             Runs on battery!


Wednesday, 29 February, 12
A the network is the
                             weak link.




Wednesday, 29 February, 12
Network conditions
                             change in real-time.




Wednesday, 29 February, 12
We want to keep the
                             best user experience
                             at all time.
                             Nobody wants an
                             unresponsive app.
Wednesday, 29 February, 12
The features of an
                             API has a huge
                             impact on
                             performances.


Wednesday, 29 February, 12
An API is a contract
                             that dictates what
                             can or cannot be
                             done (directly).


Wednesday, 29 February, 12
When the API is too
                             lazy, or incomplete;
                             the burden is put on
                             the mobile app.


Wednesday, 29 February, 12
Any workaround put
                             a stress on the
                             mobile app to use
                             too much network.


Wednesday, 29 February, 12
API = User Interface.

                             Should be simple and
                             get the job done. Fast.


Wednesday, 29 February, 12
Landlord Report.



Wednesday, 29 February, 12
Simple




                      Standard   Complete
Wednesday, 29 February, 12
Simple




                             SOAP
        WS-*
                      Standard                      Complete
           XML-RPC                  Pure REST
Wednesday, 29 February, 12
Simple




                                 Complete
Wednesday, 29 February, 12
Trust the OSI model.
                             Works everywhere.
                             And it’s plenty enough.

                             http://en.wikipedia.org/wiki/OSI_model




Wednesday, 29 February, 12
REST-ish API + JSON

                             Pure REST is a nice to
                             have but not a goal.


Wednesday, 29 February, 12
GET/POST + Action +
                             Params is fine.

                             PUT/DELETE are nice
                             to have.
Wednesday, 29 February, 12
Twitter is also REST-ish

                             POST statuses/create
                             POST statuses/destroy/:id
                             POST statuses/update



Wednesday, 29 February, 12
REST put an emphasis
                             on actions applied to
                             resources; but the
                             issue is the
                             representation.
Wednesday, 29 February, 12
Simplify the life of the
                             implementor.
                             Be pragmatic.



Wednesday, 29 February, 12
When designing your
                             API payloads, pay
                             attention to
                             consistency and
                             completeness.
Wednesday, 29 February, 12
Consistency means
                             developer know what
                             to expect.
                             Principle of least
                             astonishment.
Wednesday, 29 February, 12
Completeness means
                             less roundtrips.




Wednesday, 29 February, 12
HTTP latency on 3G

                             ~ 1 second.

                             Every request count.
Wednesday, 29 February, 12
API is NOT a CRUD
                             interface to your SQL
                             database.

                             It’s a facade.
Wednesday, 29 February, 12
Facade
                             App                        Database
                                           API

                                           Data
                             Display                     Raw Data
                                       Representation




Wednesday, 29 February, 12
The facade answer to
                             high-level questions.

                             Think services, not
                             objects and methods.
Wednesday, 29 February, 12
So, how do we start
                             from here?




Wednesday, 29 February, 12
Most of the time, a
                             mobile API will be use
                             to get information to
                             be displayed on a
                             screen.
Wednesday, 29 February, 12
Reverse Design.

                             Start from the UI
                             Not the data


Wednesday, 29 February, 12
1. Think screens
                             2.Entities to display
                             3.Design entity models
                             4.Design services


Wednesday, 29 February, 12
Wednesday, 29 February, 12
ID
                             Title
                             Town
                             Country
                             Rating
                             Thumbnail URL
                             Geocode
                             Website
                             Email
                             Description

Wednesday, 29 February, 12
Then, format the
                             representation to be as
                             efficient as possible.



Wednesday, 29 February, 12
Each JSON entity
                             should have the same
                             consistent
                             representation.


Wednesday, 29 February, 12
"person": {
                               "id": 1234,
                               "name": "Fred",
                               "lastname": "Brunel",
                               "company": "WhereCloud"
                             }




Wednesday, 29 February, 12
"book": {
                               "name": "Steve Jobs",
                               "author": "Walter Isaacson",
                               "lenders" = [{
                                   "person_id": 1234,
                                   "person_name": "Fred",
                                   "person_lastname": "Brunel"
                               }]
                             }
                                                          BAD
Wednesday, 29 February, 12
"book": {
                               "name": "Steve Jobs",
                               "author": "Walter Isaacson",
                               "lenders" = [{
                                   "id": 1234,
                                   "name": "Fred",
                                   "lastname": "Brunel"
                               }]
                             }
                                                      GOOD
Wednesday, 29 February, 12
...
                             "user_mentions": [{
                                 "id": 22548447,
                                 "id_str": "22548447",
                                 "screen_name": "rno",
                                 "name": "Arnaud Meunier",
                                 "indices": [0, 4]
                             ]}
                             ...




Wednesday, 29 February, 12
Pick the right
                             granularity.

                             Denormalize!


Wednesday, 29 February, 12
"result": {
                               ...
                               "categories" = [{ "id": 2 }],
                               "images": [{ "id": 317171 }],
                               "tags": [{ "id": 555 }]
                               ...
                             }




Wednesday, 29 February, 12
"result": {
                               ...
                               "categories": [{
                                 "id": 2
                                 "name" = "food"
                               }],
                               "images" = [{
                                 "id": 317171
                                 "url": "http://image.com/a.png"
                               }], ...
                             }

Wednesday, 29 February, 12
Denormalize the most
                             common fields.
                             Avoid unnecessary
                             roundtrips.


Wednesday, 29 February, 12
Don’t make the app
                             connects to 10 3rd-
                             party systems.
                             Aggregate on the
                             backend.
Wednesday, 29 February, 12
The backend has the
                             power, bandwidth
                             and knowledge.
                             Use it!


Wednesday, 29 February, 12
Make it fast!

                             Some good techniques
                             to be aware of.


Wednesday, 29 February, 12
JSON is fast to parse,
                             but still, compress
                             everything.



Wednesday, 29 February, 12
Use Cache-Control on
                             every response that
                             can be cached.



Wednesday, 29 February, 12
Partial Responses &
                             Partial Updates

                             Let the client decides
                             what to get/update.
Wednesday, 29 February, 12
GET
                             http://www.google.com/calendar/
                             feeds/zachpm@google.com/private/
                             full?fields=entry(title,gd:when)




Wednesday, 29 February, 12
PATCH /myfeed/1/1/
                             Content-Type: application/xml

                             <entry
                               xmlns='http://www.w3.org/2005/Atom'
                               xmlns:gd='http://schemas.google...'
                               gd:fields='description'>
                               <title>New title</title>
                             </entry>




Wednesday, 29 February, 12
Batch Requests

                             Send multiple
                             operations, get one
                             answer.
Wednesday, 29 February, 12
Persistent
                             Connections.

                             Keep a connection
                             nailed up.
Wednesday, 29 February, 12
“If you’re serious
                             about network, you
                             should make your
                             own protocol.”
                             —Fake Alan Kay.



Wednesday, 29 February, 12
The fabric of the
                             Internet is TCP/IP, not
                             HTTP.



Wednesday, 29 February, 12
Make your own
                             Binary Protocol.

                             Lot faster than text +
                             compression. Sorry!
Wednesday, 29 February, 12
Message-based API

                             Custom TLV
                             MessagePack
                             ProtocolBuffers
Wednesday, 29 February, 12
a message

                             TAG         LENGTH                  VALUE
                             16 bits       32 bits               n bits




                                 TLV     TLV      TLV      TLV      TLV



                                 TLV     TLV      TLV      TLV      TLV


                                       messages streaming



Wednesday, 29 February, 12
message Person {
                               required string name = 1;
                               required int32 id = 2;
                               optional string email = 3;

                                 enum PhoneType {
                                   MOBILE = 0;
                                   HOME = 1;
                                   WORK = 2;
                                 }

                                 message PhoneNumber {
                                   required string number = 1;
                                   optional PhoneType type = 2 [default = HOME];
                                 }

                                 repeated PhoneNumber phone = 4;
                             }




Wednesday, 29 February, 12
Person person;
                             person.set_name("John Doe");
                             person.set_id(1234);
                             person.set_email("jdoe@example.com");
                             fstream output("myfile", ios::out | ios::binary);
                             person.SerializeToOstream(&output);



                             fstream input("myfile", ios::in | ios::binary);
                             Person person;
                             person.ParseFromIstream(&input);
                             cout << "Name: " << person.name() << endl;
                             cout << "E-mail: " << person.email() << endl;




Wednesday, 29 February, 12
So.

                             They are tons of
                             efficient solutions
                             and techniques.
Wednesday, 29 February, 12
Remember.
                             Be pragmatic.
                             Be consistent
                             Be complete.
                             Be fast.
Wednesday, 29 February, 12
Thank you.


                             twitter.com/fbrunel
                             fred@wherecloud.com

Wednesday, 29 February, 12

More Related Content

Viewers also liked

Mobile Api and Caching
Mobile Api and CachingMobile Api and Caching
Mobile Api and Caching
New Relic
 
Mobile API: Design & Techniques
Mobile API: Design & TechniquesMobile API: Design & Techniques
Mobile API: Design & Techniques
Fred Brunel
 
Data to Go: Mobile API Design (SXSW)
Data to Go: Mobile API Design (SXSW)Data to Go: Mobile API Design (SXSW)
Data to Go: Mobile API Design (SXSW)
Chuck Greb
 
Data to Go: Mobile API Design
Data to Go: Mobile API DesignData to Go: Mobile API Design
Data to Go: Mobile API Design
Chuck Greb
 
Build a REST API for your Mobile Apps using Node.js
Build a REST API for your Mobile Apps using Node.jsBuild a REST API for your Mobile Apps using Node.js
Build a REST API for your Mobile Apps using Node.js
Stormpath
 
We we should be Mobile API - First, by Brad Hipps
We we should be Mobile API - First, by Brad HippsWe we should be Mobile API - First, by Brad Hipps
We we should be Mobile API - First, by Brad Hipps
Puerto Rico Tech Summit
 
Designing API for mobile apps (MobileWarsaw 19.01.2015)
Designing API for mobile apps (MobileWarsaw 19.01.2015)Designing API for mobile apps (MobileWarsaw 19.01.2015)
Designing API for mobile apps (MobileWarsaw 19.01.2015)
Wojtek Erbetowski
 
Build Features, Not Apps
Build Features, Not AppsBuild Features, Not Apps
Build Features, Not Apps
Natasha Murashev
 

Viewers also liked (8)

Mobile Api and Caching
Mobile Api and CachingMobile Api and Caching
Mobile Api and Caching
 
Mobile API: Design & Techniques
Mobile API: Design & TechniquesMobile API: Design & Techniques
Mobile API: Design & Techniques
 
Data to Go: Mobile API Design (SXSW)
Data to Go: Mobile API Design (SXSW)Data to Go: Mobile API Design (SXSW)
Data to Go: Mobile API Design (SXSW)
 
Data to Go: Mobile API Design
Data to Go: Mobile API DesignData to Go: Mobile API Design
Data to Go: Mobile API Design
 
Build a REST API for your Mobile Apps using Node.js
Build a REST API for your Mobile Apps using Node.jsBuild a REST API for your Mobile Apps using Node.js
Build a REST API for your Mobile Apps using Node.js
 
We we should be Mobile API - First, by Brad Hipps
We we should be Mobile API - First, by Brad HippsWe we should be Mobile API - First, by Brad Hipps
We we should be Mobile API - First, by Brad Hipps
 
Designing API for mobile apps (MobileWarsaw 19.01.2015)
Designing API for mobile apps (MobileWarsaw 19.01.2015)Designing API for mobile apps (MobileWarsaw 19.01.2015)
Designing API for mobile apps (MobileWarsaw 19.01.2015)
 
Build Features, Not Apps
Build Features, Not AppsBuild Features, Not Apps
Build Features, Not Apps
 

Similar to Mobile API Design Techniques

SOLVING BIG DATA APP DEVELOPERS BIGGEST PAINS from Structure:Data 2013
SOLVING BIG DATA APP DEVELOPERS BIGGEST PAINS from Structure:Data 2013SOLVING BIG DATA APP DEVELOPERS BIGGEST PAINS from Structure:Data 2013
SOLVING BIG DATA APP DEVELOPERS BIGGEST PAINS from Structure:Data 2013
Gigaom
 
Building a compiler in JRuby
Building a compiler in JRubyBuilding a compiler in JRuby
Building a compiler in JRuby
akinsgre
 
100% JS
100% JS100% JS
100% JS
__lucas
 
Drupal campmanila 2012 (Responsive Web in Drupal with Omega Theme)
Drupal campmanila 2012 (Responsive Web in Drupal with Omega Theme)Drupal campmanila 2012 (Responsive Web in Drupal with Omega Theme)
Drupal campmanila 2012 (Responsive Web in Drupal with Omega Theme)
Rick. Bahague
 
Function currying
Function curryingFunction currying
Function currying
Thomas Burleson
 
Reef - ESUG2011
Reef  - ESUG2011Reef  - ESUG2011
Reef - ESUG2011
Esteban Lorenzano
 
Mobile in a Nutshell
Mobile in a NutshellMobile in a Nutshell
Mobile in a Nutshell
GauntFace
 
Apachecon cassandra transport
Apachecon cassandra transportApachecon cassandra transport
Apachecon cassandra transport
zznate
 
The Future of Big Data is Relational (or why you can't escape SQL)
The Future of Big Data is Relational (or why you can't escape SQL)The Future of Big Data is Relational (or why you can't escape SQL)
The Future of Big Data is Relational (or why you can't escape SQL)
OReillyStrata
 
Mobile first responsive web design
Mobile first responsive web designMobile first responsive web design
Mobile first responsive web design
Will Hindson
 
Using Data to Drive User Experiences
Using Data to Drive User ExperiencesUsing Data to Drive User Experiences
Using Data to Drive User Experiences
Ram Parthasarathy
 
Apple Store, London 2009 02 25
Apple Store, London 2009 02 25Apple Store, London 2009 02 25
Apple Store, London 2009 02 25
ProjectWizards
 
Products = Mess - How to avoid it? By Suman Mukherjee
Products = Mess - How to avoid it?  By Suman MukherjeeProducts = Mess - How to avoid it?  By Suman Mukherjee
Products = Mess - How to avoid it? By Suman Mukherjee
WebGeek Philippines
 
Tech Tools for Meeting Professionals
Tech Tools for Meeting ProfessionalsTech Tools for Meeting Professionals
Tech Tools for Meeting Professionals
Midori Connolly
 
Making SharePoint Mobile
Making SharePoint MobileMaking SharePoint Mobile
Making SharePoint Mobile
Dachis Group Europe
 
SMART TOOLS: DISSECT, DIGEST AND DELIVER BIG DATA from Structure:Data 2012
SMART TOOLS: DISSECT, DIGEST AND DELIVER BIG DATA from Structure:Data 2012SMART TOOLS: DISSECT, DIGEST AND DELIVER BIG DATA from Structure:Data 2012
SMART TOOLS: DISSECT, DIGEST AND DELIVER BIG DATA from Structure:Data 2012
Gigaom
 

Similar to Mobile API Design Techniques (16)

SOLVING BIG DATA APP DEVELOPERS BIGGEST PAINS from Structure:Data 2013
SOLVING BIG DATA APP DEVELOPERS BIGGEST PAINS from Structure:Data 2013SOLVING BIG DATA APP DEVELOPERS BIGGEST PAINS from Structure:Data 2013
SOLVING BIG DATA APP DEVELOPERS BIGGEST PAINS from Structure:Data 2013
 
Building a compiler in JRuby
Building a compiler in JRubyBuilding a compiler in JRuby
Building a compiler in JRuby
 
100% JS
100% JS100% JS
100% JS
 
Drupal campmanila 2012 (Responsive Web in Drupal with Omega Theme)
Drupal campmanila 2012 (Responsive Web in Drupal with Omega Theme)Drupal campmanila 2012 (Responsive Web in Drupal with Omega Theme)
Drupal campmanila 2012 (Responsive Web in Drupal with Omega Theme)
 
Function currying
Function curryingFunction currying
Function currying
 
Reef - ESUG2011
Reef  - ESUG2011Reef  - ESUG2011
Reef - ESUG2011
 
Mobile in a Nutshell
Mobile in a NutshellMobile in a Nutshell
Mobile in a Nutshell
 
Apachecon cassandra transport
Apachecon cassandra transportApachecon cassandra transport
Apachecon cassandra transport
 
The Future of Big Data is Relational (or why you can't escape SQL)
The Future of Big Data is Relational (or why you can't escape SQL)The Future of Big Data is Relational (or why you can't escape SQL)
The Future of Big Data is Relational (or why you can't escape SQL)
 
Mobile first responsive web design
Mobile first responsive web designMobile first responsive web design
Mobile first responsive web design
 
Using Data to Drive User Experiences
Using Data to Drive User ExperiencesUsing Data to Drive User Experiences
Using Data to Drive User Experiences
 
Apple Store, London 2009 02 25
Apple Store, London 2009 02 25Apple Store, London 2009 02 25
Apple Store, London 2009 02 25
 
Products = Mess - How to avoid it? By Suman Mukherjee
Products = Mess - How to avoid it?  By Suman MukherjeeProducts = Mess - How to avoid it?  By Suman Mukherjee
Products = Mess - How to avoid it? By Suman Mukherjee
 
Tech Tools for Meeting Professionals
Tech Tools for Meeting ProfessionalsTech Tools for Meeting Professionals
Tech Tools for Meeting Professionals
 
Making SharePoint Mobile
Making SharePoint MobileMaking SharePoint Mobile
Making SharePoint Mobile
 
SMART TOOLS: DISSECT, DIGEST AND DELIVER BIG DATA from Structure:Data 2012
SMART TOOLS: DISSECT, DIGEST AND DELIVER BIG DATA from Structure:Data 2012SMART TOOLS: DISSECT, DIGEST AND DELIVER BIG DATA from Structure:Data 2012
SMART TOOLS: DISSECT, DIGEST AND DELIVER BIG DATA from Structure:Data 2012
 

More from Trieu Nguyen

Building Your Customer Data Platform with LEO CDP in Travel Industry.pdf
Building Your Customer Data Platform with LEO CDP in Travel Industry.pdfBuilding Your Customer Data Platform with LEO CDP in Travel Industry.pdf
Building Your Customer Data Platform with LEO CDP in Travel Industry.pdf
Trieu Nguyen
 
Building Your Customer Data Platform with LEO CDP - Spa and Hotel Business
Building Your Customer Data Platform with LEO CDP - Spa and Hotel BusinessBuilding Your Customer Data Platform with LEO CDP - Spa and Hotel Business
Building Your Customer Data Platform with LEO CDP - Spa and Hotel Business
Trieu Nguyen
 
Building Your Customer Data Platform with LEO CDP
Building Your Customer Data Platform with LEO CDP Building Your Customer Data Platform with LEO CDP
Building Your Customer Data Platform with LEO CDP
Trieu Nguyen
 
How to track and improve Customer Experience with LEO CDP
How to track and improve Customer Experience with LEO CDPHow to track and improve Customer Experience with LEO CDP
How to track and improve Customer Experience with LEO CDP
Trieu Nguyen
 
[Notes] Customer 360 Analytics with LEO CDP
[Notes] Customer 360 Analytics with LEO CDP[Notes] Customer 360 Analytics with LEO CDP
[Notes] Customer 360 Analytics with LEO CDP
Trieu Nguyen
 
Leo CDP - Pitch Deck
Leo CDP - Pitch DeckLeo CDP - Pitch Deck
Leo CDP - Pitch Deck
Trieu Nguyen
 
LEO CDP - What's new in 2022
LEO CDP  - What's new in 2022LEO CDP  - What's new in 2022
LEO CDP - What's new in 2022
Trieu Nguyen
 
Lộ trình triển khai LEO CDP cho ngành bất động sản
Lộ trình triển khai LEO CDP cho ngành bất động sảnLộ trình triển khai LEO CDP cho ngành bất động sản
Lộ trình triển khai LEO CDP cho ngành bất động sản
Trieu Nguyen
 
Why is LEO CDP important for digital business ?
Why is LEO CDP important for digital business ?Why is LEO CDP important for digital business ?
Why is LEO CDP important for digital business ?
Trieu Nguyen
 
From Dataism to Customer Data Platform
From Dataism to Customer Data PlatformFrom Dataism to Customer Data Platform
From Dataism to Customer Data Platform
Trieu Nguyen
 
Data collection, processing & organization with USPA framework
Data collection, processing & organization with USPA frameworkData collection, processing & organization with USPA framework
Data collection, processing & organization with USPA framework
Trieu Nguyen
 
Part 1: Introduction to digital marketing technology
Part 1: Introduction to digital marketing technologyPart 1: Introduction to digital marketing technology
Part 1: Introduction to digital marketing technology
Trieu Nguyen
 
Why is Customer Data Platform (CDP) ?
Why is Customer Data Platform (CDP) ?Why is Customer Data Platform (CDP) ?
Why is Customer Data Platform (CDP) ?
Trieu Nguyen
 
How to build a Personalized News Recommendation Platform
How to build a Personalized News Recommendation PlatformHow to build a Personalized News Recommendation Platform
How to build a Personalized News Recommendation Platform
Trieu Nguyen
 
How to grow your business in the age of digital marketing 4.0
How to grow your business  in the age of digital marketing 4.0How to grow your business  in the age of digital marketing 4.0
How to grow your business in the age of digital marketing 4.0
Trieu Nguyen
 
Video Ecosystem and some ideas about video big data
Video Ecosystem and some ideas about video big dataVideo Ecosystem and some ideas about video big data
Video Ecosystem and some ideas about video big data
Trieu Nguyen
 
Concepts, use cases and principles to build big data systems (1)
Concepts, use cases and principles to build big data systems (1)Concepts, use cases and principles to build big data systems (1)
Concepts, use cases and principles to build big data systems (1)
Trieu Nguyen
 
Open OTT - Video Content Platform
Open OTT - Video Content PlatformOpen OTT - Video Content Platform
Open OTT - Video Content Platform
Trieu Nguyen
 
Apache Hadoop and Spark: Introduction and Use Cases for Data Analysis
Apache Hadoop and Spark: Introduction and Use Cases for Data AnalysisApache Hadoop and Spark: Introduction and Use Cases for Data Analysis
Apache Hadoop and Spark: Introduction and Use Cases for Data Analysis
Trieu Nguyen
 
Introduction to Recommendation Systems (Vietnam Web Submit)
Introduction to Recommendation Systems (Vietnam Web Submit)Introduction to Recommendation Systems (Vietnam Web Submit)
Introduction to Recommendation Systems (Vietnam Web Submit)
Trieu Nguyen
 

More from Trieu Nguyen (20)

Building Your Customer Data Platform with LEO CDP in Travel Industry.pdf
Building Your Customer Data Platform with LEO CDP in Travel Industry.pdfBuilding Your Customer Data Platform with LEO CDP in Travel Industry.pdf
Building Your Customer Data Platform with LEO CDP in Travel Industry.pdf
 
Building Your Customer Data Platform with LEO CDP - Spa and Hotel Business
Building Your Customer Data Platform with LEO CDP - Spa and Hotel BusinessBuilding Your Customer Data Platform with LEO CDP - Spa and Hotel Business
Building Your Customer Data Platform with LEO CDP - Spa and Hotel Business
 
Building Your Customer Data Platform with LEO CDP
Building Your Customer Data Platform with LEO CDP Building Your Customer Data Platform with LEO CDP
Building Your Customer Data Platform with LEO CDP
 
How to track and improve Customer Experience with LEO CDP
How to track and improve Customer Experience with LEO CDPHow to track and improve Customer Experience with LEO CDP
How to track and improve Customer Experience with LEO CDP
 
[Notes] Customer 360 Analytics with LEO CDP
[Notes] Customer 360 Analytics with LEO CDP[Notes] Customer 360 Analytics with LEO CDP
[Notes] Customer 360 Analytics with LEO CDP
 
Leo CDP - Pitch Deck
Leo CDP - Pitch DeckLeo CDP - Pitch Deck
Leo CDP - Pitch Deck
 
LEO CDP - What's new in 2022
LEO CDP  - What's new in 2022LEO CDP  - What's new in 2022
LEO CDP - What's new in 2022
 
Lộ trình triển khai LEO CDP cho ngành bất động sản
Lộ trình triển khai LEO CDP cho ngành bất động sảnLộ trình triển khai LEO CDP cho ngành bất động sản
Lộ trình triển khai LEO CDP cho ngành bất động sản
 
Why is LEO CDP important for digital business ?
Why is LEO CDP important for digital business ?Why is LEO CDP important for digital business ?
Why is LEO CDP important for digital business ?
 
From Dataism to Customer Data Platform
From Dataism to Customer Data PlatformFrom Dataism to Customer Data Platform
From Dataism to Customer Data Platform
 
Data collection, processing & organization with USPA framework
Data collection, processing & organization with USPA frameworkData collection, processing & organization with USPA framework
Data collection, processing & organization with USPA framework
 
Part 1: Introduction to digital marketing technology
Part 1: Introduction to digital marketing technologyPart 1: Introduction to digital marketing technology
Part 1: Introduction to digital marketing technology
 
Why is Customer Data Platform (CDP) ?
Why is Customer Data Platform (CDP) ?Why is Customer Data Platform (CDP) ?
Why is Customer Data Platform (CDP) ?
 
How to build a Personalized News Recommendation Platform
How to build a Personalized News Recommendation PlatformHow to build a Personalized News Recommendation Platform
How to build a Personalized News Recommendation Platform
 
How to grow your business in the age of digital marketing 4.0
How to grow your business  in the age of digital marketing 4.0How to grow your business  in the age of digital marketing 4.0
How to grow your business in the age of digital marketing 4.0
 
Video Ecosystem and some ideas about video big data
Video Ecosystem and some ideas about video big dataVideo Ecosystem and some ideas about video big data
Video Ecosystem and some ideas about video big data
 
Concepts, use cases and principles to build big data systems (1)
Concepts, use cases and principles to build big data systems (1)Concepts, use cases and principles to build big data systems (1)
Concepts, use cases and principles to build big data systems (1)
 
Open OTT - Video Content Platform
Open OTT - Video Content PlatformOpen OTT - Video Content Platform
Open OTT - Video Content Platform
 
Apache Hadoop and Spark: Introduction and Use Cases for Data Analysis
Apache Hadoop and Spark: Introduction and Use Cases for Data AnalysisApache Hadoop and Spark: Introduction and Use Cases for Data Analysis
Apache Hadoop and Spark: Introduction and Use Cases for Data Analysis
 
Introduction to Recommendation Systems (Vietnam Web Submit)
Introduction to Recommendation Systems (Vietnam Web Submit)Introduction to Recommendation Systems (Vietnam Web Submit)
Introduction to Recommendation Systems (Vietnam Web Submit)
 

Recently uploaded

The History of Embeddings & Multimodal Embeddings
The History of Embeddings & Multimodal EmbeddingsThe History of Embeddings & Multimodal Embeddings
The History of Embeddings & Multimodal Embeddings
Zilliz
 
"Making .NET Application Even Faster", Sergey Teplyakov.pptx
"Making .NET Application Even Faster", Sergey Teplyakov.pptx"Making .NET Application Even Faster", Sergey Teplyakov.pptx
"Making .NET Application Even Faster", Sergey Teplyakov.pptx
Fwdays
 
FIDO Munich Seminar: Securing Smart Car.pptx
FIDO Munich Seminar: Securing Smart Car.pptxFIDO Munich Seminar: Securing Smart Car.pptx
FIDO Munich Seminar: Securing Smart Car.pptx
FIDO Alliance
 
Retrieval Augmented Generation Evaluation with Ragas
Retrieval Augmented Generation Evaluation with RagasRetrieval Augmented Generation Evaluation with Ragas
Retrieval Augmented Generation Evaluation with Ragas
Zilliz
 
Perth MuleSoft Meetup July 2024
Perth MuleSoft Meetup July 2024Perth MuleSoft Meetup July 2024
Perth MuleSoft Meetup July 2024
Michael Price
 
Top 12 AI Technology Trends For 2024.pdf
Top 12 AI Technology Trends For 2024.pdfTop 12 AI Technology Trends For 2024.pdf
Top 12 AI Technology Trends For 2024.pdf
Marrie Morris
 
FIDO Munich Seminar Blueprint for In-Vehicle Payment Standard.pptx
FIDO Munich Seminar Blueprint for In-Vehicle Payment Standard.pptxFIDO Munich Seminar Blueprint for In-Vehicle Payment Standard.pptx
FIDO Munich Seminar Blueprint for In-Vehicle Payment Standard.pptx
FIDO Alliance
 
Mule Experience Hub and Release Channel with Java 17
Mule Experience Hub and Release Channel with Java 17Mule Experience Hub and Release Channel with Java 17
Mule Experience Hub and Release Channel with Java 17
Bhajan Mehta
 
Keynote : AI & Future Of Offensive Security
Keynote : AI & Future Of Offensive SecurityKeynote : AI & Future Of Offensive Security
Keynote : AI & Future Of Offensive Security
Priyanka Aash
 
Choosing the Best Outlook OST to PST Converter: Key Features and Considerations
Choosing the Best Outlook OST to PST Converter: Key Features and ConsiderationsChoosing the Best Outlook OST to PST Converter: Key Features and Considerations
Choosing the Best Outlook OST to PST Converter: Key Features and Considerations
webbyacad software
 
FIDO Munich Seminar FIDO Automotive Apps.pptx
FIDO Munich Seminar FIDO Automotive Apps.pptxFIDO Munich Seminar FIDO Automotive Apps.pptx
FIDO Munich Seminar FIDO Automotive Apps.pptx
FIDO Alliance
 
AMD Zen 5 Architecture Deep Dive from Tech Day
AMD Zen 5 Architecture Deep Dive from Tech DayAMD Zen 5 Architecture Deep Dive from Tech Day
AMD Zen 5 Architecture Deep Dive from Tech Day
Low Hong Chuan
 
Generative AI technology is a fascinating field that focuses on creating comp...
Generative AI technology is a fascinating field that focuses on creating comp...Generative AI technology is a fascinating field that focuses on creating comp...
Generative AI technology is a fascinating field that focuses on creating comp...
Nohoax Kanont
 
Zaitechno Handheld Raman Spectrometer.pdf
Zaitechno Handheld Raman Spectrometer.pdfZaitechno Handheld Raman Spectrometer.pdf
Zaitechno Handheld Raman Spectrometer.pdf
AmandaCheung15
 
Camunda Chapter NY Meetup July 2024.pptx
Camunda Chapter NY Meetup July 2024.pptxCamunda Chapter NY Meetup July 2024.pptx
Camunda Chapter NY Meetup July 2024.pptx
ZachWylie3
 
Scaling Vector Search: How Milvus Handles Billions+
Scaling Vector Search: How Milvus Handles Billions+Scaling Vector Search: How Milvus Handles Billions+
Scaling Vector Search: How Milvus Handles Billions+
Zilliz
 
Redefining Cybersecurity with AI Capabilities
Redefining Cybersecurity with AI CapabilitiesRedefining Cybersecurity with AI Capabilities
Redefining Cybersecurity with AI Capabilities
Priyanka Aash
 
Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...
Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...
Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...
Zilliz
 
FIDO Munich Seminar: Strong Workforce Authn Push & Pull Factors.pptx
FIDO Munich Seminar: Strong Workforce Authn Push & Pull Factors.pptxFIDO Munich Seminar: Strong Workforce Authn Push & Pull Factors.pptx
FIDO Munich Seminar: Strong Workforce Authn Push & Pull Factors.pptx
FIDO Alliance
 
Mastering Board Best Practices: Essential Skills for Effective Non-profit Lea...
Mastering Board Best Practices: Essential Skills for Effective Non-profit Lea...Mastering Board Best Practices: Essential Skills for Effective Non-profit Lea...
Mastering Board Best Practices: Essential Skills for Effective Non-profit Lea...
OnBoard
 

Recently uploaded (20)

The History of Embeddings & Multimodal Embeddings
The History of Embeddings & Multimodal EmbeddingsThe History of Embeddings & Multimodal Embeddings
The History of Embeddings & Multimodal Embeddings
 
"Making .NET Application Even Faster", Sergey Teplyakov.pptx
"Making .NET Application Even Faster", Sergey Teplyakov.pptx"Making .NET Application Even Faster", Sergey Teplyakov.pptx
"Making .NET Application Even Faster", Sergey Teplyakov.pptx
 
FIDO Munich Seminar: Securing Smart Car.pptx
FIDO Munich Seminar: Securing Smart Car.pptxFIDO Munich Seminar: Securing Smart Car.pptx
FIDO Munich Seminar: Securing Smart Car.pptx
 
Retrieval Augmented Generation Evaluation with Ragas
Retrieval Augmented Generation Evaluation with RagasRetrieval Augmented Generation Evaluation with Ragas
Retrieval Augmented Generation Evaluation with Ragas
 
Perth MuleSoft Meetup July 2024
Perth MuleSoft Meetup July 2024Perth MuleSoft Meetup July 2024
Perth MuleSoft Meetup July 2024
 
Top 12 AI Technology Trends For 2024.pdf
Top 12 AI Technology Trends For 2024.pdfTop 12 AI Technology Trends For 2024.pdf
Top 12 AI Technology Trends For 2024.pdf
 
FIDO Munich Seminar Blueprint for In-Vehicle Payment Standard.pptx
FIDO Munich Seminar Blueprint for In-Vehicle Payment Standard.pptxFIDO Munich Seminar Blueprint for In-Vehicle Payment Standard.pptx
FIDO Munich Seminar Blueprint for In-Vehicle Payment Standard.pptx
 
Mule Experience Hub and Release Channel with Java 17
Mule Experience Hub and Release Channel with Java 17Mule Experience Hub and Release Channel with Java 17
Mule Experience Hub and Release Channel with Java 17
 
Keynote : AI & Future Of Offensive Security
Keynote : AI & Future Of Offensive SecurityKeynote : AI & Future Of Offensive Security
Keynote : AI & Future Of Offensive Security
 
Choosing the Best Outlook OST to PST Converter: Key Features and Considerations
Choosing the Best Outlook OST to PST Converter: Key Features and ConsiderationsChoosing the Best Outlook OST to PST Converter: Key Features and Considerations
Choosing the Best Outlook OST to PST Converter: Key Features and Considerations
 
FIDO Munich Seminar FIDO Automotive Apps.pptx
FIDO Munich Seminar FIDO Automotive Apps.pptxFIDO Munich Seminar FIDO Automotive Apps.pptx
FIDO Munich Seminar FIDO Automotive Apps.pptx
 
AMD Zen 5 Architecture Deep Dive from Tech Day
AMD Zen 5 Architecture Deep Dive from Tech DayAMD Zen 5 Architecture Deep Dive from Tech Day
AMD Zen 5 Architecture Deep Dive from Tech Day
 
Generative AI technology is a fascinating field that focuses on creating comp...
Generative AI technology is a fascinating field that focuses on creating comp...Generative AI technology is a fascinating field that focuses on creating comp...
Generative AI technology is a fascinating field that focuses on creating comp...
 
Zaitechno Handheld Raman Spectrometer.pdf
Zaitechno Handheld Raman Spectrometer.pdfZaitechno Handheld Raman Spectrometer.pdf
Zaitechno Handheld Raman Spectrometer.pdf
 
Camunda Chapter NY Meetup July 2024.pptx
Camunda Chapter NY Meetup July 2024.pptxCamunda Chapter NY Meetup July 2024.pptx
Camunda Chapter NY Meetup July 2024.pptx
 
Scaling Vector Search: How Milvus Handles Billions+
Scaling Vector Search: How Milvus Handles Billions+Scaling Vector Search: How Milvus Handles Billions+
Scaling Vector Search: How Milvus Handles Billions+
 
Redefining Cybersecurity with AI Capabilities
Redefining Cybersecurity with AI CapabilitiesRedefining Cybersecurity with AI Capabilities
Redefining Cybersecurity with AI Capabilities
 
Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...
Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...
Garbage In, Garbage Out: Why poor data curation is killing your AI models (an...
 
FIDO Munich Seminar: Strong Workforce Authn Push & Pull Factors.pptx
FIDO Munich Seminar: Strong Workforce Authn Push & Pull Factors.pptxFIDO Munich Seminar: Strong Workforce Authn Push & Pull Factors.pptx
FIDO Munich Seminar: Strong Workforce Authn Push & Pull Factors.pptx
 
Mastering Board Best Practices: Essential Skills for Effective Non-profit Lea...
Mastering Board Best Practices: Essential Skills for Effective Non-profit Lea...Mastering Board Best Practices: Essential Skills for Effective Non-profit Lea...
Mastering Board Best Practices: Essential Skills for Effective Non-profit Lea...
 

Mobile API Design Techniques

  • 1. Mobile API Design & Techniques. Fred Brunel CTO Wednesday, 29 February, 12
  • 6. Though for CPU power Though for bandwidth Lazy designed. Too close to database. Wednesday, 29 February, 12
  • 7. A mobile device is Low powered Low bandwidth Runs on battery! Wednesday, 29 February, 12
  • 8. A the network is the weak link. Wednesday, 29 February, 12
  • 9. Network conditions change in real-time. Wednesday, 29 February, 12
  • 10. We want to keep the best user experience at all time. Nobody wants an unresponsive app. Wednesday, 29 February, 12
  • 11. The features of an API has a huge impact on performances. Wednesday, 29 February, 12
  • 12. An API is a contract that dictates what can or cannot be done (directly). Wednesday, 29 February, 12
  • 13. When the API is too lazy, or incomplete; the burden is put on the mobile app. Wednesday, 29 February, 12
  • 14. Any workaround put a stress on the mobile app to use too much network. Wednesday, 29 February, 12
  • 15. API = User Interface. Should be simple and get the job done. Fast. Wednesday, 29 February, 12
  • 17. Simple Standard Complete Wednesday, 29 February, 12
  • 18. Simple SOAP WS-* Standard Complete XML-RPC Pure REST Wednesday, 29 February, 12
  • 19. Simple Complete Wednesday, 29 February, 12
  • 20. Trust the OSI model. Works everywhere. And it’s plenty enough. http://en.wikipedia.org/wiki/OSI_model Wednesday, 29 February, 12
  • 21. REST-ish API + JSON Pure REST is a nice to have but not a goal. Wednesday, 29 February, 12
  • 22. GET/POST + Action + Params is fine. PUT/DELETE are nice to have. Wednesday, 29 February, 12
  • 23. Twitter is also REST-ish POST statuses/create POST statuses/destroy/:id POST statuses/update Wednesday, 29 February, 12
  • 24. REST put an emphasis on actions applied to resources; but the issue is the representation. Wednesday, 29 February, 12
  • 25. Simplify the life of the implementor. Be pragmatic. Wednesday, 29 February, 12
  • 26. When designing your API payloads, pay attention to consistency and completeness. Wednesday, 29 February, 12
  • 27. Consistency means developer know what to expect. Principle of least astonishment. Wednesday, 29 February, 12
  • 28. Completeness means less roundtrips. Wednesday, 29 February, 12
  • 29. HTTP latency on 3G ~ 1 second. Every request count. Wednesday, 29 February, 12
  • 30. API is NOT a CRUD interface to your SQL database. It’s a facade. Wednesday, 29 February, 12
  • 31. Facade App Database API Data Display Raw Data Representation Wednesday, 29 February, 12
  • 32. The facade answer to high-level questions. Think services, not objects and methods. Wednesday, 29 February, 12
  • 33. So, how do we start from here? Wednesday, 29 February, 12
  • 34. Most of the time, a mobile API will be use to get information to be displayed on a screen. Wednesday, 29 February, 12
  • 35. Reverse Design. Start from the UI Not the data Wednesday, 29 February, 12
  • 36. 1. Think screens 2.Entities to display 3.Design entity models 4.Design services Wednesday, 29 February, 12
  • 38. ID Title Town Country Rating Thumbnail URL Geocode Website Email Description Wednesday, 29 February, 12
  • 39. Then, format the representation to be as efficient as possible. Wednesday, 29 February, 12
  • 40. Each JSON entity should have the same consistent representation. Wednesday, 29 February, 12
  • 41. "person": { "id": 1234, "name": "Fred", "lastname": "Brunel", "company": "WhereCloud" } Wednesday, 29 February, 12
  • 42. "book": { "name": "Steve Jobs", "author": "Walter Isaacson", "lenders" = [{ "person_id": 1234, "person_name": "Fred", "person_lastname": "Brunel" }] } BAD Wednesday, 29 February, 12
  • 43. "book": { "name": "Steve Jobs", "author": "Walter Isaacson", "lenders" = [{ "id": 1234, "name": "Fred", "lastname": "Brunel" }] } GOOD Wednesday, 29 February, 12
  • 44. ... "user_mentions": [{ "id": 22548447, "id_str": "22548447", "screen_name": "rno", "name": "Arnaud Meunier", "indices": [0, 4] ]} ... Wednesday, 29 February, 12
  • 45. Pick the right granularity. Denormalize! Wednesday, 29 February, 12
  • 46. "result": { ... "categories" = [{ "id": 2 }], "images": [{ "id": 317171 }], "tags": [{ "id": 555 }] ... } Wednesday, 29 February, 12
  • 47. "result": { ... "categories": [{ "id": 2 "name" = "food" }], "images" = [{ "id": 317171 "url": "http://image.com/a.png" }], ... } Wednesday, 29 February, 12
  • 48. Denormalize the most common fields. Avoid unnecessary roundtrips. Wednesday, 29 February, 12
  • 49. Don’t make the app connects to 10 3rd- party systems. Aggregate on the backend. Wednesday, 29 February, 12
  • 50. The backend has the power, bandwidth and knowledge. Use it! Wednesday, 29 February, 12
  • 51. Make it fast! Some good techniques to be aware of. Wednesday, 29 February, 12
  • 52. JSON is fast to parse, but still, compress everything. Wednesday, 29 February, 12
  • 53. Use Cache-Control on every response that can be cached. Wednesday, 29 February, 12
  • 54. Partial Responses & Partial Updates Let the client decides what to get/update. Wednesday, 29 February, 12
  • 55. GET http://www.google.com/calendar/ feeds/zachpm@google.com/private/ full?fields=entry(title,gd:when) Wednesday, 29 February, 12
  • 56. PATCH /myfeed/1/1/ Content-Type: application/xml <entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google...' gd:fields='description'> <title>New title</title> </entry> Wednesday, 29 February, 12
  • 57. Batch Requests Send multiple operations, get one answer. Wednesday, 29 February, 12
  • 58. Persistent Connections. Keep a connection nailed up. Wednesday, 29 February, 12
  • 59. “If you’re serious about network, you should make your own protocol.” —Fake Alan Kay. Wednesday, 29 February, 12
  • 60. The fabric of the Internet is TCP/IP, not HTTP. Wednesday, 29 February, 12
  • 61. Make your own Binary Protocol. Lot faster than text + compression. Sorry! Wednesday, 29 February, 12
  • 62. Message-based API Custom TLV MessagePack ProtocolBuffers Wednesday, 29 February, 12
  • 63. a message TAG LENGTH VALUE 16 bits 32 bits n bits TLV TLV TLV TLV TLV TLV TLV TLV TLV TLV messages streaming Wednesday, 29 February, 12
  • 64. message Person { required string name = 1; required int32 id = 2; optional string email = 3; enum PhoneType { MOBILE = 0; HOME = 1; WORK = 2; } message PhoneNumber { required string number = 1; optional PhoneType type = 2 [default = HOME]; } repeated PhoneNumber phone = 4; } Wednesday, 29 February, 12
  • 65. Person person; person.set_name("John Doe"); person.set_id(1234); person.set_email("jdoe@example.com"); fstream output("myfile", ios::out | ios::binary); person.SerializeToOstream(&output); fstream input("myfile", ios::in | ios::binary); Person person; person.ParseFromIstream(&input); cout << "Name: " << person.name() << endl; cout << "E-mail: " << person.email() << endl; Wednesday, 29 February, 12
  • 66. So. They are tons of efficient solutions and techniques. Wednesday, 29 February, 12
  • 67. Remember. Be pragmatic. Be consistent Be complete. Be fast. Wednesday, 29 February, 12
  • 68. Thank you. twitter.com/fbrunel fred@wherecloud.com Wednesday, 29 February, 12