Soumettre la recherche
Mettre en ligne
Concurrent PHP in the Etsy API
•
1 j'aime
•
2,187 vues
Matt Graham
Suivre
How we at Etsy are adding concurrent data access to our PHP API. From PHP Day 2014
Lire moins
Lire la suite
Logiciels
Technologie
Actualités & Politique
Signaler
Partager
Signaler
Partager
1 sur 86
Télécharger maintenant
Télécharger pour lire hors ligne
Recommandé
Julie Anne U.S. Writer for Hire Website Copywriting - Product Descriptions, N...
Julie Anne U.S. Writer for Hire Website Copywriting - Product Descriptions, N...
Julie Anne
Hooked on WordPress: WordCamp Columbus
Hooked on WordPress: WordCamp Columbus
Shawn Hooper
Dicas de palestra
Dicas de palestra
Fabio Akita
Product advice from a dubious source
Product advice from a dubious source
Aileen Sim
Story Driven Development With Cucumber
Story Driven Development With Cucumber
Sean Cribbs
Coffee script
Coffee script
Night Wolf
Powershell to the People #suguk
Powershell to the People #suguk
Chris McKinley
Rails OO views
Rails OO views
Elia Schito
Recommandé
Julie Anne U.S. Writer for Hire Website Copywriting - Product Descriptions, N...
Julie Anne U.S. Writer for Hire Website Copywriting - Product Descriptions, N...
Julie Anne
Hooked on WordPress: WordCamp Columbus
Hooked on WordPress: WordCamp Columbus
Shawn Hooper
Dicas de palestra
Dicas de palestra
Fabio Akita
Product advice from a dubious source
Product advice from a dubious source
Aileen Sim
Story Driven Development With Cucumber
Story Driven Development With Cucumber
Sean Cribbs
Coffee script
Coffee script
Night Wolf
Powershell to the People #suguk
Powershell to the People #suguk
Chris McKinley
Rails OO views
Rails OO views
Elia Schito
Smarter Interfaces with jQuery (and Drupal)
Smarter Interfaces with jQuery (and Drupal)
aasarava
Paypal + symfony
Paypal + symfony
Massimiliano Arione
SlideShare Instant
SlideShare Instant
Saket Choudhary
SlideShare Instant
SlideShare Instant
Saket Choudhary
Evolution of API With Blogging
Evolution of API With Blogging
Takatsugu Shigeta
How To Make Money From Apps: Pirate metrics & growth hacking
How To Make Money From Apps: Pirate metrics & growth hacking
Pol Valls Soler
jQuery Performance Rules
jQuery Performance Rules
nagarajhubli
Web Scraping with PHP
Web Scraping with PHP
Matthew Turland
Build REST API clients for AngularJS
Build REST API clients for AngularJS
Almog Baku
jQuery - Doing it right
jQuery - Doing it right
girish82
Ep2014 hypermedia APIs
Ep2014 hypermedia APIs
adrianavasiu
Powering Content Driven Applications with the World’s Most Popular CMS #ngconf
Powering Content Driven Applications with the World’s Most Popular CMS #ngconf
Roy Sivan
"Managing API Complexity". Matthew Flaming, Temboo
"Managing API Complexity". Matthew Flaming, Temboo
Yandex
Further Php
Further Php
Digital Insights - Digital Marketing Agency
Crafting Quality PHP Applications: an overview (PHPSW March 2018)
Crafting Quality PHP Applications: an overview (PHPSW March 2018)
James Titcumb
August 10th, 2009 Pete De Mulle Twitter
August 10th, 2009 Pete De Mulle Twitter
Straight North
FVCP - Facebook , Twitter and Meetup API / Widgets
FVCP - Facebook , Twitter and Meetup API / Widgets
Pete DuMelle
Spyware/Malware FVCP
Spyware/Malware FVCP
Pete DuMelle
Web development
Web development
Seerat Bakhtawar
Playing With The Web
Playing With The Web
Christian Heilmann
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
OnePlan Solutions
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
MyIntelliSource, Inc.
Contenu connexe
Similaire à Concurrent PHP in the Etsy API
Smarter Interfaces with jQuery (and Drupal)
Smarter Interfaces with jQuery (and Drupal)
aasarava
Paypal + symfony
Paypal + symfony
Massimiliano Arione
SlideShare Instant
SlideShare Instant
Saket Choudhary
SlideShare Instant
SlideShare Instant
Saket Choudhary
Evolution of API With Blogging
Evolution of API With Blogging
Takatsugu Shigeta
How To Make Money From Apps: Pirate metrics & growth hacking
How To Make Money From Apps: Pirate metrics & growth hacking
Pol Valls Soler
jQuery Performance Rules
jQuery Performance Rules
nagarajhubli
Web Scraping with PHP
Web Scraping with PHP
Matthew Turland
Build REST API clients for AngularJS
Build REST API clients for AngularJS
Almog Baku
jQuery - Doing it right
jQuery - Doing it right
girish82
Ep2014 hypermedia APIs
Ep2014 hypermedia APIs
adrianavasiu
Powering Content Driven Applications with the World’s Most Popular CMS #ngconf
Powering Content Driven Applications with the World’s Most Popular CMS #ngconf
Roy Sivan
"Managing API Complexity". Matthew Flaming, Temboo
"Managing API Complexity". Matthew Flaming, Temboo
Yandex
Further Php
Further Php
Digital Insights - Digital Marketing Agency
Crafting Quality PHP Applications: an overview (PHPSW March 2018)
Crafting Quality PHP Applications: an overview (PHPSW March 2018)
James Titcumb
August 10th, 2009 Pete De Mulle Twitter
August 10th, 2009 Pete De Mulle Twitter
Straight North
FVCP - Facebook , Twitter and Meetup API / Widgets
FVCP - Facebook , Twitter and Meetup API / Widgets
Pete DuMelle
Spyware/Malware FVCP
Spyware/Malware FVCP
Pete DuMelle
Web development
Web development
Seerat Bakhtawar
Playing With The Web
Playing With The Web
Christian Heilmann
Similaire à Concurrent PHP in the Etsy API
(20)
Smarter Interfaces with jQuery (and Drupal)
Smarter Interfaces with jQuery (and Drupal)
Paypal + symfony
Paypal + symfony
SlideShare Instant
SlideShare Instant
SlideShare Instant
SlideShare Instant
Evolution of API With Blogging
Evolution of API With Blogging
How To Make Money From Apps: Pirate metrics & growth hacking
How To Make Money From Apps: Pirate metrics & growth hacking
jQuery Performance Rules
jQuery Performance Rules
Web Scraping with PHP
Web Scraping with PHP
Build REST API clients for AngularJS
Build REST API clients for AngularJS
jQuery - Doing it right
jQuery - Doing it right
Ep2014 hypermedia APIs
Ep2014 hypermedia APIs
Powering Content Driven Applications with the World’s Most Popular CMS #ngconf
Powering Content Driven Applications with the World’s Most Popular CMS #ngconf
"Managing API Complexity". Matthew Flaming, Temboo
"Managing API Complexity". Matthew Flaming, Temboo
Further Php
Further Php
Crafting Quality PHP Applications: an overview (PHPSW March 2018)
Crafting Quality PHP Applications: an overview (PHPSW March 2018)
August 10th, 2009 Pete De Mulle Twitter
August 10th, 2009 Pete De Mulle Twitter
FVCP - Facebook , Twitter and Meetup API / Widgets
FVCP - Facebook , Twitter and Meetup API / Widgets
Spyware/Malware FVCP
Spyware/Malware FVCP
Web development
Web development
Playing With The Web
Playing With The Web
Dernier
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
OnePlan Solutions
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
MyIntelliSource, Inc.
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
ICS
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
anilsa9823
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
ComplianceQuest1
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
aagamshah0812
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
Fatema Valibhai
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Alberto González Trastoy
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
SolGuruz
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
Cionsystems
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Steffen Staab
Software Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
Arshad QA
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
Delhi Call girls
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
ABDERRAOUF MEHENNI
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
harshavardhanraghave
Professional Resume Template for Software Developers
Professional Resume Template for Software Developers
Vinodh Ram
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
OnePlan Solutions
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
Evangelist Apps https://twitter.com/EvangelistSW/
Dernier
(20)
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Software Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Professional Resume Template for Software Developers
Professional Resume Template for Software Developers
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
Concurrent PHP in the Etsy API
1.
Concurrent PHP in the
Etsy API Matthew Graham @lapsu @EtsyAPI Lead #phpday 2014 April
2.
@lapsu@EtsyAPI
3.
@lapsu@EtsyAPI $1.3 Billion Things That
Matter
4.
@lapsu@EtsyAPI
5.
@lapsu Etsy's PHP www api
admin queues cron @EtsyAPI
6.
@lapsu ~200 engineers 30+ deploys
/ day @EtsyAPI
7.
Also, Rasmus @lapsu@EtsyAPI
8.
Spoilers @lapsu Mobile Clients Are
Special 1 Thread != No Concurrency @EtsyAPI
9.
@lapsu <motivation> @EtsyAPI
10.
Premise: @lapsu The Future is
Mobile @EtsyAPI
11.
@lapsu Past The Future is
Mobile November 2013 @EtsyAPI
12.
@lapsu@EtsyAPI
13.
@EtsyAPI Mobile Networks Suck @lapsu <
14.
@EtsyAPI Not Mobile @lapsu www.etsy.com/shop/AVintageWanderer
15.
@EtsyAPI Network Performance @lapsu 3G <
4G
16.
@EtsyAPI Network Coverage @lapsu 3G >
4G
17.
@EtsyAPI Mobile Requests @lapsu More !=
Better
18.
@lapsu@EtsyAPI
19.
@lapsu 1000ms Time To
Glass @EtsyAPI
20.
@lapsu 1000ms - 900ms ------------- 100ms Network/Client ------------------------ Server @EtsyAPI
21.
@lapsu 100ms = Bespoke +
Concurrent @EtsyAPI
22.
@lapsu Single Threads @EtsyAPI
23.
Concurrency @lapsu@EtsyAPI Main “Thread” Child “Thread”
Child “Thread”
24.
@lapsu </motivation><interface> @EtsyAPI
25.
Paul goes to
Netflix @lapsu@EtsyAPI
26.
1 View :
1 Bespoke @lapsu@EtsyAPI ClientView Bespoke View View Bespoke Bespoke API
27.
Multiple Clients @lapsu@EtsyAPI ClientsView Bespoke View View Bespoke
Bespoke API
28.
Bespoke : Components @lapsu@EtsyAPI Bespoke
Bespoke Bespoke API Item User Shop Favs Tx
29.
Components as REST @lapsu@EtsyAPI Bespoke
Bespoke API Item User Shop Favs Tx
30.
@lapsu ?includes=User @EtsyAPI
31.
Android User View @lapsu function
handle($cli, $inp) { $shop = $cli->shop($inp->user_id); $favs = $cli->favs($inp->user_id); $items = $cli->items($shop->shop_id); Curl_Orchestrator::run( [$shop,$favs,$items]); return [$favs,$items]; } @EtsyAPI
32.
Concurrent Client @lapsu function handle($cli,
$inp) { $shop = $cli->shop($inp->user_id); $favs = $cli->favs($inp->user_id); $items = $cli->items($shop->shop_id); Curl_Orchestrator::run( [$shop,$favs,$items]); return [$favs,$items]; } @EtsyAPI
33.
Making Requests @lapsu function handle($cli,
$inp) { $shop = $cli->shop($inp->user_id); $favs = $cli->favs($inp->user_id); $items = $cli->items($shop->shop_id); Curl_Orchestrator::run( [$shop,$favs,$items]); return [$favs,$items]; } @EtsyAPI
34.
@lapsu@EtsyAPI shop favs t0 t1
35.
Inputs @lapsu function handle($cli, $inp)
{ $shop = $cli->shop($inp->user_id); $favs = $cli->favs($inp->user_id); $items = $cli->items($shop->shop_id); Curl_Orchestrator::run( [$shop,$favs,$items]); return [$favs,$items]; } @EtsyAPI
36.
Future Parameters @lapsu function handle($cli,
$inp) { $shop = $cli->shop($inp->user_id); $favs = $cli->favs($inp->user_id); $items = $cli->items($shop->shop_id); Curl_Orchestrator::run( [$shop,$favs,$items]); return [$favs,$items]; } @EtsyAPI
37.
@lapsu@EtsyAPI shop favs items t0 t1 t2
t3 t4
38.
~6 Lines @lapsu function handle($cli,
$inp) { $shop = $cli->shop($inp->user_id); $favs = $cli->favs($inp->user_id); $items = $cli->items($shop->shop_id); Curl_Orchestrator::run( [$shop,$favs,$items]); return [$favs,$items]; } @EtsyAPI
39.
@lapsu </interface><performance> @EtsyAPI
40.
@lapsu Web Pages Are
Clients Too @EtsyAPI
41.
Web First @lapsu@EtsyAPI
42.
API First @lapsu@EtsyAPI
43.
Android User View @lapsu function
handle($cli, $inp) { $shop = $cli->shop($inp->user_id); $favs = $cli->favs($inp->user_id); $items = $cli->items($shop->shop_id); Curl_Orchestrator::run( [$shop,$favs,$items]); return [$favs,$items]; } @EtsyAPI
44.
Desktop Web User
View @lapsu function handle($cli, $inp) { $shop = $cli->shop($inp->user_id); $favs = $cli->favs($inp->user_id); $items = $cli->items($shop->shop_id); $teams = $cli->teams($inp->user_id); Curl_Orchestrator::run( [$shop,$favs,$items,$teams]); return [$favs,$items,$teams]; } @EtsyAPI
45.
@lapsu Activity Feed @EtsyAPI
46.
@lapsu Activity Feed Page @EtsyAPI Home Page
47.
30s of HTTP
Time @lapsu@EtsyAPI
48.
30s of HTTP
Time @lapsu 880ms Real Time @EtsyAPI
49.
Components @lapsu@EtsyAPI Bespoke Bespoke Bespoke API Item
User Shop Favs Tx
50.
Components Cache @lapsu@EtsyAPI Bespoke Bespoke
Bespoke Cache API Item User Shop Favs Tx
51.
Local Call @lapsu@EtsyAPI Me
52.
Long Distance Call @lapsu@EtsyAPI Atlantic Ocean
User
53.
Long Distance Call @lapsu@EtsyAPI Atlantic Ocean API Templates User
54.
@lapsu </performance><internals> @EtsyAPI
55.
@lapsu curl_multi_* @EtsyAPI
56.
@lapsu@EtsyAPI curl?
57.
General Sequence @lapsu@EtsyAPI curl_multi_init(); curl_multi_add(); curl_multi_exec(); while (!$done)
{ curl_multi_select(); curl_multi_exec(); curl_multi_info_read(); }
58.
curl_multi_init @lapsu@EtsyAPI $mh = curl_multi_init();
59.
curl_multi_add_handle @lapsu@EtsyAPI $mh = curl_multi_init(); $ch
= curl_init($url); curl_setopt_array($ch, $options); curl_multi_add_handle($mh, $ch);
60.
@lapsu@EtsyAPI multi handle handle handle
handle
61.
curl_multi_exec @lapsu@EtsyAPI do { $code =
curl_multi_exec($mh, $r); } while ($code == CURLM_CALL_MULTI_PERFORM);
62.
curl_multi_select @lapsu@EtsyAPI $cnt = curl_multi_select($mh,
$tmout);
63.
curl_multi_info_read @lapsu@EtsyAPI $info = curl_multi_info_read($mh); $ch
= $info['handle']; $content = curl_multi_getcontent($ch);
64.
@lapsu@EtsyAPI
65.
localhost: Expected @lapsu@EtsyAPI R1 R2 R3 t0
66.
Network: Actual @lapsu@EtsyAPI R2 R3 t0 t1 R1
67.
curl Protocols @lapsu@EtsyAPI HTTP LDAP Gopher POP3 IMAP TELNET
TFTP
68.
curl_get_multi_handle_state @lapsu@EtsyAPI $state = CURLM_STATE_FIRST; curl_multi_get_handle_state( $mh,
$ch, $state); $sent = $state > CURLM_STATE_FIRST && $state < CURLM_STATE_PERFORM;
69.
Expected, Actual @lapsu@EtsyAPI R1 R2 R3 t0
70.
Revised Sequence @lapsu@EtsyAPI curl_multi_init(); curl_multi_add(); while (!$sent)
{ curl_multi_exec(); curl_multi_get_handle_state(); } while (!$done) { curl_multi_select(); curl_multi_exec(); curl_multi_info_read(); }
71.
Still Headed Upstream @lapsu@EtsyAPI
72.
Patch URL @lapsu bit.ly/etsy_curl_multi_patch @EtsyAPI
73.
Recursion? @lapsu@EtsyAPI
74.
Recursion? @lapsu No. @EtsyAPI
75.
Recursion? @lapsu No? Not yet. @EtsyAPI
76.
Visibility @lapsu@EtsyAPI
77.
@lapsu PHP Coroutines @EtsyAPI
78.
More Code @lapsu Available Upon
Request @EtsyAPI
79.
@lapsu codeascraft.etsy.com @EtsyAPI
80.
@lapsu </internals><wrap/> @EtsyAPI
81.
@lapsu Address Mobile Challenges @EtsyAPI
82.
@lapsu PHP Does Concurrency @EtsyAPI
83.
PHP Abides @lapsu@EtsyAPI
84.
Concurrent PHP in the
Etsy API Matthew Graham @lapsu @EtsyAPI Lead #phpday 2014 April Thank You
85.
Reminder: @lapsu Repeat the questions @EtsyAPI
86.
@lapsu SPDY / HTTP
2.0 @EtsyAPI
Télécharger maintenant