GithubHelp home page GithubHelp logo

ex-6-gae's Introduction

Ex-6-GAE

Date: Aim: ToinstallGoogleAppEngine.Createhelloworldappandothersimplewebapplicationsusingpython/java

GoogleCloudPlatform(GCP)

GoogleCloudPlatform(GCP),offeredbyGoogle,isasuiteofcloud computingservicesthatrunsonthesameinfrastructurethatGoogleuses internally for its end-user products, such as Google Search,Gmail,filestorage, andYouTube. Alongsideasetofmanagementtools,itprovidesaseriesofmodularcloudservicesincludingcomputing,datastorage,dataanalyticsandmachinelearning. GoogleCloudPlatformprovidesinfrastructureasaservice,platformasaservice,andserverlesscomputingenvironments.

image

Platform asaService(PaaS) Cloudcomputingservicewhichprovidesacomputingplatformandasolutionstack asaservice. Consumercreatesthesoftwareusingtoolsand/or libraries fromtheprovider. Providerprovidesthenetworks,servers,storage,etc.

GoogleAppEngine:

GoogleAppEnginewasfirstreleasedasabetaversioninApril2008. 2 5

It isaisa PlatformasaService(PaaS)cloudcomputingplatformfordevelopingandhostingwebapplicationsinGoogle-manageddatacenters. Google‘sAppEngineopensGoogle‘sproductiontoanypersonintheworldatno charge. GoogleAppEngineissoftwarethat facilitatestheusertorunhiswebapplicationsonGoogleinfrastructure. Itismorereliablebecausefailureofanyserver willnotaffecteithertheperformanceoftheenduserortheserviceoftheGoogle. Itvirtualizesapplicationsacross multipleserversanddatacenters. Othercloud-basedplatformsincludeofferingssuchas Amazon Web

ServicesandMicrosoft's AzureServices Platform.

