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

April 18, 2011

Testing with Google Appengine.

April 18, 2011 0
Yesterday in the evening ,
When i was seated in front of my computer than suddenly something comes in my mind.....
From a long time i never used Google App Engine ,Lets check my appengine knowledge.
With Appengine Docs i started writing the application and finally i did.

check it-Greeting App Engine

Its a simple greeting application based on GAE's helloworld example...
Also U can use ur gmail id to post greetings.

Lol.... ;-)
Still I know GAE..ye yippeee.....
Source code on bitbucket.

Read more...

May 17, 2010

My first website "OnRoute Courier & Cargo " in django.

May 17, 2010 0
My first website,
The OnRoute-courier&Cargo website is fully powered by django.
This website is also written in Ruby and Python scripting languages and also available on Google-App-engine.
Thanks to Pavan Mishra,who help me to develop this website on Django.
Pavan also made this website on Ruby and Rails.which is hosted as onroute.in.
Here is some snaps of the Website..
powered by Django...developed by me

Home page


The Administration of consignment of OnRoute



Django site Administration



See the original website which is powered by Ruby-Rails....
Onroute Courier & Cargo
Read more...

"Xpress Courier & Cargo " in Google Appengine

May 17, 2010 0
Now,its my second Project,
which is developed in Google Appengine.
This website is also made in Django with the use of python as a scripting language.
Thanks to Pavan Mishra ,who help me to develop this website on Google Appengine.
Here is the URL xpressCC .

Here is some snaps of the Website..
powered by Google Appengine...developed by me.

Its not a complete website,its a development version.



Home Page .




Adding Consignment.




Deleting Consignment from the List.

Read more...

May 07, 2010

say Hello, World! in Google Appengine.

May 07, 2010 0


Lets start.
# Creating a Simple Request Handler :-
Python App Engine applications communicate with the web server using the CGI standard. When the server receives a request for your application, it runs the application with the request data in environment variables and on the standard input stream (for POST data).

* create an application directory.
if you are using Linux,create the application in the Google Appengine directory.
eg. google-appengine/

* Create a directory named "helloworld". All files for this application reside in this directory.

e.g-
google-appengine/helloworld

* Inside the helloworld directory, create a file named "helloworld.py", and give it the following contents:

----------------------------------------------
print 'Content-Type: text/plain'
print ''
print 'Hello, world!'
----------------------------------------------

This Python script responds to a request with an HTTP header that describes the content, a blank line, and the message Hello, world!.

# Creating the Configuration File

* An App Engine application has a configuration file called "app.yaml". Among other things, this file describes which handler scripts should be used for which URLs.

* Inside the directory, create a file named "app.yaml" with the following contents:

------------------------------------------------
application: helloworld
version: 1
runtime: python
api_version: 1

handlers:
- url: /.*
  script: helloworld.py

-------------------------------------------------

* The application identifier is "helloworld". When you register your application with App Engine in the final step, you will select a unique identifier, and update this value. This value can be anything during development. For now, leave it set to helloworld.

* This is version number "1" of this application's code. If you adjust this before uploading new versions of your application software, App Engine will retain previous versions, and let you roll back to a previous version using the administrative console.

* This code runs in the "python" runtime environment, version "1". Additional runtime environments and languages may be supported in the future.

* Every request to a URL whose path matches the regular expression /.* (all URLs) should be handled by the "helloworld.py" script.

For a complete list of configuration options, see the app.yaml reference.

# Testing the Application

* With a handler script and configuration file mapping every URL to the handler, the application is complete. You can now test it with the web server included with the App Engine SDK.

--------------------------------------------------
google_appengine/dev_appserver.py helloworld/
--------------------------------------------------
if you are a Linux User use the command after change the google_appengine dir.
e.g :-

$cd google_appengine/
$python dev_appserver.py helloworld/


* The web server is now running, listening for requests on port 8080. You can test the application by visiting the following URL in your web browser:

* http://localhost:8080/

* To shut down the web server, make sure the terminal window is active, then press Control-C (or the appropriate "break" key for your console), or click Stop in Google App Engine Launcher.


Position of Application dir :-

google_appengine /
- [many files & folder]

- dev_appserver.py
- appcfg.py

