SlideShare ist ein Scribd-Unternehmen logo
1 von 29
<?php 
presents 
echo "Google App Engine For 
PHP"; 
?>
A quick slide about SDPHP 
Social and Communications: 
● MeetUp: http://www.meetup.com/SanDiegoPHP/ 
● Facebook: https://www.facebook.com/groups/SanDiegoPUG/ 
● Github: https://github.com/sdphp 
● Twitter: @sdphp 
● IRC: freenode.net #sdphp 
Website: http://www.sdphp.org/ 
● Mentoring Program - http://www.sdphp.org/sdphp-mentoring-program/ 
● PHP Resources - http://www.sdphp.org/php-resources/ 
● Job Listing - http://www.sdphp.org/job-listings/ 
Two Monthly Group Meetings (held on different days) 
● Downtown San Diego 
● North County - Carlsbad 
Speakers welcome 
and get a cool 
SDPHP pint glass.
A quick slide about Me 
Eric Van Johnson 
PHP Developer and Architect and an Organizer of SDPHP 
● Github: https://github.com/shocm 
● LinkedIn: http://www.linkedin.com/in/vanjohnson 
● Twitter: @shocm 
● IRC: @shocm 
● Website: www.shocm.com
What is Google App Engine 
Google App Engine (GAE) is Google Platform As A Service 
(PaaS). 
PaaS solutions are designed to supply a full solution stacks 
"as a service". 
Pros include no server administration, no patching, very 
low-maintenance, and auto scaling. 
Cons are that these solutions can be pretty restrictive 
environments to work in. 
Other PHP PaaS Solution include Engine Yard, Red Hat 
OpenShift, Zend PHPCloud, and Appfog
History of GAE 
April 7, 2008 - Google announces Google App 
Engine, their new PaaS solution with support 
for the Python Programming language. 
April 8, 2008 - Feature request #13 was 
opened up asking for PHP support 
2009 - Google adds Support for Java to GAE. 
This, by extension, opened the door to running 
other JVM languages such as Groovy, JRuby, 
Scala, Clojure and Jython.
More History of GAE 
May 2011 (Google I/O 2011) Experimental 
Support for the Google Language Go is 
announced on GAE. 
May 2013 (Google I/O 2013) Experimental 
Support for PHP is announced on GAE. Over 
3300 people had starred the original Issue #13.
GAE and PHP 
GAE (currently version 1.8.0) runs a harden 
version of the Open Source PHP 5.4 interpreter 
Extensions loaded in GAE 
Core, GAE Runtime Module, OAuth, PDO, Reflection, SPL, SimpleXML, apc, 
bcmath, calendar, ctype, date, dom, ereg, filter, gd, 
google_cloud_sql_mysqlnd_plugin, hash, iconv, json, libxml, mbstring, mcrypt, 
memcache, memcached, mysql, mysqli, mysqlnd, openssl, pcre, pdo_mysql, 
session, shmop, soap, standard, tokenizer, urlfetch_stream_wrapper_plugin, 
xml, xmlreader, xmlwriter, zlib
GAE PHP Site 
https://developers.google.com/appengine/docs/php/gettingstarted/introduction
GAE PHP SDK 
https://developers.google.com/appengine/docs/php/gettingstarted/installing
GAE PHP Tools 
GUI Version
GAE PHP Tools 
GAE PHP uses PHP-CGI so you need to define the path to you PHP-CGI in 
your configuration
GAE PHP Tools 
GAE PHP also can be used from the command line 
dev_appserver is a complete complete simulation of the GAE production 
environment. GAE services such as Memcache, Task Queue, and Cron Job
App.yaml 
GAE uses a YAML file to define a lot of the aspects of your application. 
Things that can be defined in the 
app.yaml file include; 
● What programing engine to use 
● The version of the application 
● Url mapping (using regular 
expression) 
● Url level security (Both "login" and 
"admin" roles) 
● Static Directories 
● Cache times of static resources 
● Require HTTPS ● Libraries (Python) ● Resource Files (Java)
GAE Environment 
GAE differs from your typical LAMP Stack. On the plus side, services like 
Memcache are automagically enabled and configured for your application. 
However there are also negative issues, sort of, like the fact that you do not 
have access to the local file system so you are unable to write to any local file 
system.
Google Cloud SQL 
● A fully managed, MySQL 5.5 compatible 
database service. 
● Highly durable, highly available 
● Automatically backed up. 
● One Click restores 
Google Cloud SQL propagates writes out to multiple datacenters. 
Pricing 
Interesting pricing models. You can pay for Cloud SQL on a per hour usage. You can also pay for the 
service in the increments of time you are actually doing reads and writes to the database. This comes in 
handy for QA and Staging environments where you may only use the database for very small amounts of 
time. The Database can sit there, not being used, and you would not pay for it. 
Pricing ranges from $0.10 for a million I/O to $1.46 a day up to $46.84 a day. 
https://cloud.google.com/pricing/cloud-sql
Google Cloud SQL 
Google Cloud Service supports 3 major ways 
to connect to your SQL Instance. PDO, 
mysql_connect, and mysqli. 
https://developers.google.com/appengine/docs/php/cloud-sql/developers-guide 
* deprecated
Google Cloud SQL 
Once connected, MySQL works pretty much as 
expected in PHP. The only difference is 
instead of connecting to a IP address or Host, 
you connect to your 
project_name:instance_name 
Example of a MySQL Query. 
https://developers.google.com/appengine/docs/php/cloud-sql/developers-guide
Google Cloud Storage 
● Fast, reliable, and durable 
● Fine grained access control (you can 
control exactly who can read and write to 
each file) 
● Can be used to publish public web content 
● Access your files from GAE, RESTful 
APIs, or Web Based GUI 
The simplest way to write data to Google Cloud Storage from your app is to use 
file_put_contents as follows: 
$options = [ "gs" => [ "Content-Type" => "text/plain" ]]; 
$ctx = stream_context_create($options); 
file_put_contents("gs://my_bucket/hello.txt", "Hello", 0, $ctx); 
Alternatively, you could use fopen/fwrite to write data in a streaming fashion instead 
$fp = fopen("gs://my_bucket/some_file.txt", "w"); 
fwrite($fp, "Hello"); 
fclose($fp); 
https://developers.google.com/appengine/docs/php/googlestorage/overview
Memcache 
GAE has zero-configuration of the memcache service out of the box in both 
your local development environment as well as in the GAE Cloud environment. 
This means data you need to access frequently and quickly, or data that may 
be process intensive and timely to create, can be stored in memcache. 
You can use the Memcache Library 
$memcache = new Memcache; 
$memcache->set('foo', 'bar'); 
print $memcache->get('foo'); //prints 'bar' 
Alternatively you can use the Memcached Library 
$memcached = new Memcached; 
$memcached->set('foo', 'bar'); 
print $memcached->get('foo'); //prints 'bar' 
https://developers.google.com/appengine/docs/php/memcache/?hl=en
Task Queue 
The Task Queue PHP API allows you to run long 
processes outside the scope of a user request. For 
example you can schedule an email campaign as a 
task. 
https://developers.google.com/appengine/docs/php/taskqueue/ 
Mail PHP API 
Applications hosted on App Engine do have 
the ability to send emails on behalf of the 
applications administrators or any user of the 
application with a Google Account. Emails can 
have attachments. 
Applications can also receive emails. 
https://developers.google.com/appengine/docs/php/mail/
Logs PHP API 
You do have access to your applications logs and you can even write to your 
logs by invoking the syslog() call from you application. 
if (authorized_user()) { 
// Some success code 
} else { 
syslog(LOG_WARNING, "Unauthorized access attempted"); 
} 
The first 100 megabytes of logs data retrieved per day via the Logs API calls are free. 
https://developers.google.com/appengine/docs/php/logs/ 
Customizing your PHP.ini file 
You can include a php.ini file with your App Engine application 
and override any PHP directive that has one of the following 
changeable mode values: 
● PHP_INI_SYSTEM 
● PHP_INI_ALL 
● PHP_INI_PERDIR 
https://developers.google.com/appengine/docs/php/config/php_ini
Cron Jobs 
You do have the ability to define scheduled cron jobs within your application. 
cron: 
- description: daily summary job 
url: /tasks/summary 
schedule: every 24 hours 
- description: monday morning mailout 
url: /mail/weekly 
schedule: every monday 09:00 
timezone: Australia/NSW 
https://developers.google.com/appengine/docs/php/config/cron 
DoS Protection Service for PHP 
The App Engine Denial of Service (DoS) Protection Service 
enables you to protect your application from running out of quota 
when subjected to denial of service attacks by allowing you to 
blacklist IP addresses or subnets 
https://developers.google.com/appengine/docs/php/config/dos
App Engine Dashboards 
Cloud Development
Deploying your application 
https://developers.google.com/appengine/docs/php/gettingstarted/uploading 
<side note> 
You can also use Git to Push and Deploy 
https://developers.google.com/appengine/docs/push-to-deploy
Running Multiple Environments 
You can run multiple environments in one App Engine Application. You control 
this by defining the correct "version" you wish to deploy to.
What can you do with PHP 
and Google App Engine? 
Custom Application? 
Yes provided you are willing to work within 
the limitations of the environment and 
extensions. 
Wordpress? 
Yep, this is one of their "sample apps". 
There are some limitations and a couple 
really simple customizations that need to 
be done. Full steps are on their web site 
https://developers.google.com/appengine/ 
articles/wordpress 
Drupal? 
Yes according to the one of the presenters 
and early testers at Google I/O who spoke 
about using GAE PHP 
Frameworks? Uncertain. Not tested.
DEMO TIME 
IF WE HAVE 
TIME ...
Drawbacks ... 
● Very limited "Free Tier" to use. 
● Lack of support for many established and popular PHP 
solutions such as CMS and eCommerce Solutions. 
BU$INE$$ IDEA!!!! 
Customize established and popular PHP solutions such as 
CMS and eCommerce solutions to run on Google App Engine
THANK YOU! 
Eric Van Johnson 
● Twitter: @shocm 
● IRC: @shocm 
● Website: www.shocm.com

Weitere ähnliche Inhalte

Was ist angesagt?

Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...IT Event
 
Using an API
Using an APIUsing an API
Using an APIAdam Culp
 
Great APIs - Future of Your Progress App
Great APIs - Future of Your Progress AppGreat APIs - Future of Your Progress App
Great APIs - Future of Your Progress AppGabriel Lucaciu
 
Apache httpd 2.4 Reverse Proxy: The Hidden Gem
Apache httpd 2.4 Reverse Proxy: The Hidden GemApache httpd 2.4 Reverse Proxy: The Hidden Gem
Apache httpd 2.4 Reverse Proxy: The Hidden GemJim Jagielski
 
Getting Started With Django
Getting Started With DjangoGetting Started With Django
Getting Started With Djangojeff_croft
 
Building dynamic websites with Mod perl and apache
Building dynamic websites with Mod perl and apacheBuilding dynamic websites with Mod perl and apache
Building dynamic websites with Mod perl and apacheKamal Nayan
 
Intro to Web Development Using Python and Django
Intro to Web Development Using Python and DjangoIntro to Web Development Using Python and Django
Intro to Web Development Using Python and DjangoChariza Pladin
 
Best Practices for Front-End Django Developers
Best Practices for Front-End Django DevelopersBest Practices for Front-End Django Developers
Best Practices for Front-End Django DevelopersChristine Cheung
 
Rapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 PlatformRapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 PlatformWSO2
 
Functional testing your Grails app with GEB
Functional testing your Grails app with GEBFunctional testing your Grails app with GEB
Functional testing your Grails app with GEBGR8Conf
 
Front End Development for Back End Java Developers - NYJavaSIG 2019
Front End Development for Back End Java Developers - NYJavaSIG 2019Front End Development for Back End Java Developers - NYJavaSIG 2019
Front End Development for Back End Java Developers - NYJavaSIG 2019Matt Raible
 
Apache HTTPD 2.4 - GWO2016
Apache HTTPD 2.4 - GWO2016Apache HTTPD 2.4 - GWO2016
Apache HTTPD 2.4 - GWO2016Jim Jagielski
 
A peek into the world of WordPress plugin development
A peek into the world of WordPress plugin developmentA peek into the world of WordPress plugin development
A peek into the world of WordPress plugin developmentR-Cubed Design Forge
 
A winning combination: Plone as CMS and your favorite Python web framework as...
A winning combination: Plone as CMS and your favorite Python web framework as...A winning combination: Plone as CMS and your favorite Python web framework as...
A winning combination: Plone as CMS and your favorite Python web framework as...Carlos de la Guardia
 
HTML5 for PHP Developers - IPC
HTML5 for PHP Developers - IPCHTML5 for PHP Developers - IPC
HTML5 for PHP Developers - IPCMayflower GmbH
 
A web perf dashboard up & running in 90 minutes presentation
A web perf dashboard up & running in 90 minutes presentationA web perf dashboard up & running in 90 minutes presentation
A web perf dashboard up & running in 90 minutes presentationJustin Dorfman
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkitPaul Jensen
 
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...Otto Kekäläinen
 

Was ist angesagt? (20)

Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
Oleh Zasadnyy "Progressive Web Apps: line between web and native apps become ...
 
Succeeding with FOSS!
Succeeding with FOSS!Succeeding with FOSS!
Succeeding with FOSS!
 
Using an API
Using an APIUsing an API
Using an API
 
Great APIs - Future of Your Progress App
Great APIs - Future of Your Progress AppGreat APIs - Future of Your Progress App
Great APIs - Future of Your Progress App
 
Apache httpd 2.4 Reverse Proxy: The Hidden Gem
Apache httpd 2.4 Reverse Proxy: The Hidden GemApache httpd 2.4 Reverse Proxy: The Hidden Gem
Apache httpd 2.4 Reverse Proxy: The Hidden Gem
 
Getting Started With Django
Getting Started With DjangoGetting Started With Django
Getting Started With Django
 
Web Components and PWA
Web Components and PWAWeb Components and PWA
Web Components and PWA
 
Building dynamic websites with Mod perl and apache
Building dynamic websites with Mod perl and apacheBuilding dynamic websites with Mod perl and apache
Building dynamic websites with Mod perl and apache
 
Intro to Web Development Using Python and Django
Intro to Web Development Using Python and DjangoIntro to Web Development Using Python and Django
Intro to Web Development Using Python and Django
 
Best Practices for Front-End Django Developers
Best Practices for Front-End Django DevelopersBest Practices for Front-End Django Developers
Best Practices for Front-End Django Developers
 
Rapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 PlatformRapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 Platform
 
Functional testing your Grails app with GEB
Functional testing your Grails app with GEBFunctional testing your Grails app with GEB
Functional testing your Grails app with GEB
 
Front End Development for Back End Java Developers - NYJavaSIG 2019
Front End Development for Back End Java Developers - NYJavaSIG 2019Front End Development for Back End Java Developers - NYJavaSIG 2019
Front End Development for Back End Java Developers - NYJavaSIG 2019
 
Apache HTTPD 2.4 - GWO2016
Apache HTTPD 2.4 - GWO2016Apache HTTPD 2.4 - GWO2016
Apache HTTPD 2.4 - GWO2016
 
A peek into the world of WordPress plugin development
A peek into the world of WordPress plugin developmentA peek into the world of WordPress plugin development
A peek into the world of WordPress plugin development
 
A winning combination: Plone as CMS and your favorite Python web framework as...
A winning combination: Plone as CMS and your favorite Python web framework as...A winning combination: Plone as CMS and your favorite Python web framework as...
A winning combination: Plone as CMS and your favorite Python web framework as...
 
HTML5 for PHP Developers - IPC
HTML5 for PHP Developers - IPCHTML5 for PHP Developers - IPC
HTML5 for PHP Developers - IPC
 
A web perf dashboard up & running in 90 minutes presentation
A web perf dashboard up & running in 90 minutes presentationA web perf dashboard up & running in 90 minutes presentation
A web perf dashboard up & running in 90 minutes presentation
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkit
 
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
 

Ähnlich wie Google App Engine for PHP

Introduction to Google App Engine with Python
Introduction to Google App Engine with PythonIntroduction to Google App Engine with Python
Introduction to Google App Engine with PythonBrian Lyttle
 
Google Cloud Developer Challenge - GDG Belgaum
Google Cloud Developer Challenge - GDG BelgaumGoogle Cloud Developer Challenge - GDG Belgaum
Google Cloud Developer Challenge - GDG Belgaumsandeephegde
 
Powerful Google Cloud tools for your hack
Powerful Google Cloud tools for your hackPowerful Google Cloud tools for your hack
Powerful Google Cloud tools for your hackwesley chun
 
Accessing Google Cloud APIs
Accessing Google Cloud APIsAccessing Google Cloud APIs
Accessing Google Cloud APIswesley chun
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Pythonwesley chun
 
Introduction to serverless computing on Google Cloud
Introduction to serverless computing on Google CloudIntroduction to serverless computing on Google Cloud
Introduction to serverless computing on Google Cloudwesley chun
 
Deploy a PHP App on Google App Engine
Deploy a PHP App on Google App EngineDeploy a PHP App on Google App Engine
Deploy a PHP App on Google App EngineMichele Orselli
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for JavaLars Vogel
 
Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)wesley chun
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Pythonwesley chun
 
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud RunDesigning flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Runwesley chun
 
Developing Java Web Applications In Google App Engine
Developing Java Web Applications In Google App EngineDeveloping Java Web Applications In Google App Engine
Developing Java Web Applications In Google App EngineTahir Akram
 
appengine ja night #25 Google App Engine for PHP (English)
appengine ja night #25 Google App Engine for PHP (English)appengine ja night #25 Google App Engine for PHP (English)
appengine ja night #25 Google App Engine for PHP (English)Ryo Yamasaki
 
Advantages of golang development services &amp; 10 most used go frameworks
Advantages of golang development services &amp; 10 most used go frameworksAdvantages of golang development services &amp; 10 most used go frameworks
Advantages of golang development services &amp; 10 most used go frameworksKaty Slemon
 
Exploring Google (Cloud) APIs & Cloud Computing overview
Exploring Google (Cloud) APIs & Cloud Computing overviewExploring Google (Cloud) APIs & Cloud Computing overview
Exploring Google (Cloud) APIs & Cloud Computing overviewwesley chun
 
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeededm00se
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Mack Hardy
 

Ähnlich wie Google App Engine for PHP (20)

Introduction to Google App Engine with Python
Introduction to Google App Engine with PythonIntroduction to Google App Engine with Python
Introduction to Google App Engine with Python
 
Google Cloud Developer Challenge - GDG Belgaum
Google Cloud Developer Challenge - GDG BelgaumGoogle Cloud Developer Challenge - GDG Belgaum
Google Cloud Developer Challenge - GDG Belgaum
 
Google Cloud Platform
Google Cloud Platform Google Cloud Platform
Google Cloud Platform
 
Powerful Google Cloud tools for your hack
Powerful Google Cloud tools for your hackPowerful Google Cloud tools for your hack
Powerful Google Cloud tools for your hack
 
Accessing Google Cloud APIs
Accessing Google Cloud APIsAccessing Google Cloud APIs
Accessing Google Cloud APIs
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Python
 
Introduction to serverless computing on Google Cloud
Introduction to serverless computing on Google CloudIntroduction to serverless computing on Google Cloud
Introduction to serverless computing on Google Cloud
 
Deploy a PHP App on Google App Engine
Deploy a PHP App on Google App EngineDeploy a PHP App on Google App Engine
Deploy a PHP App on Google App Engine
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
 
Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)Powerful Google developer tools for immediate impact! (2023-24 A)
Powerful Google developer tools for immediate impact! (2023-24 A)
 
Exploring Google APIs with Python
Exploring Google APIs with PythonExploring Google APIs with Python
Exploring Google APIs with Python
 
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud RunDesigning flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
 
Developing Java Web Applications In Google App Engine
Developing Java Web Applications In Google App EngineDeveloping Java Web Applications In Google App Engine
Developing Java Web Applications In Google App Engine
 
appengine ja night #25 Google App Engine for PHP (English)
appengine ja night #25 Google App Engine for PHP (English)appengine ja night #25 Google App Engine for PHP (English)
appengine ja night #25 Google App Engine for PHP (English)
 
