SlideShare a Scribd company logo
Upwork PHP Architecture
Sep Nasiri
Software Architect at Upwork
Introduction
● Legacy Stack
● Challenges and reasons for modernization
● Overview of Upwork Architecture
● Focus on Presentation Tier and PHP
Legacy Stack
● Presentation Layer
○ PHP / Zend Framework
○ jQuery / Custom CSS
● Perl RPC Layer
● Both layers deployed to a cluster of App
Servers
● Deployed in hardware in our data center
Problems with Legacy Stack
● Infrequently releases
○ Weekly, then 3x a week
○ Release blockers - problems in one part
of the application would block other
teams features
● Aging codebase
○ frameworks getting out dated but hard
to upgrade
Requirement for New Architecture
● Isolate risk
○ problems in one part of the application
should not affect other parts
● Teams work in independent swimlanes
○ develop, test, and deploy independently
○ deploy features when ready
● Allow advanced deployment techniques
○ Automated
○ Blue/Green
○ Canary
New Backend Architecture - Agora
● Replace Perl Layer
● Java
● Microservices
● Netflix Open Source Software
○ Hystrix
○ Eureka
● AWS
Extending Microservices to the Frontend
- Agate
● Wanted to extend the benefits of Agora to
the presentation tier.
● Spit up our PHP and client side code (JS,
CSS, HTML) into independent units
● Challenges
○ Dealing with routing
○ Navigation / Header
○ Logging / Visibility
Agate Stack
● PHP / Symfony 2
● Angular JS
● Bootstrap
Agate Stack
● PHP / Symfony2
○ Lots of custom bundles
■ Distributed using Composer / Satis
● Component Library
○ Bootstrap
○ Angular
● Navigation Service
Talking to Agora - Phystrix
● Based on Netflix Hystrix
● Command Pattern
● Circuit breaker
○ prevent cascading failures
● Fallbacks
Open Source - https://github.
com/odesk/phystrix
Phystrix Example
use OdeskPhystrixAbstractCommand;
/**
* All commands must extends Phystrix's AbstractCommand
*/
class MyCommand extends AbstractCommand
{
protected $name;
public function __construct($name)
{
$this->name = $name;
}
/**
* This function is called internally by Phystrix, only if the request is allowed
*
* @return mixed
*/
protected function run()
{
return 'Hello ' . $this->name;
}
}
Phystrix Example
$myCommand = $phystrix->getCommand('MyCommand', 'Alex'); // 'Alex' is passed to MyCommand's constructor
$result = $myCommand->execute();
Visibility
● Metrics
○ graphite
○ metrics bundle
■ times actions
■ allows developers to add custom
timers
● Logstash / Elasticsearch / Kibana
○ aggregate logs
Testing
● PHPUnit
● Mocha
○ small test - karma
○ medium tests - protractor
● Jenkins
○ Docker build of each project
○ run tests in Docker
Planned improvements
● Docker based deployments
○ unify Agate and Agora deployment
● Continuous Integration / Delivery
○ improve our testing pipeline and Allow
fully automated deployments
● Configuration with Consul to allow Docker
images to move from dev to stage to prod
Thank You

More Related Content

What's hot (20)

PDF
Multiple django applications on a single server with nginx
roskakori
 
PDF
"Wix Serverless from inside", Mykola Borozdin
Fwdays
 
PDF
JHipster Conf 2018 : Connect your JHipster apps to the world of APIs with Ope...
chbornet
 
PDF
Using GitLab CI
ColCh
 
PPTX
Docker session I: Continuous integration, delivery and deployment
Degendra Sivakoti
 
PDF
Salt and pepper — native code in the browser Browser using Google native Client
Mayflower GmbH
 
PDF
Running JavaScript Efficiently in a Java World
irbull
 
PDF
TDC2018SP | Trilha Containers - CI/CD com Docker e Drone
tdc-globalcode
 
PDF
Using GitLab CI
Lingvokot
 