- helloworld/
- helloworld.py
- app.yaml



Here is the codes and command for run the appication on LinuxOS






Running application on port http://localhost:8080/



Read more...

The Development environment for google appengine.

May 07, 2010 0
You develop and upload Python applications for Google App Engine using the App Engine Python software development kit (SDK).Download from the Python website .

Download the App Engine SDK . Follow the instructions on the download page to install the SDK on your computer.

most use of two commands from the SDK:

* dev_appserver.py, the development web server
* appcfg.py, for uploading your app to App Engine.

Windows and Mac users can run Google App Engine Launcher and simply click the Run and Deploy buttons instead of using these commands.
Read more...

Google App Engine at a glance .

May 07, 2010 0
1. Google App Engine at a glance


2. Introduction
• PaaS
• Running own Apps in Google infrastructure
• Supports different runtime environments – Java ( JRE 6 with limitations, standard APIs like JDO, JPA, JavaMail) – Python ( 2.5.2, standard library)
• App runs in sandbox
• Automatic scaling and load balancing


3. Architecture - Overview Internet Internet http://(version).(appid>).appspot.com/some/path Loadbalancer Frontend … Frontend Static File Server … Static File Server Application Server … Application Server static files resource files program files static files resource files program files


4. Architecture - Application Server URLFetcher Application Mail Internet Internet XMPP Application sandbox /Runtime Environment External Services Authentication Memcache Datastore Blobstore Logging Image Tasks Internal Services Google App Engine Bigtable memcache Google Infrastructure


5. Services / Capabilities
• Sandbox
• Runtime Environment / Servlet Container – Java Interpreter – Read only filesystem – Memory
• Data Store • Services – User authentication – URL Fetch – Mail – XMPP – Memcache – Image Manipulation – Scheduled tasks / Task Queues – Blobstore – Logging


6. Limitations
• Programming Model – Application runs in sandbox and can not
• Write to filesystem • Make arbitary network connections
• Use multiple threads/processes
• Perform long-lasting processing
• Permissions
• Know about other instances/applications – Sandbox restrictions are implemented as JVM
• Quotas (Requests, In/Out bandwidth, CPU time, API calls) – Billable Quotas
• Set by the application owner to keep in budget – Fixed Quotas
• Set by GAE to ensure integrity of the system


7. Development Environment
• Tools – Development Server – Application lifecycle management – Eclipse plugins / Firefox plugin (GWT) – Local unit testing / debugging


8. Deployment Environment
• Application is deployed as war which contains: – Static files – Resource Files – Program Files – Deployment Descriptor
• Rich Admin web console
• Deployment is integrated in IDE
• Deploy multiple version of the application at the same time


9. GWT-RPC Client Server Framework RemoteServiceServlet ServiceDefTarget RemoteService extends related implements OurServiceImpl OurServiceAsync OurService implements Our stuff implements ProxyService GWT framework (autogenerated)


10. App Engine Datastore Entity key “data” Application ID Property * Kind name Value * ID / Name
• Non-relational Data-
• Distribution, replication, store load balancing behind
• Stores data as entities the scene
• APIs:
• Based on Bigtable / GFS – JDO / JPA – Low Level API


11. Using Email/XMPP
• Create Servlet for handling incoming messages
• Ensure proper url configuration ins deployment descriptor
• Configure as inbound service
• XMPP – implementation supports no Group Chat – App-id@appspot.com / anything@version.latest.app-id.appspotchat.com


12. Logging
• Java.util.logging.Logger
• View in Administration Console
• Download logfiles
• Standard output / standard error are written to the logs


13. Local Unit Testing
• LocalTestServiceHelper provides – local test environment including GAE services
• Datastore
• XMPP/Mail
• User Management – Capability to use JUnit framework


14. Memcache Service
• Distributed in memory cache
• Configurable expiration time but • Unreliable might be vanished at any time
• Supported Interfaces : – JACHE (JSR 107: JCACHE – Java Temporary Caching API) – The Low-Level Memcache API (documentation)


15. User Management – Google Accounts
• Optional feature
• Utilize Google Authentication system in your own application -> focus on business logic
• Access to Google account data -> email, id
• Access constraints based on roles – Declarative in deployment descriptor (URL based) – programmatically