Advantages of golang development services &amp; 10 most used go frameworks
Advantages of golang development services &amp; 10 most used go frameworksAdvantages of golang development services &amp; 10 most used go frameworks
Advantages of golang development services &amp; 10 most used go frameworks
 
Exploring Google (Cloud) APIs & Cloud Computing overview
Exploring Google (Cloud) APIs & Cloud Computing overviewExploring Google (Cloud) APIs & Cloud Computing overview
Exploring Google (Cloud) APIs & Cloud Computing overview
 
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
 
App_Engine_PPT.ppt
App_Engine_PPT.pptApp_Engine_PPT.ppt
App_Engine_PPT.ppt
 
App_Engine_PPT.ppt
App_Engine_PPT.pptApp_Engine_PPT.ppt
App_Engine_PPT.ppt
 

Mehr von Eric Johnson

Deploy Laravel on Heroku
Deploy Laravel on HerokuDeploy Laravel on Heroku
Deploy Laravel on HerokuEric Johnson
 
Git - the stupid content tracker
Git - the stupid content trackerGit - the stupid content tracker
Git - the stupid content trackerEric Johnson
 
Composer Lightning Talk
Composer Lightning TalkComposer Lightning Talk
Composer Lightning TalkEric Johnson
 
Introduction to PHP (SDPHP)
Introduction to PHP   (SDPHP)Introduction to PHP   (SDPHP)
Introduction to PHP (SDPHP)Eric Johnson
 
Intro to CakePHP - SDPHP MeetUp Dec 2012
Intro to CakePHP - SDPHP MeetUp Dec 2012Intro to CakePHP - SDPHP MeetUp Dec 2012
Intro to CakePHP - SDPHP MeetUp Dec 2012Eric Johnson
 
Introduction to PHP - SDPHP
Introduction to PHP - SDPHPIntroduction to PHP - SDPHP
Introduction to PHP - SDPHPEric Johnson
 

Mehr von Eric Johnson (6)

Deploy Laravel on Heroku
Deploy Laravel on HerokuDeploy Laravel on Heroku
Deploy Laravel on Heroku
 
Git - the stupid content tracker
Git - the stupid content trackerGit - the stupid content tracker
Git - the stupid content tracker
 
Composer Lightning Talk
Composer Lightning TalkComposer Lightning Talk
Composer Lightning Talk
 
Introduction to PHP (SDPHP)
Introduction to PHP   (SDPHP)Introduction to PHP   (SDPHP)
Introduction to PHP (SDPHP)
 
Intro to CakePHP - SDPHP MeetUp Dec 2012
Intro to CakePHP - SDPHP MeetUp Dec 2012Intro to CakePHP - SDPHP MeetUp Dec 2012
Intro to CakePHP - SDPHP MeetUp Dec 2012
 
Introduction to PHP - SDPHP
Introduction to PHP - SDPHPIntroduction to PHP - SDPHP
Introduction to PHP - SDPHP
 

Kürzlich hochgeladen

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Kürzlich hochgeladen (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

Google App Engine for PHP

  • 1. <?php presents echo "Google App Engine For PHP"; ?>
  • 2. A quick slide about SDPHP Social and Communications: ● MeetUp: http://www.meetup.com/SanDiegoPHP/ ● Facebook: https://www.facebook.com/groups/SanDiegoPUG/ ● Github: https://github.com/sdphp ● Twitter: @sdphp ● IRC: freenode.net #sdphp Website: http://www.sdphp.org/ ● Mentoring Program - http://www.sdphp.org/sdphp-mentoring-program/ ● PHP Resources - http://www.sdphp.org/php-resources/ ● Job Listing - http://www.sdphp.org/job-listings/ Two Monthly Group Meetings (held on different days) ● Downtown San Diego ● North County - Carlsbad Speakers welcome and get a cool SDPHP pint glass.
  • 3. A quick slide about Me Eric Van Johnson PHP Developer and Architect and an Organizer of SDPHP ● Github: https://github.com/shocm ● LinkedIn: http://www.linkedin.com/in/vanjohnson ● Twitter: @shocm ● IRC: @shocm ● Website: www.shocm.com
  • 4. What is Google App Engine Google App Engine (GAE) is Google Platform As A Service (PaaS). PaaS solutions are designed to supply a full solution stacks "as a service". Pros include no server administration, no patching, very low-maintenance, and auto scaling. Cons are that these solutions can be pretty restrictive environments to work in. Other PHP PaaS Solution include Engine Yard, Red Hat OpenShift, Zend PHPCloud, and Appfog
  • 5. History of GAE April 7, 2008 - Google announces Google App Engine, their new PaaS solution with support for the Python Programming language. April 8, 2008 - Feature request #13 was opened up asking for PHP support 2009 - Google adds Support for Java to GAE. This, by extension, opened the door to running other JVM languages such as Groovy, JRuby, Scala, Clojure and Jython.
  • 6. More History of GAE May 2011 (Google I/O 2011) Experimental Support for the Google Language Go is announced on GAE. May 2013 (Google I/O 2013) Experimental Support for PHP is announced on GAE. Over 3300 people had starred the original Issue #13.
  • 7. GAE and PHP GAE (currently version 1.8.0) runs a harden version of the Open Source PHP 5.4 interpreter Extensions loaded in GAE Core, GAE Runtime Module, OAuth, PDO, Reflection, SPL, SimpleXML, apc, bcmath, calendar, ctype, date, dom, ereg, filter, gd, google_cloud_sql_mysqlnd_plugin, hash, iconv, json, libxml, mbstring, mcrypt, memcache, memcached, mysql, mysqli, mysqlnd, openssl, pcre, pdo_mysql, session, shmop, soap, standard, tokenizer, urlfetch_stream_wrapper_plugin, xml, xmlreader, xmlwriter, zlib
  • 8. GAE PHP Site https://developers.google.com/appengine/docs/php/gettingstarted/introduction
  • 9. GAE PHP SDK https://developers.google.com/appengine/docs/php/gettingstarted/installing
  • 10. GAE PHP Tools GUI Version
  • 11. GAE PHP Tools GAE PHP uses PHP-CGI so you need to define the path to you PHP-CGI in your configuration
  • 12. GAE PHP Tools GAE PHP also can be used from the command line dev_appserver is a complete complete simulation of the GAE production environment. GAE services such as Memcache, Task Queue, and Cron Job
  • 13. App.yaml GAE uses a YAML file to define a lot of the aspects of your application. Things that can be defined in the app.yaml file include; ● What programing engine to use ● The version of the application ● Url mapping (using regular expression) ● Url level security (Both "login" and "admin" roles) ● Static Directories ● Cache times of static resources ● Require HTTPS ● Libraries (Python) ● Resource Files (Java)
  • 14. GAE Environment GAE differs from your typical LAMP Stack. On the plus side, services like Memcache are automagically enabled and configured for your application. However there are also negative issues, sort of, like the fact that you do not have access to the local file system so you are unable to write to any local file system.
  • 15. Google Cloud SQL ● A fully managed, MySQL 5.5 compatible database service. ● Highly durable, highly available ● Automatically backed up. ● One Click restores Google Cloud SQL propagates writes out to multiple datacenters. Pricing Interesting pricing models. You can pay for Cloud SQL on a per hour usage. You can also pay for the service in the increments of time you are actually doing reads and writes to the database. This comes in handy for QA and Staging environments where you may only use the database for very small amounts of time. The Database can sit there, not being used, and you would not pay for it. Pricing ranges from $0.10 for a million I/O to $1.46 a day up to $46.84 a day. https://cloud.google.com/pricing/cloud-sql
  • 16. Google Cloud SQL Google Cloud Service supports 3 major ways to connect to your SQL Instance. PDO, mysql_connect, and mysqli. https://developers.google.com/appengine/docs/php/cloud-sql/developers-guide * deprecated
  • 17. Google Cloud SQL Once connected, MySQL works pretty much as expected in PHP. The only difference is instead of connecting to a IP address or Host, you connect to your project_name:instance_name Example of a MySQL Query. https://developers.google.com/appengine/docs/php/cloud-sql/developers-guide
  • 18. Google Cloud Storage ● Fast, reliable, and durable ● Fine grained access control (you can control exactly who can read and write to each file) ● Can be used to publish public web content ● Access your files from GAE, RESTful APIs, or Web Based GUI The simplest way to write data to Google Cloud Storage from your app is to use file_put_contents as follows: $options = [ "gs" => [ "Content-Type" => "text/plain" ]]; $ctx = stream_context_create($options); file_put_contents("gs://my_bucket/hello.txt", "Hello", 0, $ctx); Alternatively, you could use fopen/fwrite to write data in a streaming fashion instead $fp = fopen("gs://my_bucket/some_file.txt", "w"); fwrite($fp, "Hello"); fclose($fp); https://developers.google.com/appengine/docs/php/googlestorage/overview
  • 19. Memcache GAE has zero-configuration of the memcache service out of the box in both your local development environment as well as in the GAE Cloud environment. This means data you need to access frequently and quickly, or data that may be process intensive and timely to create, can be stored in memcache. You can use the Memcache Library $memcache = new Memcache; $memcache->set('foo', 'bar'); print $memcache->get('foo'); //prints 'bar' Alternatively you can use the Memcached Library $memcached = new Memcached; $memcached->set('foo', 'bar'); print $memcached->get('foo'); //prints 'bar' https://developers.google.com/appengine/docs/php/memcache/?hl=en
  • 20. Task Queue The Task Queue PHP API allows you to run long processes outside the scope of a user request. For example you can schedule an email campaign as a task. https://developers.google.com/appengine/docs/php/taskqueue/ Mail PHP API Applications hosted on App Engine do have the ability to send emails on behalf of the applications administrators or any user of the application with a Google Account. Emails can have attachments. Applications can also receive emails. https://developers.google.com/appengine/docs/php/mail/
  • 21. Logs PHP API You do have access to your applications logs and you can even write to your logs by invoking the syslog() call from you application. if (authorized_user()) { // Some success code } else { syslog(LOG_WARNING, "Unauthorized access attempted"); } The first 100 megabytes of logs data retrieved per day via the Logs API calls are free. https://developers.google.com/appengine/docs/php/logs/ Customizing your PHP.ini file You can include a php.ini file with your App Engine application and override any PHP directive that has one of the following changeable mode values: ● PHP_INI_SYSTEM ● PHP_INI_ALL ● PHP_INI_PERDIR https://developers.google.com/appengine/docs/php/config/php_ini
  • 22. Cron Jobs You do have the ability to define scheduled cron jobs within your application. cron: - description: daily summary job url: /tasks/summary schedule: every 24 hours - description: monday morning mailout url: /mail/weekly schedule: every monday 09:00 timezone: Australia/NSW https://developers.google.com/appengine/docs/php/config/cron DoS Protection Service for PHP The App Engine Denial of Service (DoS) Protection Service enables you to protect your application from running out of quota when subjected to denial of service attacks by allowing you to blacklist IP addresses or subnets https://developers.google.com/appengine/docs/php/config/dos
  • 23. App Engine Dashboards Cloud Development
  • 24. Deploying your application https://developers.google.com/appengine/docs/php/gettingstarted/uploading <side note> You can also use Git to Push and Deploy https://developers.google.com/appengine/docs/push-to-deploy
  • 25. Running Multiple Environments You can run multiple environments in one App Engine Application. You control this by defining the correct "version" you wish to deploy to.
  • 26. What can you do with PHP and Google App Engine? Custom Application? Yes provided you are willing to work within the limitations of the environment and extensions. Wordpress? Yep, this is one of their "sample apps". There are some limitations and a couple really simple customizations that need to be done. Full steps are on their web site https://developers.google.com/appengine/ articles/wordpress Drupal? Yes according to the one of the presenters and early testers at Google I/O who spoke about using GAE PHP Frameworks? Uncertain. Not tested.
  • 27. DEMO TIME IF WE HAVE TIME ...
  • 28. Drawbacks ... ● Very limited "Free Tier" to use. ● Lack of support for many established and popular PHP solutions such as CMS and eCommerce Solutions. BU$INE$$ IDEA!!!! Customize established and popular PHP solutions such as CMS and eCommerce solutions to run on Google App Engine
  • 29. THANK YOU! Eric Van Johnson ● Twitter: @shocm ● IRC: @shocm ● Website: www.shocm.com