PPT
Dockerizing BDD : Ruby-Cucumber Example
Shashikant Jagtap
 
PDF
CI with Gitlab & Docker
Joerg Henning
 
PDF
Laravel Poznań Meetup #12 - "Speed up web API with Laravel and Swoole using ...
HighSolutions Sp. z o.o.
 
PDF
Pragmatic Monolith-First, easy to decompose, clean architecture
Piotr Pelczar
 
PDF
Continuous delivery with jenkins, docker and exoscale
Julia Mateo
 
ODP
Introduction to Docker for NodeJs developers at Node DC 2/26/2014
lenworthhenry
 
PDF
Code quality par Simone Civetta
CocoaHeads France
 
PPTX
Docker session III: Dockerfile
Degendra Sivakoti
 
PDF
Виталий Редько "React + Redux: performance & scalability"
Fwdays
 
PDF
Cocoa pods
CocoaHeads France
 
PDF
.NET Core in the Real World
Nate Barbettini
 
Multiple django applications on a single server with nginx
roskakori
 
"Wix Serverless from inside", Mykola Borozdin
Fwdays
 
JHipster Conf 2018 : Connect your JHipster apps to the world of APIs with Ope...
chbornet
 
Using GitLab CI
ColCh
 
Docker session I: Continuous integration, delivery and deployment
Degendra Sivakoti
 
Salt and pepper — native code in the browser Browser using Google native Client
Mayflower GmbH
 
Running JavaScript Efficiently in a Java World
irbull
 
TDC2018SP | Trilha Containers - CI/CD com Docker e Drone
tdc-globalcode
 
Using GitLab CI
Lingvokot
 
Dockerizing BDD : Ruby-Cucumber Example
Shashikant Jagtap
 
CI with Gitlab & Docker
Joerg Henning
 
Laravel Poznań Meetup #12 - "Speed up web API with Laravel and Swoole using ...
HighSolutions Sp. z o.o.
 
Pragmatic Monolith-First, easy to decompose, clean architecture
Piotr Pelczar
 
Continuous delivery with jenkins, docker and exoscale
Julia Mateo
 
Introduction to Docker for NodeJs developers at Node DC 2/26/2014
lenworthhenry
 
Code quality par Simone Civetta
CocoaHeads France
 
Docker session III: Dockerfile
Degendra Sivakoti
 
Виталий Редько "React + Redux: performance & scalability"
Fwdays
 
Cocoa pods
CocoaHeads France
 
.NET Core in the Real World
Nate Barbettini
 

Viewers also liked (20)

PPTX
Php internal architecture
Elizabeth Smith
 
PPT
Building Big on the Web
Cal Henderson
 
PDF
Scalable Web Architectures: Common Patterns and Approaches
adunne
 
PDF
flickr's architecture & php
coolpics
 
PDF
Services Oriented Architecture with PHP and MySQL
Joe Stump
 
