APIs at Scale
APIs at Scale
$85.99
Regular Price
$79.00
Bundle Price

APIs at Scale

Build APIs You Won't Hate
Scaling PHP7 Applications
The following 2 books are included in this bundle...

About the Bundle

An API is often one of the most hard-working pieces of any modern architecture. Your frontend, mobile apps and background processes are all hammering away on the API and you have to make sure you keep it up. If, like 80% of the internet you've chosen to use PHP then you will need a little help, and Steven and Phil can both help you build a high quality, high availability API.

  • Share this bundle

About the Books

Build APIs You Won't Hate

Build APIs You Won't Hate

Everyone and their dog wants an API, so you should probably learn how to build them.
  • 4,263

    Readers

  • 194

    Pages

  • 38,206

    Words

  • 100%

    Complete

  • PDF

  • EPUB

  • MOBI

  • APP

API development is becoming increasingly common for server-side developers thanks to the rise of front-end JavaScript frameworks, iPhone applications, and API-centric architectures. It might seem like grabbing stuff from a data source and shoving it out as JSON would be easy, but surviving changes in business logic, database schema updates, new features, or deprecated endpoints can be a nightmare.

After finding many of the existing resources for API development to be lacking, Phil learned a lot of things the hard way through years of trial and error. This book aims to condense that experience, taking examples and explanations further than the trivial apples and pears nonsense tutorials often provide.

Phil worked primarily as an API developer for the last three years. One horror was managing an API built in FuelPHP by a freelancer at the million dollar startup he joined. It was utilizing a then deprecated ORM which had been hacked to death by the previous developer, so took the time to delete that mess and build the next version in Laravel, leveraging it's simple routing, database migrations, schema, seeding, etc. When the following major version of the API was built no rewrite was required, and both managed to live side-by-side on the same "API" servers.

By passing on some best practices and general good advice you can hit the ground running with API development, combined with some horror stories and how they were overcome/avoided/averted. This book will discuss the theory of designing and building APIs in any language or framework, with this theory applied in PHP-based examples.

Some of the more advanced topics covered here are endpoint testing, embedding data objects in a consistent and scalable manner, paginating responses (including embedded objects) and hypermedia "HATEOAS" controls.

Scaling PHP7 Applications

Scaling PHP7 Applications

5+ years of lessons learnt Scaling PHP to billions of requests per second
  • 301

    Readers

  • 210

    Pages

  • 62,469

    Words

  • 100%

    Complete

  • PDF

  • EPUB

  • MOBI

  • APP

I'm going to teach you how to scale PHP

Stop playing sysadmin and get back to coding. You didn't sign up to put out fires and figuring out how to scale MySQL isn't exactly going to ship features any faster. You know that learning the intricaces of my.cnf is a waste of time, but you don't have another choice. In the book, you'll get a crash-course on every important tuning option, why it matters, and a quick formula to figure out the perfect settings for your hardware. Bliss.

You've heard alot about Nginx and horizontal scaling, and there're thousands of tutorials out there, but the quality ranges from abysmal to "this must be a joke", and when you finally find a good one, it's usually for Rails. I know what it's like to scramble around, reading bad advice on StackOverflow, copy-and-pasting config files from some message board hope that one of them finally works... pulling at your hair, swearing at the screen.

What if it didn't have to be this way? What if there was a single, high-quality resource of information on scaling PHP, on doing things the right way, that actually focused on PHP and not Rails, Node.js or the flavor of the week? Something that taught you scalable architecture and things you might run into when your only user isn't your mom?

Learn the perfect PHP stack, LHNMPRR

Okay, okay- nothing will ever be as catchy as LAMP ;-)

You'll master a new, more scalable stack called LHNMPRR (Linux, HAProxy, Nginx, MySQL, PHP, Redis, & Resque) that can scale just by throwing more hardware at. You'll be able to finally get your setup to be perfect, all while using a battle tested stack that's been proven to handle billions of requests.

Think of it as your Cheat Code for PHP <?php ↑↑↓↓←→←→BA ?>

You'll also see the exact configurations and technologies that were used and proven at massive scale— 22 billion HTTP requests per month, thousands of MySQL queries per second— basically a metric-truck ton of visitors.

About the Authors

Phil Sturgeon
Phil Sturgeon

Phil has seen a few trends come and go during a long and varied career of building stuff for money as an employee, freelancer, consultant and now CTO. One trend over recent years is the rise of APIs as an everyday part of the average server-side developers job.

Back in 2009 Phil released a CodeIgniter Rest Server, wrote a few articles about how to use it and built handfuls of APIs for his freelance clients. This tool was fairly basic, but covered HTTP-based routing, HTTP Basic/Digest/API Key authentication, added logging and throttling and did not force CRUD-based conventions. The internet seemed to like it, and this code is still used by Apple, the UN and USA.gov.

Later on as a core-contributor to FuelPHP he added this functionality to the core, and again built out a bunch of APIs for people. Then he got a job in NYC, to take over as Lead Engineer for a company that - you guessed it - had a FuelPHP API and wanted to improve it.

After two years of working on their API, Phil has moved to Ride.com, building their API with an amazing team of developers.

Phil has been building APIs for so long, he has come up with a very long list of ways to make them not suck, and he'd like to share the information with you all.

Steve Corona
Steve Corona
About the author

I'm Steve Corona and I've spent the last 4 years scaling Twitpic to handle 60m visitors and 20 billion requests per month.

I live in Charleston, SC and blog about life hacking.

On Twitter, I'm @stevencorona.

The Leanpub Unconditional, No Risk, 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms

Write and Publish on Leanpub

Authors and publishers use Leanpub to publish amazing in-progress and completed ebooks, just like this one. You can use Leanpub to write, publish and sell your book as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub