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
FVCP - Facebook , Twitter and Meetup API / Widgets
FVCP - Facebook , Twitter and Meetup API / Widgets
Pete DuMelle
Spyware/Malware FVCP
Spyware/Malware FVCP
Pete DuMelle
August 10th, 2009 Pete De Mulle Twitter
August 10th, 2009 Pete De Mulle Twitter
Straight North
Web development
Web development
Seerat Bakhtawar
Playing With The Web
Playing With The Web
Christian Heilmann
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
StefanoLambiase
Cyber security and its impact on E commerce
Cyber security and its impact on E commerce
manigoyal112
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
FVCP - Facebook , Twitter and Meetup API / Widgets
FVCP - Facebook , Twitter and Meetup API / Widgets
Pete DuMelle
Spyware/Malware FVCP
Spyware/Malware FVCP
Pete DuMelle
August 10th, 2009 Pete De Mulle Twitter
August 10th, 2009 Pete De Mulle Twitter
Straight North
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)
FVCP - Facebook , Twitter and Meetup API / Widgets
FVCP - Facebook , Twitter and Meetup API / Widgets
Spyware/Malware FVCP
Spyware/Malware FVCP
August 10th, 2009 Pete De Mulle Twitter
August 10th, 2009 Pete De Mulle Twitter
Web development
Web development
Playing With The Web
Playing With The Web
Dernier
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
StefanoLambiase
Cyber security and its impact on E commerce
Cyber security and its impact on E commerce
manigoyal112
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
YashikaSharma391629
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
31events.com
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
Sujith Sukumaran
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
team-WIBU
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
Hanief Utama
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
Akihiro Suda
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Drew Moseley
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
Technogeeks
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
Philip Schwarz
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Ahmed Mohamed
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
OnePlan Solutions
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
FerryKemperman
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
Hr365.us smith
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
confluent
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
Marharyta Nedzelska
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
OnePlan Solutions
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Cizo Technology Services
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
Dernier
(20)
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Cyber security and its impact on E commerce
Cyber security and its impact on E commerce
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
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