PDF
Enterprise PHP Architecture through Design Patterns and Modularization (Midwe...
Aaron Saray
 
PPT
6 3 tier architecture php
cefour
 
PDF
Anatomy of a Modern PHP Application Architecture
AppDynamics
 
PPTX
Taming the resource tiger
Elizabeth Smith
 
PDF
Анатолий Попель: "Формы оплаты и платёжные шлюзы"
Fwdays
 
PDF
Fighting Fat Models (Богдан Гусев)
Fwdays
 
PPTX
"Query Execution: Expectation - Reality (Level 300)" Денис Резник
Fwdays
 
PPTX
"Красная книга веб-разработчика" Виктор Полищук
Fwdays
 
PPT
"Spring Boot. Boot up your development" Сергей Моренец
Fwdays
 
PDF
Андрей Шумада | Tank.ly
Fwdays
 
PDF
Сергей Яковлев "Phalcon 2 - стабилизация и производительность"
Fwdays
 
PDF
Александр Воронов | Building CLI with Swift
Fwdays
 
PDF
Алексей Волков "Интерактивные декларативные графики на React+D3"
Fwdays
 
PDF
Алексей Рыбаков: "Wearable OS год спустя: Apple Watch 2.0, Android Wear 5.1.1...
Fwdays
 
PPTX
Сергей Жук "Android Performance Tips & Tricks"
Fwdays
 
Php internal architecture
Elizabeth Smith
 
Building Big on the Web
Cal Henderson
 
Scalable Web Architectures: Common Patterns and Approaches
adunne
 
flickr's architecture & php
coolpics
 
Services Oriented Architecture with PHP and MySQL
Joe Stump
 
Enterprise PHP Architecture through Design Patterns and Modularization (Midwe...
Aaron Saray
 
6 3 tier architecture php
cefour
 
Anatomy of a Modern PHP Application Architecture
AppDynamics
 
Taming the resource tiger
Elizabeth Smith
 
Анатолий Попель: "Формы оплаты и платёжные шлюзы"
Fwdays
 
Fighting Fat Models (Богдан Гусев)
Fwdays
 
"Query Execution: Expectation - Reality (Level 300)" Денис Резник
Fwdays
 
"Красная книга веб-разработчика" Виктор Полищук
Fwdays
 
"Spring Boot. Boot up your development" Сергей Моренец
Fwdays
 
Андрей Шумада | Tank.ly
Fwdays
 
Сергей Яковлев "Phalcon 2 - стабилизация и производительность"
Fwdays
 
Александр Воронов | Building CLI with Swift
Fwdays
 
Алексей Волков "Интерактивные декларативные графики на React+D3"
Fwdays
 
Алексей Рыбаков: "Wearable OS год спустя: Apple Watch 2.0, Android Wear 5.1.1...
Fwdays
 
Сергей Жук "Android Performance Tips & Tricks"
Fwdays
 
Ad

Similar to Sep Nasiri "Upwork PHP Architecture" (20)

PDF
API Platform: Full Stack Framework Resurrection
Les-Tilleuls.coop
 
PDF
API Platform 2.1: when Symfony meets ReactJS (Symfony Live 2017)
Les-Tilleuls.coop
 
PDF
API Platform and Symfony: a Framework for API-driven Projects
Les-Tilleuls.coop
 
PDF
Building APIs in an easy way using API Platform
Antonio Peric-Mazar
 
PPTX
Laravel introduction
Simon Funk
 
PDF
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012
Blend Interactive
 
PDF
PHP is the King, nodejs is the Prince and Lua is the fool
Alessandro Cinelli (cirpo)
 
PDF
PHP is the king, nodejs is the prince and Lua is the fool
Alessandro Cinelli (cirpo)
 
PPTX
Openstack Overview
rajdeep
 
PDF
Full stack development
Pavlo Iuriichuk
 
PDF
Symfony presentation
maxpower57
 
PDF
CarTrawler's Feature Team Architecture and Development Process Showcase by Lu...
Lucas Sacramento
 
PDF
OpenStack Best Practices and Considerations - terasky tech day
Arthur Berezin
 
PPTX
Micro services Architecture
Jenis Dharmadurai
 
PDF
From silex to symfony and viceversa
Ronny López
 
PDF
Next Generation Architecture Showcase July 2019
Alan Pearson Mathews
 
PDF
Rise of the machines: Continuous Delivery at SEEK - YOW! Night Summary Slides
DiUS
 
PPTX
An Intrudction to OpenStack 2017
Haim Ateya
 
PDF
PHP At 5000 Requests Per Second: Hootsuite’s Scaling Story
vanphp
 
ODP
Introducing OpenStack for Beginners
openstackindia
 
API Platform: Full Stack Framework Resurrection
Les-Tilleuls.coop
 
API Platform 2.1: when Symfony meets ReactJS (Symfony Live 2017)
Les-Tilleuls.coop
 
API Platform and Symfony: a Framework for API-driven Projects
Les-Tilleuls.coop
 
Building APIs in an easy way using API Platform
Antonio Peric-Mazar
 
Laravel introduction
Simon Funk
 
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012
Blend Interactive
 
PHP is the King, nodejs is the Prince and Lua is the fool
Alessandro Cinelli (cirpo)
 
PHP is the king, nodejs is the prince and Lua is the fool
Alessandro Cinelli (cirpo)
 
Openstack Overview
rajdeep
 
Full stack development
Pavlo Iuriichuk
 
Symfony presentation
maxpower57
 
CarTrawler's Feature Team Architecture and Development Process Showcase by Lu...
Lucas Sacramento
 
OpenStack Best Practices and Considerations - terasky tech day
Arthur Berezin
 
Micro services Architecture
Jenis Dharmadurai
 
From silex to symfony and viceversa
Ronny López
 
Next Generation Architecture Showcase July 2019
Alan Pearson Mathews
 
Rise of the machines: Continuous Delivery at SEEK - YOW! Night Summary Slides
DiUS
 
An Intrudction to OpenStack 2017
Haim Ateya
 
PHP At 5000 Requests Per Second: Hootsuite’s Scaling Story
vanphp
 
Introducing OpenStack for Beginners
openstackindia
 
Ad

More from Fwdays (20)

PDF
"Mastering UI Complexity: State Machines and Reactive Patterns at Grammarly",...
Fwdays
 
PDF
"Effect, Fiber & Schema: tactical and technical characteristics of Effect.ts"...
Fwdays
 
PPTX
"Computer Use Agents: From SFT to Classic RL", Maksym Shamrai
Fwdays
 
PPTX
"Як ми переписали Сільпо на Angular", Євген Русаков
Fwdays
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
"Validation and Observability of AI Agents", Oleksandr Denisyuk
Fwdays
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PPTX
"Co-Authoring with a Machine: What I Learned from Writing a Book on Generativ...
Fwdays
 
PPTX
"Human-AI Collaboration Models for Better Decisions, Faster Workflows, and Cr...
Fwdays
 
PDF
"AI is already here. What will happen to your team (and your role) tomorrow?"...
Fwdays
 
PPTX
"Is it worth investing in AI in 2025?", Alexander Sharko
Fwdays
 
PDF
''Taming Explosive Growth: Building Resilience in a Hyper-Scaled Financial Pl...
Fwdays
 
PDF
"Scaling in space and time with Temporal", Andriy Lupa.pdf
Fwdays
 
PDF
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
PDF
"Scaling in space and time with Temporal", Andriy Lupa .pdf
Fwdays
 
PPTX
"Provisioning via DOT-Chain: from catering to drone marketplaces", Volodymyr ...
Fwdays
 
PPTX
" Observability with Elasticsearch: Best Practices for High-Load Platform", A...
Fwdays
 
PPTX
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
Fwdays
 
PPTX
"Istio Ambient Mesh in production: our way from Sidecar to Sidecar-less",Hlib...
Fwdays
 
"Mastering UI Complexity: State Machines and Reactive Patterns at Grammarly",...
Fwdays
 
"Effect, Fiber & Schema: tactical and technical characteristics of Effect.ts"...
Fwdays
 
"Computer Use Agents: From SFT to Classic RL", Maksym Shamrai
Fwdays
 
"Як ми переписали Сільпо на Angular", Євген Русаков
Fwdays
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
"Validation and Observability of AI Agents", Oleksandr Denisyuk
Fwdays
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
"Co-Authoring with a Machine: What I Learned from Writing a Book on Generativ...
Fwdays
 
"Human-AI Collaboration Models for Better Decisions, Faster Workflows, and Cr...
Fwdays
 
"AI is already here. What will happen to your team (and your role) tomorrow?"...
Fwdays
 
"Is it worth investing in AI in 2025?", Alexander Sharko
Fwdays
 
''Taming Explosive Growth: Building Resilience in a Hyper-Scaled Financial Pl...
Fwdays
 
"Scaling in space and time with Temporal", Andriy Lupa.pdf
Fwdays
 
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
"Scaling in space and time with Temporal", Andriy Lupa .pdf
Fwdays
 
"Provisioning via DOT-Chain: from catering to drone marketplaces", Volodymyr ...
Fwdays
 
" Observability with Elasticsearch: Best Practices for High-Load Platform", A...
Fwdays
 
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
Fwdays
 
"Istio Ambient Mesh in production: our way from Sidecar to Sidecar-less",Hlib...
Fwdays
 

Recently uploaded (20)

PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Python basic programing language for automation
DanialHabibi2
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 

Sep Nasiri "Upwork PHP Architecture"

  • 1. Upwork PHP Architecture Sep Nasiri Software Architect at Upwork
  • 2. Introduction ● Legacy Stack ● Challenges and reasons for modernization ● Overview of Upwork Architecture ● Focus on Presentation Tier and PHP
  • 3. Legacy Stack ● Presentation Layer ○ PHP / Zend Framework ○ jQuery / Custom CSS ● Perl RPC Layer ● Both layers deployed to a cluster of App Servers ● Deployed in hardware in our data center
  • 4. Problems with Legacy Stack ● Infrequently releases ○ Weekly, then 3x a week ○ Release blockers - problems in one part of the application would block other teams features ● Aging codebase ○ frameworks getting out dated but hard to upgrade
  • 5. Requirement for New Architecture ● Isolate risk ○ problems in one part of the application should not affect other parts ● Teams work in independent swimlanes ○ develop, test, and deploy independently ○ deploy features when ready ● Allow advanced deployment techniques ○ Automated ○ Blue/Green ○ Canary
  • 6. New Backend Architecture - Agora ● Replace Perl Layer ● Java ● Microservices ● Netflix Open Source Software ○ Hystrix ○ Eureka ● AWS
  • 7. Extending Microservices to the Frontend - Agate ● Wanted to extend the benefits of Agora to the presentation tier. ● Spit up our PHP and client side code (JS, CSS, HTML) into independent units ● Challenges ○ Dealing with routing ○ Navigation / Header ○ Logging / Visibility
  • 8. Agate Stack ● PHP / Symfony 2 ● Angular JS ● Bootstrap
  • 9. Agate Stack ● PHP / Symfony2 ○ Lots of custom bundles ■ Distributed using Composer / Satis ● Component Library ○ Bootstrap ○ Angular ● Navigation Service
  • 10. Talking to Agora - Phystrix ● Based on Netflix Hystrix ● Command Pattern ● Circuit breaker ○ prevent cascading failures ● Fallbacks Open Source - https://github. com/odesk/phystrix
  • 11. Phystrix Example use OdeskPhystrixAbstractCommand; /** * All commands must extends Phystrix's AbstractCommand */ class MyCommand extends AbstractCommand { protected $name; public function __construct($name) { $this->name = $name; } /** * This function is called internally by Phystrix, only if the request is allowed * * @return mixed */ protected function run() { return 'Hello ' . $this->name; } }
  • 12. Phystrix Example $myCommand = $phystrix->getCommand('MyCommand', 'Alex'); // 'Alex' is passed to MyCommand's constructor $result = $myCommand->execute();
  • 13. Visibility ● Metrics ○ graphite ○ metrics bundle ■ times actions ■ allows developers to add custom timers ● Logstash / Elasticsearch / Kibana ○ aggregate logs
  • 14. Testing ● PHPUnit ● Mocha ○ small test - karma ○ medium tests - protractor ● Jenkins ○ Docker build of each project ○ run tests in Docker
  • 15. Planned improvements ● Docker based deployments ○ unify Agate and Agora deployment ● Continuous Integration / Delivery ○ improve our testing pipeline and Allow fully automated deployments ● Configuration with Consul to allow Docker images to move from dev to stage to prod