Google App Engine Java

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

1 comments

Comments 1 - 1 of 1 previous next Post a comment

  • + LucaMarrocco Luca Marrocco 2 months ago
    please give me your feedback about this presentation :)
Post a comment
Embed Video
Edit your comment Cancel

Favorites, Groups & Events

Google App Engine Java - Presentation Transcript

  1. Google App Engine for Java Luca Marrocco Spring Framework Meeting 2009 - Cagliari www.exmachina.ch in <code> we trust
  2. Agenda Cloud Computing Overview What is App Engine Why App Engine Application Lifecycle with App Engine Development Using App Engine Deploying Applications Security Quota & Pricing www.exmachina.ch in <code> we trust
  3. Cloud Computing? Cloud computing is a style of computing in which dynamically scalable and often virtualized resources are provided as a service over the Internet. Users need not have knowledge of, expertise in, or control over the technology infrastructure in the "cloud" that supports them. www.exmachina.ch in <code> we trust
  4. Big Picture www.exmachina.ch in <code> we trust
  5. Pros and cons Scale and cost Locking Change Management Reliability Next Generation Architecture Lack of control Choice and Agility Security www.exmachina.ch in <code> we trust
  6. Growth prediction Before allocate resources you need to know how many people will use your service. Intense usage of service can happen regularly. Particular usage of your service can break down it! In these situations allocating too many resources for this particular event can be more expensive that normal usage of the system. www.exmachina.ch in <code> we trust
  7. What is App Engine? Google's Platform to Build Web applications on the cloud Dynamic web server, with full support for common web tecnologies Automatic scaling and load balancing Transactional DataStore Model Integration with Google Accounts through APIs. www.exmachina.ch in <code> we trust
  8. Why App Engine? Scalability Lower Total Cost of Ownership Rich set of APIs and local development Ease of deployment Web administrator console and diagnostic utilities www.exmachina.ch in <code> we trust
  9. Scalability Is a desirable property of a system, which indicates its ability to either handle growing amounts of work in a graceful manner, or to be readily enlarged. For example, it can refer to the capability of a system to increase total throughput under an increased load when resources (typically hardware) are added. www.exmachina.ch in <code> we trust
  10. Lower Total cost of Ownership Software license purchase costs. Hardware and Software deployment costs. Hardware warranties and maintenance costs. Software license tracking costs.Operations Infrastructure Costs.Infrastructure (floor space) costs. Cost for electricity and cooling. Network hardware and software costs. Server hardware and software costsTesting costs. Cost to upgrade or scalability. IT Personnel costs. . . www.exmachina.ch in <code> we trust
  11. Lower Total cost of Ownership . . . “C” level management costs. Backup and Recovery Process costs. Costs associated with failure or outage. Diminished performance incidents (i.e. users having to wait). C.osts of security breaches (in loss of reputation and recovery costs). Technology training costs of users and IT staff. Audit costs. Insurance costs.Replacement costs. Migration costs. Decommissioning costs. www.exmachina.ch in <code> we trust
  12. Rich set of APIs and local development App Engine provide a full development environment. SDK can be used and tested locally. It provide useful tools that integrate Google or third party services. www.exmachina.ch in <code> we trust
  13. Easy of development It provide local environment to run webapp during development. GNU/ Linux is fully supported. It can be developed using any editor but Eclipse plugin can help. Be advised that developing scalable application is not easy :) www.exmachina.ch in <code> we trust
  14. Secure Sandbox NO file writing, creating socket or spawn threads NO system calls like signals or C extensions NO process that run longer than 30 secs JRE whitelist www.exmachina.ch in <code> we trust
  15. Hard limits 10 apps 30 secs per request 1 GB bandwith per day 1 GB datastore 6.5 hours of CPU time per day 2000 emails per day www.exmachina.ch in <code> we trust
  16. Billing Outgoing bandwith $0.12 GB Incoming bandwith $0.10 GB CPU time $0.10 per CPU hour Stored data $0.15 per GB month Recipients emailed $0.0001 per recipient www.exmachina.ch in <code> we trust
  17. Numbers are numbers Currently, over 80K applications Serving over 140M pageviews per day Written by over 200K developers www.exmachina.ch in <code> we trust
  18. www.exmachina.ch in <code> we trust
  19. Application Lifecycle www.exmachina.ch in <code> we trust
  20. App Engine www.exmachina.ch in <code> we trust
  21. Servlet API Servlet 2.5 Container Http Session Support JSP Support Uses Jetty and Jasper NO Jetty-specific feature NO jetty-web.xml NO continuations www.exmachina.ch in <code> we trust
  22. Webapp /WEB-INF/web.xml /WEB-INF/appengine-web.xml /WEB-INF/lib /WEB-INF/classes /index.jsp * www.exmachina.ch in <code> we trust
  23. appengine-web.xml <appengine-web-app> <application>application-id</application> <version>1</version> <static-file> <include path=”img/*”/> <exclude path=”img/*something”/> </static-file> <ssl-enabled>true</ssl-enabled> <sessions-enabled>true</sessions-enabled> </appengine-web-app> www.exmachina.ch in <code> we trust
  24. DevAppServer Emulates the production environment Customized Jetty server Local implementation of services LRU memcache Disk-backed datastore HttpClient-backed URLFetch Some sandbox restrictions difficult to emulate WhiteList not enforced www.exmachina.ch in <code> we trust
  25. App Engine Architecture www.exmachina.ch in <code> we trust
  26. Deployment App lives at <app_id>.appspot.com, or Custom domain with Google Apps Command line and IDE tools Deploying uploads Static files Resource files Metadata (datastore indexes, cron jobs) www.exmachina.ch in <code> we trust
  27. Admin Console Expose information about deployed application www.exmachina.ch in <code> we trust
  28. Admin Console www.exmachina.ch in <code> we trust
  29. APIs www.exmachina.ch in <code> we trust
  30. DataStore API Provides the ability to store data Transactional Natively Partitioned Hierarchical Schema-less Based on Bigtable Not a relational database or SQL engine www.exmachina.ch in <code> we trust
  31. Images API Provides the ability to manipulate image Transforming Images in Java Available Image Transformations Image Formats Images and the Development Server Quotas and Limits www.exmachina.ch in <code> we trust
  32. Transform Resize Image import com.google.appengine.api.images.*; ImagesService imagesService = ImagesServiceFactory.getImagesService(); Transform resize = ImagesServiceFactory.makeResize(200, 300); Image image = ImagesServiceFactory.makeImage(imageBytes); Image resizedImage = imagesService.applyTransform(resize, image); return resizedImage.getImageData(); www.exmachina.ch in <code> we trust
  33. Available Transformations Resize Rotate Flip horizontally Flip vertically I'm Feeling Lucky Crop www.exmachina.ch in <code> we trust
  34. Formats Accepts image data in the JPEG, PNG, GIF (including animated GIF), BMP, TIFF and ICO formats. Can return transformed images in the JPEG and PNG formats. www.exmachina.ch in <code> we trust
  35. Quota and Limits Each Images service request counts toward the Image Manipulation API Calls quota. An app can perform multiple transformations of an image in a single API call. Additional limits of 1 MB data size: for image sent to service for image received from service www.exmachina.ch in <code> we trust
  36. Memcache API Provides distributed in-memory key-value cache often used by high performance scalable web applications. www.exmachina.ch in <code> we trust
  37. Caching Data with JCache import static java.util.Collections.emptyMap; import javax.cache.*; CacheFactory cacheFactory = CacheManager.getInstance().getCacheFactory(); Cache cache = cacheFactory.createCache(emptyMap()); cache.put(key, value); cache.get(key); www.exmachina.ch in <code> we trust
  38. Quota and Limits Each Memcache call counts toward the Memcache API Calls quota. Additional limits of 1 MB data size: for a cached value www.exmachina.ch in <code> we trust
  39. Mail API Provides the ability to send email messages on behalf of the app's administrators, and on behalf of users with Google Accounts. www.exmachina.ch in <code> we trust
  40. Send Email using JavaMail import javax.mail.*; Session session = Session.getDefaultInstance(new Properties(), null); InternetAddress admins = new InternetAddress("admins"); Message msg = new MimeMessage(session); msg.setFrom(admins); msg.addRecipient(Message.RecipientType.TO, admins); msg.setSubject("subject"); msg.setText("text"); Transport.send(msg); www.exmachina.ch in <code> we trust
  41. URL Fetch API Provides the ability to fetch resources and communicate with other hosts over the Internet using HTTP and HTTPS requests. www.exmachina.ch in <code> we trust
  42. Fetching URLs with java.net import java.net.*; import java.io.*; URL url = new URL("htp://..."); InputStream inputinputStream = new InputStreamReader(url.openStream()) BufferedReader reader = new BufferedReader(inputStream); String line; while ((line = reader.readLine()) != null) { . . . } reader.close(); www.exmachina.ch in <code> we trust
  43. Quota and Limits Each URL Fetch request counts toward the URL Fetch API Calls quota. Additional limits of 1 MB data size: request size response size www.exmachina.ch in <code> we trust
  44. URL Fetch API www.exmachina.ch in <code> we trust
  45. Users API Provides the ability to authenticate users with Google Accounts. www.exmachina.ch in <code> we trust
  46. XMPP API Provides the ability send messages like Google Talk. www.exmachina.ch in <code> we trust
  47. Task Queue API Provides the ability to perform background processing by inserting tasks (modeled as web hooks) into a queue. www.exmachina.ch in <code> we trust
  48. Design Motivation Build on existing Google tecnology Provide an integrated environment Encourage small request footprint Encourage fast request Maintain isolation between applications Encourage statelessness and specialization Required partitioned datamodel www.exmachina.ch in <code> we trust
  49. Provide an Integrated Environment Manage all apps together Follow best practices Some restrictions Use their tools Use their tools, Admin Console, All logs in one place No machines to configure or manage, Easy deployment www.exmachina.ch in <code> we trust
  50. Encourage Small Per-Request Footprints Better utilization of App Servers Fairness Less Memory Usage Limited CPU Better use of resources www.exmachina.ch in <code> we trust
  51. Encourage Fast Requests Better utilization of appservers Fairness between applications Routing and scheduling agility Runtime caching and Request deadlines Optimistically share state between requests Better throughput; Fault tolerance; Better use of resources www.exmachina.ch in <code> we trust
  52. Maintain Isolation Between Apps Safety Predictability Certain system calls unavailable Security Performance www.exmachina.ch in <code> we trust
  53. Encourage Statelessness and Specialization App Server performance Load balancing Fault tolerance Use API calls Automatic load balancing and Fault tolerance Less code for you to write; Better use of resources www.exmachina.ch in <code> we trust
  54. Require Partitioned Data Model The Datastore Data model + Indexes Reads are fast, writes are slower Design your schema once No need to re-architect for scalability More efficient use of cpu and memory www.exmachina.ch in <code> we trust
  55. Work Together App Engine and Amazon Web Services like Elastic Compute Cloud can work well togheter! EC2 can be used to perform long running task. S3 can be used to store files bigger than 1MB. www.exmachina.ch in <code> we trust
  56. Amazon Web Services www.exmachina.ch in <code> we trust
  57. App Engine and AWS www.exmachina.ch in <code> we trust
  58. App Engine and AWS www.exmachina.ch in <code> we trust
  59. Google App Engine? luca.marrocco@gmail.com www.exmachina.ch in <code> we trust
  60. Bibliografia http://code.google.com/appengine/ http://www.slideshare.net/ajdevries/presentation-google-app-engine-4-java http://www.slideshare.net/rajdeep/introduction-to-google-app-engine-presentation http://code.google.com/events/io/sessions/FromSparkPlugToDriveTrain.html http://code.google.com/events/io/sessions/SofterSideofSchemas.html http://code.google.com/events/io/sessions/AppEngineNowJava.html http://en.wikipedia.org/wiki/Scalability www.exmachina.ch in <code> we trust
SlideShare Zeitgeist 2009

+ Luca MarroccoLuca Marrocco Nominate

custom

914 views, 0 favs, 2 embeds more stats

overview presentation of appengine for java. includ more

More info about this document

© All Rights Reserved

Go to text version

  • Total Views 914
    • 910 on SlideShare
    • 4 from embeds
  • Comments 1
  • Favorites 0
  • Downloads 26
Most viewed embeds
  • 3 views on http://cabernet
  • 1 views on http://192.168.0.1

more

All embeds
  • 3 views on http://cabernet
  • 1 views on http://192.168.0.1

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories