Enterprise PHP development teams, no matter the maturity level, focus on one thing, releasing stable apps that perform. They also want to avoid reinventing the wheel. Therefore, make the investment to listen to the top lessons we've learned from across industries to deliver PHP code faster without sacrificing quality, user experience, or existing workflows.
You will learn:
How to dig deep into application behavior and performance at runtime
How to maximize existing continuous delivery principles and tools
When to take advantage of existing frameworks and extensions and when to do it yourself
How to avoid reinventing the wheel each time you deploy, upgrade, or rollback
10. 10
“WaterGile” anyone?
• Teams within an organization subscribing to Agile methodology
• Teams often isolated – entire company didn’t buy into Agile
methodologies
• Still gather requirements, development broken down into iterations to
build according to user stories
16. 16
Typical release (many features to all)
Add a map
displaying available
cars to rent within
10 km radius
Released to all
Impact?
Which new feature
caused it?
PANIC!
Overload – servers
down, root cause
unknown
17. 17
Release single feature to some users
Add a map
displaying available
cars to rent within
10 km radius
Release to 20%
of users
Compare with 80%
Change in a query,
or amount of data
returned
Fix
or
turn of
Overloaded CPU –
some servers down
18. 18
Tools to use
• Instrument your code
– PHP feature toggle (qandidate-toggle) – release to a subset of users
• Zend Server Monitoring – complete solution to monitor behavior an
application – will catches the 20% spike in CPU usage quickly and easily
19. 19
It’s working… ramp it up!
10% more rentals
per visitor on
version with map
Little to no change
in performance
Release to
everyone
Add a map
displaying available
cars to rent within
10 km radius
Release to 50%
more users
26. 26
What is it?
• CI automates:
– Building
– Packaging
– Testing
– Deploying
• If build breaks, developer who broke it fixes it
• If build passes, it’s production ready
27. 27
Typical CI pipeline
Git clone
Composer
install
Unit test
Static
Analysis
Deploy to
test
Functional
test
Deploy to
Staging
Deploy to
prod
Add a map
displaying available
cars to rent within
10 km radius
Package
37. 37
Simulate a browser request and ensure
that a map loads, and that the map has
the number of vehicles available for rent
Functiona
l
getCars($criteria, $radius)
$map->plotCoordinates($cars)
$modelView->assign(‘map’, $map)
Unit
Load 1,000 concurrent search requests
for cars from 1000 different locations Load
Testing Steps
Add a map
displaying available
cars to rent within
10 km radius
43. 43
Poll #5 related DevOps responses
• DevOps maturity survey poll – What
simplified software development the
most in past year
– 35% some type of framework
44. 44
Evolution of frameworks
• MVC full functionality
– All or nothing
• Component frameworks
– No lock-in
– Choose your stack
• MVC out, middleware in
• Microservice architecture
45. 45
Tools that can help
So many…
• Zend Framework: ZF3, Expressive, Apigility
• Laravel, Symfony, Slim, and many more
47. 47
Catch bugs early
• Remember how a bug in prod can cost as much as 15X times the cost of
a bug in development?
48. 48
How do you catch bugs early?
• Test early, test often – during
development, local before
commit
• Static Analysis
• Peer reviews
• Code instrumentation tools
51. 51
Infrastructure should also be
automated
• Automate server provisioning
– Chef, Puppet, Ansible, Salt, others…
• Version environment build configs
• Goal = fully rebuild environment automatically on fail
52. 52
Another example – dealnews.com
• In the past 2 weeks
– Deployed web application 64 times – average 6.5 times a day
– Deployed configuration management changes 12 times
– Deployed MySQL schema changes 13 times
- Courtesy of Brian Moon
54. 54
What it may look like
• Container-ize all the things
– No longer push code to servers
– Push new servers containing code/application
• Environment templates
– Traditional hardware or VM
– Provision with new code, destroy old when users
moved
– Netflix does their interpretation of this