1 / 15

School Supply System on Google App Engine

School Supply System on Google App Engine. By: Devesh Sharma. Cloud Computing-the buzzword!. Why Cloud Computing? Traditional Business Applications Expensive Complicated Difficult to manage Idea behind Cloud Computing

amina
Download Presentation

School Supply System on Google App Engine

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. School Supply System onGoogle App Engine By: Devesh Sharma

  2. Cloud Computing-the buzzword! • Why Cloud Computing? • Traditional Business Applications • Expensive • Complicated • Difficult to manage • Idea behind Cloud Computing • Instead of organizations running their business applications by themselves in-house, run them on shared data centers.

  3. Cloud Computing - Advantages • 1. Ease of use • 2. Lower costs • 3. Unlimited storage capacity • 4. Highly automated • 5. Allows IT to shift focus • 6. Scalability

  4. School Supply System • Actors: Parents and Teacher • Features: • Application and database hosted on Google App Engine • Developed Front End using Servlets and JSP’s • Developed Back End using Google App Engine (non relational) datastore • Demo

  5. Google App Engine - Overview • Advantages: • Easy to get started • Automatic Scalability • Reliability, performance and security of Google’s infrastructure • Cost efficient hosting • Risk free trial period

  6. Google App Engine - Services • The Mail Java API • App Engine applications can send and receive email messages • The Mail Service Java API supports the JavaMail interface for sending email messages • Example • The Users Java API • App Engine applications can authenticate users who have Google Accounts • Example • Other services: • Image manipulation, URL fetch, OAuth, etc

  7. Google App Engine - Datastore • Not a relational database, Object Oriented database instead • Datastore stores and performs queries over data objects, known as entities • An entity has one or more properties • App Engine Java SDK includes implementations of the Java Data Objects (JDO) and Java Persistence API (JPA) interfaces

  8. Google App Engine – Datastore (contd..) • Interaction with the datastore using a PersistenceManager object, obtained from PersistenceManagerFactory object • Setting up a PersistenceManagerFactoryinstance takes time to initialize. Therefore, an app should reuse a single instance. • An easy way: wrap it in singleton class, PMF.java • Demo – PMF.java on Eclipse

  9. Google App Engine – Datastore (contd..) • Defining Data classes • Annotations: • @PersistenceCapable • @Persistent • Relationships: • One to One • One to Many • Show Users.java data class in Eclipse

  10. Google App Engine – Datastore (contd..) • Creating data/Making Objects Persistent • Example: • PersistenceManager pm = PMF.get().getPersistenceManager(); Users user = new Users(“Devesh”, “Sharma”,..); try{ pm.makePersistent(user); }finally{ pm.close(); }

  11. Google App Engine – Datastore (contd..) • Queries in App Engine: • JDO includes a query language (JDOQL) for retrieving objects that meet a set of criteria. • Query query = pm.newQuery(Users.class);query.setFilter("lastName == lastNameParam");query.declareParameters("String lastNameParam"); try {List<Users> results = (List<Users>) query.execute(“Sharma");        if (results.iterator().hasNext()) {            for (Users u : results) {                // ...            }        } else {            // ... no results ...        }} finally {query.closeAll();}

  12. Google App Engine – Datastore (contd..) • Updating an Object • Users u = pm.getObjectByID(Users.class, key); U.setFirstName(newFirstName); • Deleting an object • pm.deletePersistent(user);

  13. Google App Engine – Admin Console • Use admin console to: • Create a new application • Add other people as developers • View error logs and analyze traffic • Blacklist IP addresses or subnets – DoS protection service • Browse your application’s datastore and manage indexes • Test new versions of your application, and switch the version that users see • My Admin Console

  14. References: • http://code.google.com/appengine/ • http://code.google.com/appengine/docs/java/overview.html • What is Cloud computing?. (n.d.). Retrieved from http://www.salesforce.com/cloudcomputing/

  15. Questions?

More Related