16. Managing Applications
• Administration Console @http://appengine.google.com/a/yourdomai n.com – Application Dashboard – Multiple application versions – Analyzing log files (including admin) – Analyzing resource usage


17. Further Readings
• Google App Engine documentation
• GWT documentation
• “Beginning Java Google App” – Kyle Roche, Jeff Douglas
• “Programming Google App Engine” – Dan Sanderson.



For see the Presentation Transcript about this post and more info visit :
Google Appengine At A Glance.

-- by Stefan Christoph
Read more...

Google Appengine overview...

May 07, 2010 0
Creating an App Engine application is easy, and only takes a few minutes.
Now , we are going to learn :

* build an App Engine application using Python
* use the "webapp" web application framework
* use the App Engine datastore with the Python modeling API
* integrate an App Engine application with Google Accounts for user authentication
* use Django templates with your app
* upload your app to App Engine

For using of Django on Appengine see the Django on Appengine post.
Google App Engine and Django both have the ability to use the WSGI standard to run applications. As a result, it is possible to use nearly the entire Django stack on Google App Engine, including middleware.
Read more...

May 06, 2010

Take a look on "Google Appengine for Python"

May 06, 2010 2


Welcome to Google App Engine for Python!
You can develop your Google App Engine application for either of two application environments:

1->Java
2->Python

But here,I am going with Python

* a fast Python 2.5 interpreter in a secure sandbox environment
* includes the complete Python standard library
* compiled application code is cached for rapid responses to web requests
* supports popular web application frameworks, including Django
* works with any application that supports CGI or WSGI
* includes a rich data modeling API for the datastore

With App Engine, you can build web applications using the Python programming language, and take advantage of the many libraries, tools and frameworks for Python that professional developers use to build world-class web applications. Your Python application runs on Google's scalable infrastructure, and uses large-scale persistent storage and services.

if u haven't, see,see the Python Getting Started Guide for an interactive introduction to developing web applications with Python and Google App Engine.

* The Datastore and Services
Apps can use the App Engine Datastore for reliable, scalable persistent storage of data. The Python API to the App Engine datastore includes rich data modeling tools for managing data schemas.The API supports two interfaces for performing datastore queries, including GQL, a SQL-like query language that is also used in the Admin Console.

* Scheduled Tasks

An application can configure scheduled tasks that will call URLs of the application at specified intervals.

* Python Tools

The App Engine Python SDK includes tools for testing your application, uploading your application files, managing datastore indexes, downloading log data, and uploading large amounts of data to the datastore
Read more...

May 05, 2010

Google Appengine

May 05, 2010 1


Google Appengine.


Google App Engine lets you run your web applications on Google's infrastructure. App Engine applications are easy to build, easy to maintain, and easy to scale as your traffic and data storage needs grow. With App Engine, there are no servers to maintain: You just upload your application, and it's ready to serve your users.
You can serve your app from your own domain name (such as http://www.example.com/) using Google Apps. Or, you can serve your app using a free name on the appspot.com domain. You can share your application with the world, or limit access to members of your organization.
Google App Engine supports apps written in several programming languages. With App Engine's Java runtime environment, you can build your app using standard Java technologies, including the JVM, Java servlets, and the Java programming language—or any other language using a JVM-based interpreter or compiler, such as JavaScript or Ruby. App Engine also features a dedicated Python runtime environment, which includes a fast Python interpreter and the Python standard library. The Java and Python runtime environments are built to ensure that your application runs quickly, securely, and without interference from other apps on the system.

The Application Environment


Google App Engine makes it easy to build an application that runs reliably, even under heavy load and with large amounts of data. App Engine includes the following features:
  • dynamic web serving, with full support for common web technologies
  • persistent storage with queries, sorting and transactions
  • automatic scaling and load balancing
  • APIs for authenticating users and sending email using Google Accounts
  • a fully featured local development environment that simulates Google App Engine on your computer
  • task queues for performing work outside of the scope of a web request
  • scheduled tasks for triggering events at specified times and regular intervals
Your application can run in one of two runtime environments: the Java environment, and the Python environment. Each environment provides standard protocols and common technologies for web application development
Read more...

Follow Us @soratemplates