Serverless, ReactPHP, and Expanding Frontiers, May 2019

(singke) #1

Editorial


Serverless, ReactPHP, and Expanding Frontiers


Oscar Merida


PHP is no longer limited to sitting
behind a web server like Apache or
NGINX waiting for requests to process.
Serverless PHP with AWS’s lambda
service is now possible. At the same
time, you can also write event-driven,
asynchronous servers with ReactPHP.
In this issue, we take a look at these new
ways to use PHP.
Who says you can’t teach an old dog
new skills? While I grew up during the
1980s at the height of the Rubik’s cube
phenomenon, I was never able to solve
it myself. Like many things, I found
that if I couldn’t figure out the solution
on my own, it didn’t hold my interest.
Luckily, in the years since I’ve learned
how to persevere and hunker down to
find a solution.
What’s one key to solving the puzzles
you encounter in life? I’ve found its crit-
ical to be open to learning from others:
“standing on the shoulders of giants” as
is often said. So, over one weekend, I
watched a YouTube video teaching a
method for solving 3x3 cubes. Did I
come up with my own solution? Nope.
Can I now solve a 3x3 cube? Yes.
Sure, there’s a challenge in writing
a routing class for parsing URLs and
invoking the correct controller method.
And yes, you’ll be proud of that class
when its deployed to production and
working as intended. But was that the
best use of your time and efforts? Unless
you’re contributing to a framework or
running into very unique routing prob-
lems, it was not. You would be better
off using any of the existing routers out
there. You would be better off spending
your time to add a feature which users
are asking for and in addressing your
organization’s technical needs.
In Deploying ReactPHP Applications,
Cees-Jan Kiewiet looks at the pieces
involved in running ReactPHP in
production. He shares how to configure
PHP and the server, how to deploy
with Ansible, and the tools he uses to


monitor performance. Rob Allen starts
a series in Serverless PHP With Bref,
Part One. This month, he writes about
how to get started writing a simple
PHP application with Bref on Amazon’s
Lambda serverless computing platform.
If you’re still keeping a PHP 5 appli-
cation running, jump over to Grant
Dickie’s article Department of Breaking
Changes: Launching PHP 7 in a Highly
Available Web World. He shares how the
Digital Media team at NPR migrated to
PHP 7 while improving their build and
deployment processes. It might help
you make a case for a similar under-
taking where you are. Also this month,
Dave Stokes returns to show off another
new feature in MySQL 8.0 Geographic
Information System or How Did I Get
to This Point?. Compared to other data-
base servers, mapping functionality in
MySQL has lagged, and it’s nice to see it
incorporate a proven GIS library in this
release.
In this month’s columns, Eric Mann
explains the crucial differences between
Access Control and Authorization
in Security Corner. Getting the two
confused can open your applications
to being hacked, so make sure you read
his piece. In Education Station, Chris
Tankersley looks at Data Structures,
Part One. While PHP’s basic array is
a jack-of-all-trades, you may run into
situations where you need a dedicated
List, Stack, Queue, or Heap. In this
first part, he’ll explain how each one is
used. In Internal Apparatus: Memory
Abstractions, Edward Barnard comple-
ments Chris’s article by looking at how
memory works, a common bug when
managing memory, and how data
structures are used under the hood.
Eli White wraps up this issue by taking
a look at The State of PHP of finally{}.
Read his article to find out where and
how PHP is being used in 2019.

Write For Us
If you would like to contribute,
contact us, and one of our editors
will be happy to help you hone your
idea and turn it into a beautiful arti-
cle for our magazine.
Visit https://phpa.me/write
or contact our editorial team at
[email protected] and get started!

Stay in Touch
Don't miss out on conference,
book, and special announcments.
Make sure you're connected with us.


Download the Issue's Code
Archive:
http://phpa.me/May2019_code
Free download pdf