IntroductionofGoogleAppEngine GoogleAppEngineletsyourunyourwebapplicationsonGoogle'sinfrastructure. App Engine applications are easy to build, easy to maintain,andeasytoscaleasyourtrafficanddatastorageneedsgrow.WithAppEngine,there are no servers to maintain :You just upload your application, and it'sreadytoserveyourusers. You can serve your app from your own domain name (suchas https://www.example.com/) using Google Apps. Or, you can serve yourapp using a free name on the appspot.com domain. You can share yourapplicationwiththeworld, orlimitaccesstomembersofyour organization. GoogleAppEnginesupportsappswritteninseveral programminglanguages. With AppEngine'sJavaruntimeenvironment,youcan buildyourappusingstandardJavatechnologies,includingtheJVM,Javaservlets,andtheJavaprogramming language—oranyotherlanguageusingaJVM-basedinterpreterorcompiler,suchasJavaScriptorRuby. AppEnginealsofeaturesadedicatedPythonruntimeenvironment,whichincludesafastPythoninterpreter and thePythonstandardlibrary.TheJavaandPythonruntimeenvironmentsarebuilttoensurethatyourapplicationrunsquickly,securely,andwithoutinterferencefromotherappsonthesystem. With AppEngine, you only pay for what you use. There are no set-up costsand no recurring fees. The resources your application uses, such as storageandbandwidth,aremeasuredbythegigabyte,andbilledatcompetitiverates.You control the maximum amounts of resources your app can consume, so italwaysstayswithinyourbudget.App Enginecostsnothingto getstarted. Allapplicationscanuseupto500MBofstorageandenoughCPUandbandwidth to support an efficient app serving around 5million page views amonth,absolutelyfree.Whenyouenablebillingforyourapplication,yourfreelimits are raised, and you only pay for resources you use above the freelevels. Architecture ofGoogleAppEngine

image

FeaturesofGoogleAppEngine image

GAEApplicationEnvironment:

Google App Engine makesit easy tobuild an application that runs reliably,even under heavy load and with large amounts of data. App Engine includes thefollowingfeatures: Persistentstoragewithqueries, sortingandtransactions Automaticscalingandloadbalancing APIsforauthenticatingusersandsendingemailusingGoogleAccounts Taskqueuesforperforming workoutsideofthescopeofawebrequest Scheduledtasksfortriggering eventsatspecifiedtimesandregularintervals

Dynamicwebserving,withfullsupport forcommonwebtechnologies

JavaRuntimeEnvironment

You can develop your application for the Java runtime environment usingcommon Java web development tools and API standards. Your app interactswith the environment using the Java Servlets standard, and can use commonwebapplication technologiessuchasJavaServerPages TheJavaruntimeenvironmentusesJava6.TheAppEngineJavaSDKsupports developing apps using either Java5 or 6.The environment includestheJavaSERuntimeEnvironment(JRE)6platformandlibraries.TherestrictionsofthesandboxenvironmentareimplementedintheJVM.Anappcan use any JVM byte code or library feature, as long as it does not exceedthesandboxrestrictions.Forinstance,bytecodethatattemptstoopenasocketorwritetoafilewillthrow aruntimeexception. YourappaccessesmostAppEngineservicesusingJavastandardAPIs.Forthe AppEngine data store, the Java SDK includes implementations of the JavaDataObjects(JDO)andJavaPersistenceAPI(JPA)interfaces.Yourappcanuse the JavaMailAPItosend emailmessageswiththeAppEngineMailservice.Thejava.netHTTPAPIsaccessestheAppEngineURLfetchservice. AppEnginealsoincludeslow-levelAPIsforitsservicestoimplementadditionaladapters,ortousedirectlyfromtheapplication.Seethedocumentationforthedatastore,memcache,URLfetch,mail,imagesandGoogleAccountsAPIs.Typically,JavadevelopersusetheJava programming languageandAPIstoimplementwebapplicationsfortheJVM. WiththeuseofJVM-compatiblecompilersorinterpreters,youcanalso useotherlanguagestodevelopwebapplications,suchas JavaScript,Ruby.

image

WorkflowofGoogleAppEngine

image

Step1:Logintowww.cloud.google.com

image

Step2:GotoConsole

image

Step3:GoogleCloudPlatformisshown

image

Step4:ClickDashboardintheGoogleCloudPlaform

image

Step5:DashboardintheGoogleCloudPlaform

image

Step6:ClickNewProjectandgiveuniqueProjectName.

image

Example:kcet-cloud-project

Step7:GoogleAppEngineisinitated

image

Step8: ClickcreateApplication

image

Step9:CreateappandSelectLanguagePython

image

Step10: PythonappiscreatedinGoogleAppEngine image

Step11 :PythonappEngineapplicationiscreated

image

Step12:ClickCloudShellintheKathir-Cloud-Project

image

Step13:CreateaDirectoryPythonProjectusingmkdircommand

image

Syntax: mkdirPythonProject Step14:ClickEditortocreatePython application

image

Step 15:ClickNew Filein thePythonProjectFolder(Pythonfile)

image

Step16:Createmain.pyfile

image

main.pyfile

print("HelloWorld")

Step17:Createapp.yamlfile

image

app.yaml

runtime:python27api-version:1threadsafe:falsehandlers: url:1script:Index.py

Step18:Createrequirements.txtfile

image

requirements.txt Flask= =0.11.1 gunicorn==19.6.0

Step19:MovetoCloudShellEnvironmenttoruntheapplication image

Step20:MovetoCloudShellEnvironmenttoruntheapplication Syntax:gcloudappdeploy

image

Continuetheapplication.Itenableserviceonthegivenproject

image

Itstartedbuildingtheobjectandfetchingthestorageobjectforthecreatedapplication

image

Itisupdatingtheservice

image

TheapplicationissuccessfullydeployedandURLishttps://expanded- curve-289413.uc.r.appspot.com Step21:Run yourprograminthebrowser

image

Step22:Hello WorldProgramissucessfullyruninthebrowser

image

Result:

Thus the Google App Engine is installed successfully and a web application todisplayhelloworldusingpythonisdevelopedanddeployedintheGAEandusedGAELaunchertolaunchthe webapplications.

ex-6-gae's People

Contributors

drmalathisaravanan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.