Showing posts with label Appengine. Show all posts
Showing posts with label Appengine. Show all posts

Friday, January 31, 2014

PHP development with google App Engine (Implementing and Troubleshooting)

Instagram
      Google App Engine lets you run web applications on Google's infrastructure. It is kind of a platform that you can build application from your preferred programming languages and run them on it.

   This post will discuss how to install App Engine in Linux environment and set it up to do PHP applications. Not much to do... But there will be some issues occur and here talk about how to troubleshoot them... 


[Following directory paths used as I preferred and you can use your own ;)]


Download Google App Engine  and put it in to a location where you preferred.
                [/opt/lib/google_appengine]

You can run your web applications with out doing any further things but it's easy adding this to your PATH variable in .bashrc ...
So insert following lines to .bashrc

# set GOOGLE_APP_ENGINE
export APPENGINE_SDK=/opt/lib/google_appengine  (Change this path to where downloaded app engine located)
export PATH=$PATH:$APPENGINE_SDK


After doing that change directory to where your .bashrc file locate. (home folder) Execute following command...
                   [root ~]~$: .bashrc       (This will reload new PATH you added)

Now execute command "dev_appserver.py", you can see usage parameters defined. If not some thing missing....So check what you have missed... :P

Now we ll create our HelloGoogle app from PHP and run it.

Create a directory in a workspace you preferred.
                  [root ~]~$: mkdir -p /home/zee/google/helloGoogle

Then create a PHP file helloGoogle.php and insert following code.
<?php
      echo 'Hello Google!!!';
?>

Another file you need to create app.yaml in your helloGoogle directory. Without this your application cannot run on App Engine server. (Not going to talk about it much as this is about implementing and troubleshooting) Insert Following code in to that file. 
application: helloGoogle
version: 1
runtime: php
api_version: 1
handlers:
- url: /.*
script: helloGoogle.php
Now you can continue..................


Execute following command in shell to up and run the server with your application...

         [root ~]~$: dev_appserver.py /home/zee/google/helloGoogle/

Go to your browser and load http://localhost:8080/ ... :)

Troubleshooting


Tuesday, July 9, 2013

Golang with Google Appengine

Golang

"Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language."     

That's what they told about GO... :D

 

Installing Go in ubuntu

 For Ubuntu you can download Go from here. If you downloaded the tarball then extract it where you want to.In extracted folder you got a bin folder. (I did it on /opt/lib/go) That's what we want for further and now you are good to GO... :)

To check your download working properly just "cd" to the go/bin from shell and execute command ./go .. Then you ll see bunch of commands you can execute with go if not do the download again. 

Now download Google App Engine for GO. And extract it on a location you preferred. (/opt/lib/google/goAppEngine)



Will continue with further posts... ;)