SlideShare a Scribd company logo
Introduction to Datastore
Assoc.Prof. Dr.Thanachart Numnonda
 Asst.Prof. Thanisa Kruawaisayawan

        www.imcinstitute.com
             July 2012
Agenda
What is DataStore?

Using DataStore

JPA in DataStore
What is DataStore?
What is Datastore?
Google App Engine Datastore is a schema-less persistence
  system, whose fundamental persistence unit is called Entity, c
  omposed by an immutable Key and a collection of mutable pr
  operties.
Entities can be created, updated, deleted, loaded by key and
  queried for properties values.
DataStore is consistent and transactional, with support to
  current transaction.
The DataStore
The Datastore is not a relational database nor a
 façade.
Relational database technology doesn’t scale
 horizontally
   – Connection pools, shared caching are a problem
The Datastore is one of many public APIs used for
 accessing Google’s
The DataStore
The DataStore
The DataStore : Operations
Transactions and Index are based on MegaTable.
File persistence it's done with Google File System
 (GFS).
It's distributed by Chubby, a lock service for loosely-
 coupled distributed systems.
BigTable
BigTable is a compressed, high performance, and
 proprietary database system built on Google File
 System (GFS), Chubby Lock Service, and a few other
 Google programs
Currently not distributed or used outside of Google.
BigTable development began in 2004. and is now used
 by a number of Google application Google Earth,
 Google Map, Gmail, Youtube, etc..
BigTable : Design
BigTable is a fast and extremely large-scale DBMS.
It is a sparse, distributed multi-dimensional sorted map,
 sharing characteristics of both row-oriented and column-
 oriented databases.
  sparse because only "not null" values are persisted
  distributed in Google cloud
  persistent on Google File System
  multidimensional in columns values
  ordered lexicographically by key
BigTable : Design
Tables are optimized for GFS by being split into
 multiple tablets - segments of the table.
BigTable is designed to scale into the petabyte.
Each table has multiple dimensions (one of which is a
 feld for time, allowing for versioning and garbage
 collection).
It allows an infnite number of rows and columns.
Google File System
GFS is a proprietary distributed fle system developed
 by Google.
It is designed to provide effcient, reliable access to
 data using large clusters of commodity hardware.
GFS grew out of an earlier Google effort, BigFiles,
 developed by Larry Page and Sergey Brin in the early
 days of Google, while it was still located in Stanford.
Using DataStore
DataStore Operations
Datastore operations are defned around entities (data
 models) which are objects with one or more properties
  Types: string, user, Boolean, and so on
  Entities may be recursive or self-referential
Entity relationships are one-to-many or many-to-many.
Entities may be fxed or grow as needed.
DataStore Storage Model
Every entity is of a particular kind
Entities in a kind need not have the same properties
  One entity may have different “columns” from another in
   the same kind!
Unique IDs are automatically assigned unless the user
 defnes a key_name
Compare DataStore with Others
DataStore Storage Model
Basic unit of storage is an Entity consisting of
   Kind (table)
   Key (primary key)
   Entity Group (partition)
   0..N typed Properties (columns)
Datastore Quotas
Each call to Datastore counts towards the quota
The amount of data cannot exceed the billable
      Includes properties and keys but not the indices
CPU and Datastore CPU time quotas apply
Using the Datastore
Applications may access the Datastore using the JDO
 or the JPA classes.
The JDO and JPA classes are abstracted using the
 DataNucleus API
  Open source
   Not very popular
   Support for Java standards
   Poor documentation
JPA in DataStore
Setting Up JPA
The JPA and datastore JARs must be in the app's
 war/WEB-INF/lib/ directory.
A confguration fle named persistence.xml must be in
 the app's war/WEB-INF/classes/META-INF/ directory,
A confguration fle tells JPA to use the App Engine
 datastore.
The appengine-api.jar must also be in the war/WEB-
 INF/lib/ directory.
persistence.xml: Example
<?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence"
 <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
   http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
    http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
    <persistence-unit name="thaijavaappPU" transaction-type="RESOURCE_LOCAL">
     <persistence-unit name="thaijavaappPU" transaction-type="RESOURCE_LOCAL">

  <provider>org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider
   <provider>org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider
  </provider>
   </provider>
   <non-jta-data-source/>
    <non-jta-data-source/>
  <properties>
   <properties>
      <property name="datanucleus.ConnectionURL" value="appengine"/>
       <property name="datanucleus.ConnectionURL" value="appengine"/>
      <property name="datanucleus.NontransactionalRead" value="true"/>
       <property name="datanucleus.NontransactionalRead" value="true"/>
      <property name="datanucleus.NontransactionalWrite" value="true"/>
       <property name="datanucleus.NontransactionalWrite" value="true"/>
    </properties>
     </properties>
  </persistence-unit>
   </persistence-unit>
</persistence>
 </persistence>
Getting an EntityManager Instance
An app interacts with JPA using an instance of the EntityManager.

import javax.persistence.EntityManagerFactory;
 import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
 import javax.persistence.Persistence;
public class EMF {{
 public class EMF

     private static final EntityManagerFactory emfInstance ==
      private static final EntityManagerFactory emfInstance
      Persistence.createEntityManagerFactory("transactions-optional");
       Persistence.createEntityManagerFactory("transactions-optional");

     public static EntityManagerFactory get() {{
      public static EntityManagerFactory get()
         return emfInstance;
          return emfInstance;
     }}
}}
Entity Class : Example
@Entity
 @Entity
public class GuestList implements Serializable {{
 public class GuestList implements Serializable
     ……
     @Id
      @Id
     private String id;
      private String id;

     @Basic
      @Basic
     private User author;
      private User author;
     private String content;
      private String content;
     @Temporal(javax.persistence.TemporalType.DATE)
      @Temporal(javax.persistence.TemporalType.DATE)
     private Date visitDate;
      private Date visitDate;
     ……
     // Getter and Setter methods
      // Getter and Setter methods
}}
Queries and Indices
A query operates on every entity of a given kind.
     Specify zero or more sort orders
     Specify zero or more flters on property values
Indices are defned in the App Engine confguration fles
     Results are fetched directly from these indices; no indices are
      created on the fly
     WEB-INF/datastore-indexes.xml - non-standard fles
Normalization is not recommended
     Optimization techniques for RDBMSs may result in poor
      Datastore performance!
Query : Example
EntityManager em == EMF.get().createEntityManager();
 EntityManager em    EMF.get().createEntityManager();
try {{
 try
     Query query == em.createQuery("SELECT oo FROM GuestList AS o");
      Query query    em.createQuery("SELECT    FROM GuestList AS o");
     @SuppressWarnings("unchecked")
      @SuppressWarnings("unchecked")
     List<GuestList> results == (List<GuestList>) query.getResultList();
      List<GuestList> results     (List<GuestList>) query.getResultList();
     for (Object obj :: results) {{
      for (Object obj    results)
              GuestList guest == (GuestList) obj;
               GuestList guest    (GuestList) obj;
         String nickname == guest.getAuthor().getNickname();
          String nickname    guest.getAuthor().getNickname();
         out.println(nickname ++ "" "" ++ guest.getId());
          out.println(nickname             guest.getId());
   }}
}} catch(Exception ex) {{
    catch(Exception ex)
     out.println(ex);
      out.println(ex);
}}
Entity Relationships
Models association between entities.
There are four types of relationship multiplicities:
     @OneToOne
     @OneToMany
     @ManyToOne
Supports unidirectional as well as bidirectional relationships
     Unidirectional relationship: Entity A references B, but B doesn't
      reference A.
Example : ManyToOne Mapping
Example : OneToMany Mapping
Transactions and Entity Groups
Transaction = Group of Datastore operations that either
 succeed or fail
Entity groups are required because all grouped entities are
 stored in the same Datastore node
An entity may be either created or modifed once per
 transaction
Transactions may fail if a different user or process tries an
 update in the same group at the same time
Users decide whether to retry or roll the transaction back
Transaction in JPA : Example
Book book == em.find(Book.class, "9780596156732");
 Book book    em.find(Book.class, "9780596156732");
BookReview bookReview == new BookReview();
 BookReview bookReview    new BookReview();
bookReview.rating == 5;
 bookReview.rating    5;
book.getBookReviews().add(bookReview);
 book.getBookReviews().add(bookReview);
Transaction txn == em.getTransaction();
 Transaction txn    em.getTransaction();
txn.begin();
 txn.begin();
try {{
 try
   book == em.merge(book);
    book    em.merge(book);
    txn.commit();
     txn.commit();
}} finally {{
    finally
     if (txn.isActive()) {{
      if (txn.isActive())
          txn.rollback();
           txn.rollback();
     }}
}}
Unsupported Features of JPA
Owned many-to-many relationships, and unowned
 relationships.
"Join" queries.
Aggregation queries (group by, having, sum, avg, max, min)
Polymorphic queries.
Resources
Google App Engine for Java HOWTO, Andrew Lombardi, Mar
 2010
The Softer Side Of Schemas, Max Ross, May 2009
Official Google App Engine Tutorial,
 http://code.google.com/appengine/docs/java/gettingstarted/
Programming Google App Engine, Don Sanderson, O'Reilly,
 2010
Thank you

   thananum@gmail.com
www.facebook.com/imcinstitute
   www.imcinstitute.com

More Related Content

What's hot (18)

Suportando Aplicações Multi-tenancy com Java EE
Suportando Aplicações Multi-tenancy com Java EESuportando Aplicações Multi-tenancy com Java EE
Suportando Aplicações Multi-tenancy com Java EE
Rodrigo Cândido da Silva
 
Java EE and Spring Side-by-Side
Java EE and Spring Side-by-SideJava EE and Spring Side-by-Side
Java EE and Spring Side-by-Side
Reza Rahman
 
Integration of Backbone.js with Spring 3.1
Integration of Backbone.js with Spring 3.1Integration of Backbone.js with Spring 3.1
Integration of Backbone.js with Spring 3.1
Michał Orman
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5
Tuna Tore
 
Java Web Programming [3/9] : Servlet Advanced
Java Web Programming [3/9] : Servlet AdvancedJava Web Programming [3/9] : Servlet Advanced
Java Web Programming [3/9] : Servlet Advanced
IMC Institute
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
Emprovise
 
Android intents-3 www.j2program.blogspot.com
Android intents-3 www.j2program.blogspot.comAndroid intents-3 www.j2program.blogspot.com
Android intents-3 www.j2program.blogspot.com
Mohamed Rimzan
 
CTS Conference Web 2.0 Tutorial Part 2
CTS Conference Web 2.0 Tutorial Part 2CTS Conference Web 2.0 Tutorial Part 2
CTS Conference Web 2.0 Tutorial Part 2
Geoffrey Fox
 
Javatwo2012 java frameworkcomparison
Javatwo2012 java frameworkcomparisonJavatwo2012 java frameworkcomparison
Javatwo2012 java frameworkcomparison
Jini Lee
 
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
mfrancis
 
MVC on the server and on the client
MVC on the server and on the clientMVC on the server and on the client
MVC on the server and on the client
Sebastiano Armeli
 
Spring MVC Basics
Spring MVC BasicsSpring MVC Basics
Spring MVC Basics
Bozhidar Bozhanov
 
4. jsp
4. jsp4. jsp
4. jsp
AnusAhmad
 
Java Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXJava Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAX
IMC Institute
 
Local storage in Web apps
Local storage in Web appsLocal storage in Web apps
Local storage in Web apps
Ivano Malavolta
 
Spring 3.x - Spring MVC
Spring 3.x - Spring MVCSpring 3.x - Spring MVC
Spring 3.x - Spring MVC
Guy Nir
 
Soa development using javascript
Soa development using javascriptSoa development using javascript
Soa development using javascript
DsixE Inc
 
DataFX - JavaOne 2013
DataFX - JavaOne 2013DataFX - JavaOne 2013
DataFX - JavaOne 2013
Hendrik Ebbers
 
Suportando Aplicações Multi-tenancy com Java EE
Suportando Aplicações Multi-tenancy com Java EESuportando Aplicações Multi-tenancy com Java EE
Suportando Aplicações Multi-tenancy com Java EE
Rodrigo Cândido da Silva
 
Java EE and Spring Side-by-Side
Java EE and Spring Side-by-SideJava EE and Spring Side-by-Side
Java EE and Spring Side-by-Side
Reza Rahman
 
Integration of Backbone.js with Spring 3.1
Integration of Backbone.js with Spring 3.1Integration of Backbone.js with Spring 3.1
Integration of Backbone.js with Spring 3.1
Michał Orman
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5
Tuna Tore
 
Java Web Programming [3/9] : Servlet Advanced
Java Web Programming [3/9] : Servlet AdvancedJava Web Programming [3/9] : Servlet Advanced
Java Web Programming [3/9] : Servlet Advanced
IMC Institute
 
Android intents-3 www.j2program.blogspot.com
Android intents-3 www.j2program.blogspot.comAndroid intents-3 www.j2program.blogspot.com
Android intents-3 www.j2program.blogspot.com
Mohamed Rimzan
 
CTS Conference Web 2.0 Tutorial Part 2
CTS Conference Web 2.0 Tutorial Part 2CTS Conference Web 2.0 Tutorial Part 2
CTS Conference Web 2.0 Tutorial Part 2
Geoffrey Fox
 
Javatwo2012 java frameworkcomparison
Javatwo2012 java frameworkcomparisonJavatwo2012 java frameworkcomparison
Javatwo2012 java frameworkcomparison
Jini Lee
 
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
mfrancis
 
MVC on the server and on the client
MVC on the server and on the clientMVC on the server and on the client
MVC on the server and on the client
Sebastiano Armeli
 
Java Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXJava Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAX
IMC Institute
 
Local storage in Web apps
Local storage in Web appsLocal storage in Web apps
Local storage in Web apps
Ivano Malavolta
 
Spring 3.x - Spring MVC
Spring 3.x - Spring MVCSpring 3.x - Spring MVC
Spring 3.x - Spring MVC
Guy Nir
 
Soa development using javascript
Soa development using javascriptSoa development using javascript
Soa development using javascript
DsixE Inc
 

Viewers also liked (7)

Developing Java Web Applications In Google App Engine
Developing Java Web Applications In Google App EngineDeveloping Java Web Applications In Google App Engine
Developing Java Web Applications In Google App Engine
Tahir Akram
 
บทความเรื่อง การใช้ Cloud Computing ในประเทศไทย
บทความเรื่อง การใช้ Cloud Computing ในประเทศไทยบทความเรื่อง การใช้ Cloud Computing ในประเทศไทย
บทความเรื่อง การใช้ Cloud Computing ในประเทศไทย
IMC Institute
 
วิธีการประยุกต์ใช้ระบบ Cloud storage ของ Google Drive ในการบริหารจัดการข้อมูล
วิธีการประยุกต์ใช้ระบบ Cloud storage ของ Google Drive ในการบริหารจัดการข้อมูลวิธีการประยุกต์ใช้ระบบ Cloud storage ของ Google Drive ในการบริหารจัดการข้อมูล
วิธีการประยุกต์ใช้ระบบ Cloud storage ของ Google Drive ในการบริหารจัดการข้อมูล
K S
 
๋Java Web Programming on Cloud Computing using Google App Engine
๋Java Web Programming on Cloud Computing using Google App Engine๋Java Web Programming on Cloud Computing using Google App Engine
๋Java Web Programming on Cloud Computing using Google App Engine
IMC Institute
 
Cloud Computing กับการใช้งานในองค์กรต่างๆ
Cloud Computing กับการใช้งานในองค์กรต่างๆCloud Computing กับการใช้งานในองค์กรต่างๆ
Cloud Computing กับการใช้งานในองค์กรต่างๆ
Software Park Thailand
 
การประยุกต์ใช้ Cloud Computing สำหรับองค์กร
การประยุกต์ใช้  Cloud Computing สำหรับองค์กรการประยุกต์ใช้  Cloud Computing สำหรับองค์กร
การประยุกต์ใช้ Cloud Computing สำหรับองค์กร
IMC Institute
 
Developing Java Web Applications In Google App Engine
Developing Java Web Applications In Google App EngineDeveloping Java Web Applications In Google App Engine
Developing Java Web Applications In Google App Engine
Tahir Akram
 
บทความเรื่อง การใช้ Cloud Computing ในประเทศไทย
บทความเรื่อง การใช้ Cloud Computing ในประเทศไทยบทความเรื่อง การใช้ Cloud Computing ในประเทศไทย
บทความเรื่อง การใช้ Cloud Computing ในประเทศไทย
IMC Institute
 
วิธีการประยุกต์ใช้ระบบ Cloud storage ของ Google Drive ในการบริหารจัดการข้อมูล
วิธีการประยุกต์ใช้ระบบ Cloud storage ของ Google Drive ในการบริหารจัดการข้อมูลวิธีการประยุกต์ใช้ระบบ Cloud storage ของ Google Drive ในการบริหารจัดการข้อมูล
วิธีการประยุกต์ใช้ระบบ Cloud storage ของ Google Drive ในการบริหารจัดการข้อมูล
K S
 
๋Java Web Programming on Cloud Computing using Google App Engine
๋Java Web Programming on Cloud Computing using Google App Engine๋Java Web Programming on Cloud Computing using Google App Engine
๋Java Web Programming on Cloud Computing using Google App Engine
IMC Institute
 
Cloud Computing กับการใช้งานในองค์กรต่างๆ
Cloud Computing กับการใช้งานในองค์กรต่างๆCloud Computing กับการใช้งานในองค์กรต่างๆ
Cloud Computing กับการใช้งานในองค์กรต่างๆ
Software Park Thailand
 
การประยุกต์ใช้ Cloud Computing สำหรับองค์กร
การประยุกต์ใช้  Cloud Computing สำหรับองค์กรการประยุกต์ใช้  Cloud Computing สำหรับองค์กร
การประยุกต์ใช้ Cloud Computing สำหรับองค์กร
IMC Institute
 
Ad

Similar to Java Web Programming on Google Cloud Platform [2/3] : Datastore (20)

Introduction to Datastore
Introduction to DatastoreIntroduction to Datastore
Introduction to Datastore
Software Park Thailand
 
Google app engine - Soft Uni 19.06.2014
Google app engine - Soft Uni 19.06.2014Google app engine - Soft Uni 19.06.2014
Google app engine - Soft Uni 19.06.2014
Dimitar Danailov
 
Google App Engine Developer - Day2
Google App Engine Developer - Day2Google App Engine Developer - Day2
Google App Engine Developer - Day2
Simon Su
 
Java on Google App engine
Java on Google App engineJava on Google App engine
Java on Google App engine
Michael Parker
 
Easy ORM-ness with Objectify-Appengine - Indicthreads cloud computing confere...
Easy ORM-ness with Objectify-Appengine - Indicthreads cloud computing confere...Easy ORM-ness with Objectify-Appengine - Indicthreads cloud computing confere...
Easy ORM-ness with Objectify-Appengine - Indicthreads cloud computing confere...
IndicThreads
 
Gaej For Beginners
Gaej For BeginnersGaej For Beginners
Gaej For Beginners
Shinichi Ogawa
 
Google Developer Days Brazil 2009 - Java Appengine
Google Developer Days Brazil 2009 -  Java AppengineGoogle Developer Days Brazil 2009 -  Java Appengine
Google Developer Days Brazil 2009 - Java Appengine
Patrick Chanezon
 
The 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for JavaThe 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for Java
David Chandler
 
Talk 1: Google App Engine Development: Java, Data Models, and other things yo...
Talk 1: Google App Engine Development: Java, Data Models, and other things yo...Talk 1: Google App Engine Development: Java, Data Models, and other things yo...
Talk 1: Google App Engine Development: Java, Data Models, and other things yo...
Singapore Google Technology User Group
 
appengine java night #1
appengine java night #1appengine java night #1
appengine java night #1
Shinichi Ogawa
 
Appengine Java Night #2a
Appengine Java Night #2aAppengine Java Night #2a
Appengine Java Night #2a
Shinichi Ogawa
 
Jpa
JpaJpa
Jpa
vantinhkhuc
 
Appengine Nljug
Appengine NljugAppengine Nljug
Appengine Nljug
Paul Bakker
 
Megastore
MegastoreMegastore
Megastore
robjk
 
初心者向けGAE/Java説明資料
初心者向けGAE/Java説明資料初心者向けGAE/Java説明資料
初心者向けGAE/Java説明資料
Shinichi Ogawa
 
Easy ORMness with Objectify-Appengine
Easy ORMness with Objectify-AppengineEasy ORMness with Objectify-Appengine
Easy ORMness with Objectify-Appengine
Meetu Maltiar
 
Easy ORMness with Objectify-Appengine
Easy ORMness with Objectify-AppengineEasy ORMness with Objectify-Appengine
Easy ORMness with Objectify-Appengine
Inphina Technologies
 
Java Support On Google App Engine
Java Support On Google App EngineJava Support On Google App Engine
Java Support On Google App Engine
Xebia IT Architects
 
Developing, deploying and monitoring Java applications using Google App Engine
Developing, deploying and monitoring Java applications using Google App EngineDeveloping, deploying and monitoring Java applications using Google App Engine
Developing, deploying and monitoring Java applications using Google App Engine
IndicThreads
 
Db presentation google_megastore
Db presentation google_megastoreDb presentation google_megastore
Db presentation google_megastore
Alanoud Alqoufi
 
Google app engine - Soft Uni 19.06.2014
Google app engine - Soft Uni 19.06.2014Google app engine - Soft Uni 19.06.2014
Google app engine - Soft Uni 19.06.2014
Dimitar Danailov
 
Google App Engine Developer - Day2
Google App Engine Developer - Day2Google App Engine Developer - Day2
Google App Engine Developer - Day2
Simon Su
 
Java on Google App engine
Java on Google App engineJava on Google App engine
Java on Google App engine
Michael Parker
 
Easy ORM-ness with Objectify-Appengine - Indicthreads cloud computing confere...
Easy ORM-ness with Objectify-Appengine - Indicthreads cloud computing confere...Easy ORM-ness with Objectify-Appengine - Indicthreads cloud computing confere...
Easy ORM-ness with Objectify-Appengine - Indicthreads cloud computing confere...
IndicThreads
 
Google Developer Days Brazil 2009 - Java Appengine
Google Developer Days Brazil 2009 -  Java AppengineGoogle Developer Days Brazil 2009 -  Java Appengine
Google Developer Days Brazil 2009 - Java Appengine
Patrick Chanezon
 
The 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for JavaThe 90-Day Startup with Google AppEngine for Java
The 90-Day Startup with Google AppEngine for Java
David Chandler
 
Talk 1: Google App Engine Development: Java, Data Models, and other things yo...
Talk 1: Google App Engine Development: Java, Data Models, and other things yo...Talk 1: Google App Engine Development: Java, Data Models, and other things yo...
Talk 1: Google App Engine Development: Java, Data Models, and other things yo...
Singapore Google Technology User Group
 
appengine java night #1
appengine java night #1appengine java night #1
appengine java night #1
Shinichi Ogawa
 
Appengine Java Night #2a
Appengine Java Night #2aAppengine Java Night #2a
Appengine Java Night #2a
Shinichi Ogawa
 
Megastore
MegastoreMegastore
Megastore
robjk
 
初心者向けGAE/Java説明資料
初心者向けGAE/Java説明資料初心者向けGAE/Java説明資料
初心者向けGAE/Java説明資料
Shinichi Ogawa
 
Easy ORMness with Objectify-Appengine
Easy ORMness with Objectify-AppengineEasy ORMness with Objectify-Appengine
Easy ORMness with Objectify-Appengine
Meetu Maltiar
 
Easy ORMness with Objectify-Appengine
Easy ORMness with Objectify-AppengineEasy ORMness with Objectify-Appengine
Easy ORMness with Objectify-Appengine
Inphina Technologies
 
Java Support On Google App Engine
Java Support On Google App EngineJava Support On Google App Engine
Java Support On Google App Engine
Xebia IT Architects
 
Developing, deploying and monitoring Java applications using Google App Engine
Developing, deploying and monitoring Java applications using Google App EngineDeveloping, deploying and monitoring Java applications using Google App Engine
Developing, deploying and monitoring Java applications using Google App Engine
IndicThreads
 
Db presentation google_megastore
Db presentation google_megastoreDb presentation google_megastore
Db presentation google_megastore
Alanoud Alqoufi
 
Ad

More from IMC Institute (20)

นิตยสาร Digital Trends ฉบับที่ 14
นิตยสาร Digital Trends ฉบับที่ 14นิตยสาร Digital Trends ฉบับที่ 14
นิตยสาร Digital Trends ฉบับที่ 14
IMC Institute
 
Digital trends Vol 4 No. 13 Sep-Dec 2019
Digital trends Vol 4 No. 13  Sep-Dec 2019Digital trends Vol 4 No. 13  Sep-Dec 2019
Digital trends Vol 4 No. 13 Sep-Dec 2019
IMC Institute
 
บทความ The evolution of AI
บทความ The evolution of AIบทความ The evolution of AI
บทความ The evolution of AI
IMC Institute
 
IT Trends eMagazine Vol 4. No.12
IT Trends eMagazine  Vol 4. No.12IT Trends eMagazine  Vol 4. No.12
IT Trends eMagazine Vol 4. No.12
IMC Institute
 
เพราะเหตุใด Digitization ไม่ตอบโจทย์ Digital Transformation
เพราะเหตุใด Digitization ไม่ตอบโจทย์ Digital Transformationเพราะเหตุใด Digitization ไม่ตอบโจทย์ Digital Transformation
เพราะเหตุใด Digitization ไม่ตอบโจทย์ Digital Transformation
IMC Institute
 
IT Trends 2019: Putting Digital Transformation to Work
IT Trends 2019: Putting Digital Transformation to WorkIT Trends 2019: Putting Digital Transformation to Work
IT Trends 2019: Putting Digital Transformation to Work
IMC Institute
 
มูลค่าตลาดดิจิทัลไทย 3 อุตสาหกรรม
มูลค่าตลาดดิจิทัลไทย 3 อุตสาหกรรมมูลค่าตลาดดิจิทัลไทย 3 อุตสาหกรรม
มูลค่าตลาดดิจิทัลไทย 3 อุตสาหกรรม
IMC Institute
 
IT Trends eMagazine Vol 4. No.11
IT Trends eMagazine  Vol 4. No.11IT Trends eMagazine  Vol 4. No.11
IT Trends eMagazine Vol 4. No.11
IMC Institute
 
แนวทางการทำ Digital transformation
แนวทางการทำ Digital transformationแนวทางการทำ Digital transformation
แนวทางการทำ Digital transformation
IMC Institute
 
บทความ The New Silicon Valley
บทความ The New Silicon Valleyบทความ The New Silicon Valley
บทความ The New Silicon Valley
IMC Institute
 
นิตยสาร IT Trends ของ IMC Institute ฉบับที่ 10
นิตยสาร IT Trends ของ  IMC Institute  ฉบับที่ 10นิตยสาร IT Trends ของ  IMC Institute  ฉบับที่ 10
นิตยสาร IT Trends ของ IMC Institute ฉบับที่ 10
IMC Institute
 
แนวทางการทำ Digital transformation
แนวทางการทำ Digital transformationแนวทางการทำ Digital transformation
แนวทางการทำ Digital transformation
IMC Institute
 
The Power of Big Data for a new economy (Sample)
The Power of Big Data for a new economy (Sample)The Power of Big Data for a new economy (Sample)
The Power of Big Data for a new economy (Sample)
IMC Institute
 
บทความ Robotics แนวโน้มใหม่สู่บริการเฉพาะทาง
บทความ Robotics แนวโน้มใหม่สู่บริการเฉพาะทาง บทความ Robotics แนวโน้มใหม่สู่บริการเฉพาะทาง
บทความ Robotics แนวโน้มใหม่สู่บริการเฉพาะทาง
IMC Institute
 
IT Trends eMagazine Vol 3. No.9
IT Trends eMagazine  Vol 3. No.9 IT Trends eMagazine  Vol 3. No.9
IT Trends eMagazine Vol 3. No.9
IMC Institute
 
Thailand software & software market survey 2016
Thailand software & software market survey 2016Thailand software & software market survey 2016
Thailand software & software market survey 2016
IMC Institute
 
Developing Business Blockchain Applications on Hyperledger
Developing Business  Blockchain Applications on Hyperledger Developing Business  Blockchain Applications on Hyperledger
Developing Business Blockchain Applications on Hyperledger
IMC Institute
 
Digital transformation @thanachart.org
Digital transformation @thanachart.orgDigital transformation @thanachart.org
Digital transformation @thanachart.org
IMC Institute
 
บทความ Big Data จากบล็อก thanachart.org
บทความ Big Data จากบล็อก thanachart.orgบทความ Big Data จากบล็อก thanachart.org
บทความ Big Data จากบล็อก thanachart.org
IMC Institute
 
กลยุทธ์ 5 ด้านกับการทำ Digital Transformation
กลยุทธ์ 5 ด้านกับการทำ Digital Transformationกลยุทธ์ 5 ด้านกับการทำ Digital Transformation
กลยุทธ์ 5 ด้านกับการทำ Digital Transformation
IMC Institute
 
นิตยสาร Digital Trends ฉบับที่ 14
นิตยสาร Digital Trends ฉบับที่ 14นิตยสาร Digital Trends ฉบับที่ 14
นิตยสาร Digital Trends ฉบับที่ 14
IMC Institute
 
Digital trends Vol 4 No. 13 Sep-Dec 2019
Digital trends Vol 4 No. 13  Sep-Dec 2019Digital trends Vol 4 No. 13  Sep-Dec 2019
Digital trends Vol 4 No. 13 Sep-Dec 2019
IMC Institute
 
บทความ The evolution of AI
บทความ The evolution of AIบทความ The evolution of AI
บทความ The evolution of AI
IMC Institute
 
IT Trends eMagazine Vol 4. No.12
IT Trends eMagazine  Vol 4. No.12IT Trends eMagazine  Vol 4. No.12
IT Trends eMagazine Vol 4. No.12
IMC Institute
 
เพราะเหตุใด Digitization ไม่ตอบโจทย์ Digital Transformation
เพราะเหตุใด Digitization ไม่ตอบโจทย์ Digital Transformationเพราะเหตุใด Digitization ไม่ตอบโจทย์ Digital Transformation
เพราะเหตุใด Digitization ไม่ตอบโจทย์ Digital Transformation
IMC Institute
 
IT Trends 2019: Putting Digital Transformation to Work
IT Trends 2019: Putting Digital Transformation to WorkIT Trends 2019: Putting Digital Transformation to Work
IT Trends 2019: Putting Digital Transformation to Work
IMC Institute
 
มูลค่าตลาดดิจิทัลไทย 3 อุตสาหกรรม
มูลค่าตลาดดิจิทัลไทย 3 อุตสาหกรรมมูลค่าตลาดดิจิทัลไทย 3 อุตสาหกรรม
มูลค่าตลาดดิจิทัลไทย 3 อุตสาหกรรม
IMC Institute
 
IT Trends eMagazine Vol 4. No.11
IT Trends eMagazine  Vol 4. No.11IT Trends eMagazine  Vol 4. No.11
IT Trends eMagazine Vol 4. No.11
IMC Institute
 
แนวทางการทำ Digital transformation
แนวทางการทำ Digital transformationแนวทางการทำ Digital transformation
แนวทางการทำ Digital transformation
IMC Institute
 
บทความ The New Silicon Valley
บทความ The New Silicon Valleyบทความ The New Silicon Valley
บทความ The New Silicon Valley
IMC Institute
 
นิตยสาร IT Trends ของ IMC Institute ฉบับที่ 10
นิตยสาร IT Trends ของ  IMC Institute  ฉบับที่ 10นิตยสาร IT Trends ของ  IMC Institute  ฉบับที่ 10
นิตยสาร IT Trends ของ IMC Institute ฉบับที่ 10
IMC Institute
 
แนวทางการทำ Digital transformation
แนวทางการทำ Digital transformationแนวทางการทำ Digital transformation
แนวทางการทำ Digital transformation
IMC Institute
 
The Power of Big Data for a new economy (Sample)
The Power of Big Data for a new economy (Sample)The Power of Big Data for a new economy (Sample)
The Power of Big Data for a new economy (Sample)
IMC Institute
 
บทความ Robotics แนวโน้มใหม่สู่บริการเฉพาะทาง
บทความ Robotics แนวโน้มใหม่สู่บริการเฉพาะทาง บทความ Robotics แนวโน้มใหม่สู่บริการเฉพาะทาง
บทความ Robotics แนวโน้มใหม่สู่บริการเฉพาะทาง
IMC Institute
 
IT Trends eMagazine Vol 3. No.9
IT Trends eMagazine  Vol 3. No.9 IT Trends eMagazine  Vol 3. No.9
IT Trends eMagazine Vol 3. No.9
IMC Institute
 
Thailand software & software market survey 2016
Thailand software & software market survey 2016Thailand software & software market survey 2016
Thailand software & software market survey 2016
IMC Institute
 
Developing Business Blockchain Applications on Hyperledger
Developing Business  Blockchain Applications on Hyperledger Developing Business  Blockchain Applications on Hyperledger
Developing Business Blockchain Applications on Hyperledger
IMC Institute
 
Digital transformation @thanachart.org
Digital transformation @thanachart.orgDigital transformation @thanachart.org
Digital transformation @thanachart.org
IMC Institute
 
บทความ Big Data จากบล็อก thanachart.org
บทความ Big Data จากบล็อก thanachart.orgบทความ Big Data จากบล็อก thanachart.org
บทความ Big Data จากบล็อก thanachart.org
IMC Institute
 
กลยุทธ์ 5 ด้านกับการทำ Digital Transformation
กลยุทธ์ 5 ด้านกับการทำ Digital Transformationกลยุทธ์ 5 ด้านกับการทำ Digital Transformation
กลยุทธ์ 5 ด้านกับการทำ Digital Transformation
IMC Institute
 

Recently uploaded (20)

Data Validation and System Interoperability
Data Validation and System InteroperabilityData Validation and System Interoperability
Data Validation and System Interoperability
Safe Software
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI ProfessionalOracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free DownloadViral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
Safe Software
 
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdfvertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
 
Down the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training RoadblocksDown the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training Roadblocks
Rustici Software
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent IntegrationPyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptxFIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
The State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry ReportThe State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry Report
Liveplex
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementaryMurdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
Edge AI and Vision Alliance
 
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Floods in Valencia: Two FME-Powered Stories of Data ResilienceFloods in Valencia: Two FME-Powered Stories of Data Resilience
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Safe Software
 
Mastering AI Workflows with FME - Peak of Data & AI 2025
Mastering AI Workflows with FME - Peak of Data & AI 2025Mastering AI Workflows with FME - Peak of Data & AI 2025
Mastering AI Workflows with FME - Peak of Data & AI 2025
Safe Software
 
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdfcnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
AmirStern2
 
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
Edge AI and Vision Alliance
 
Oracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI FoundationsOracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI Foundations
VICTOR MAESTRE RAMIREZ
 
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven InfrastructureNo-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
SOFTTECHHUB
 
Oracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization ProgramOracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization Program
VICTOR MAESTRE RAMIREZ
 
High Availability On-Premises FME Flow.pdf
High Availability On-Premises FME Flow.pdfHigh Availability On-Premises FME Flow.pdf
High Availability On-Premises FME Flow.pdf
Safe Software
 
Data Validation and System Interoperability
Data Validation and System InteroperabilityData Validation and System Interoperability
Data Validation and System Interoperability
Safe Software
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI ProfessionalOracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free DownloadViral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
Safe Software
 
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdfvertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
 
Down the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training RoadblocksDown the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training Roadblocks
Rustici Software
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent IntegrationPyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptxFIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
The State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry ReportThe State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry Report
Liveplex
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementaryMurdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
Edge AI and Vision Alliance
 
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Floods in Valencia: Two FME-Powered Stories of Data ResilienceFloods in Valencia: Two FME-Powered Stories of Data Resilience
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Safe Software
 
Mastering AI Workflows with FME - Peak of Data & AI 2025
Mastering AI Workflows with FME - Peak of Data & AI 2025Mastering AI Workflows with FME - Peak of Data & AI 2025
Mastering AI Workflows with FME - Peak of Data & AI 2025
Safe Software
 
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdfcnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
AmirStern2
 
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
Edge AI and Vision Alliance
 
Oracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI FoundationsOracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI Foundations
VICTOR MAESTRE RAMIREZ
 
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven InfrastructureNo-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
SOFTTECHHUB
 
Oracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization ProgramOracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization Program
VICTOR MAESTRE RAMIREZ
 
High Availability On-Premises FME Flow.pdf
High Availability On-Premises FME Flow.pdfHigh Availability On-Premises FME Flow.pdf
High Availability On-Premises FME Flow.pdf
Safe Software
 

Java Web Programming on Google Cloud Platform [2/3] : Datastore

  • 1. Introduction to Datastore Assoc.Prof. Dr.Thanachart Numnonda Asst.Prof. Thanisa Kruawaisayawan www.imcinstitute.com July 2012
  • 2. Agenda What is DataStore? Using DataStore JPA in DataStore
  • 4. What is Datastore? Google App Engine Datastore is a schema-less persistence system, whose fundamental persistence unit is called Entity, c omposed by an immutable Key and a collection of mutable pr operties. Entities can be created, updated, deleted, loaded by key and queried for properties values. DataStore is consistent and transactional, with support to current transaction.
  • 5. The DataStore The Datastore is not a relational database nor a façade. Relational database technology doesn’t scale horizontally – Connection pools, shared caching are a problem The Datastore is one of many public APIs used for accessing Google’s
  • 8. The DataStore : Operations Transactions and Index are based on MegaTable. File persistence it's done with Google File System (GFS). It's distributed by Chubby, a lock service for loosely- coupled distributed systems.
  • 9. BigTable BigTable is a compressed, high performance, and proprietary database system built on Google File System (GFS), Chubby Lock Service, and a few other Google programs Currently not distributed or used outside of Google. BigTable development began in 2004. and is now used by a number of Google application Google Earth, Google Map, Gmail, Youtube, etc..
  • 10. BigTable : Design BigTable is a fast and extremely large-scale DBMS. It is a sparse, distributed multi-dimensional sorted map, sharing characteristics of both row-oriented and column- oriented databases. sparse because only "not null" values are persisted distributed in Google cloud persistent on Google File System multidimensional in columns values ordered lexicographically by key
  • 11. BigTable : Design Tables are optimized for GFS by being split into multiple tablets - segments of the table. BigTable is designed to scale into the petabyte. Each table has multiple dimensions (one of which is a feld for time, allowing for versioning and garbage collection). It allows an infnite number of rows and columns.
  • 12. Google File System GFS is a proprietary distributed fle system developed by Google. It is designed to provide effcient, reliable access to data using large clusters of commodity hardware. GFS grew out of an earlier Google effort, BigFiles, developed by Larry Page and Sergey Brin in the early days of Google, while it was still located in Stanford.
  • 14. DataStore Operations Datastore operations are defned around entities (data models) which are objects with one or more properties Types: string, user, Boolean, and so on Entities may be recursive or self-referential Entity relationships are one-to-many or many-to-many. Entities may be fxed or grow as needed.
  • 15. DataStore Storage Model Every entity is of a particular kind Entities in a kind need not have the same properties One entity may have different “columns” from another in the same kind! Unique IDs are automatically assigned unless the user defnes a key_name
  • 17. DataStore Storage Model Basic unit of storage is an Entity consisting of Kind (table) Key (primary key) Entity Group (partition) 0..N typed Properties (columns)
  • 18. Datastore Quotas Each call to Datastore counts towards the quota The amount of data cannot exceed the billable  Includes properties and keys but not the indices CPU and Datastore CPU time quotas apply
  • 19. Using the Datastore Applications may access the Datastore using the JDO or the JPA classes. The JDO and JPA classes are abstracted using the DataNucleus API Open source  Not very popular  Support for Java standards  Poor documentation
  • 21. Setting Up JPA The JPA and datastore JARs must be in the app's war/WEB-INF/lib/ directory. A confguration fle named persistence.xml must be in the app's war/WEB-INF/classes/META-INF/ directory, A confguration fle tells JPA to use the App Engine datastore. The appengine-api.jar must also be in the war/WEB- INF/lib/ directory.
  • 22. persistence.xml: Example <?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?> <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"> http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"> <persistence-unit name="thaijavaappPU" transaction-type="RESOURCE_LOCAL"> <persistence-unit name="thaijavaappPU" transaction-type="RESOURCE_LOCAL"> <provider>org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider <provider>org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider </provider> </provider> <non-jta-data-source/> <non-jta-data-source/> <properties> <properties> <property name="datanucleus.ConnectionURL" value="appengine"/> <property name="datanucleus.ConnectionURL" value="appengine"/> <property name="datanucleus.NontransactionalRead" value="true"/> <property name="datanucleus.NontransactionalRead" value="true"/> <property name="datanucleus.NontransactionalWrite" value="true"/> <property name="datanucleus.NontransactionalWrite" value="true"/> </properties> </properties> </persistence-unit> </persistence-unit> </persistence> </persistence>
  • 23. Getting an EntityManager Instance An app interacts with JPA using an instance of the EntityManager. import javax.persistence.EntityManagerFactory; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; import javax.persistence.Persistence; public class EMF {{ public class EMF private static final EntityManagerFactory emfInstance == private static final EntityManagerFactory emfInstance Persistence.createEntityManagerFactory("transactions-optional"); Persistence.createEntityManagerFactory("transactions-optional"); public static EntityManagerFactory get() {{ public static EntityManagerFactory get() return emfInstance; return emfInstance; }} }}
  • 24. Entity Class : Example @Entity @Entity public class GuestList implements Serializable {{ public class GuestList implements Serializable …… @Id @Id private String id; private String id; @Basic @Basic private User author; private User author; private String content; private String content; @Temporal(javax.persistence.TemporalType.DATE) @Temporal(javax.persistence.TemporalType.DATE) private Date visitDate; private Date visitDate; …… // Getter and Setter methods // Getter and Setter methods }}
  • 25. Queries and Indices A query operates on every entity of a given kind. Specify zero or more sort orders Specify zero or more flters on property values Indices are defned in the App Engine confguration fles Results are fetched directly from these indices; no indices are created on the fly WEB-INF/datastore-indexes.xml - non-standard fles Normalization is not recommended Optimization techniques for RDBMSs may result in poor Datastore performance!
  • 26. Query : Example EntityManager em == EMF.get().createEntityManager(); EntityManager em EMF.get().createEntityManager(); try {{ try Query query == em.createQuery("SELECT oo FROM GuestList AS o"); Query query em.createQuery("SELECT FROM GuestList AS o"); @SuppressWarnings("unchecked") @SuppressWarnings("unchecked") List<GuestList> results == (List<GuestList>) query.getResultList(); List<GuestList> results (List<GuestList>) query.getResultList(); for (Object obj :: results) {{ for (Object obj results) GuestList guest == (GuestList) obj; GuestList guest (GuestList) obj; String nickname == guest.getAuthor().getNickname(); String nickname guest.getAuthor().getNickname(); out.println(nickname ++ "" "" ++ guest.getId()); out.println(nickname guest.getId()); }} }} catch(Exception ex) {{ catch(Exception ex) out.println(ex); out.println(ex); }}
  • 27. Entity Relationships Models association between entities. There are four types of relationship multiplicities: @OneToOne @OneToMany @ManyToOne Supports unidirectional as well as bidirectional relationships Unidirectional relationship: Entity A references B, but B doesn't reference A.
  • 30. Transactions and Entity Groups Transaction = Group of Datastore operations that either succeed or fail Entity groups are required because all grouped entities are stored in the same Datastore node An entity may be either created or modifed once per transaction Transactions may fail if a different user or process tries an update in the same group at the same time Users decide whether to retry or roll the transaction back
  • 31. Transaction in JPA : Example Book book == em.find(Book.class, "9780596156732"); Book book em.find(Book.class, "9780596156732"); BookReview bookReview == new BookReview(); BookReview bookReview new BookReview(); bookReview.rating == 5; bookReview.rating 5; book.getBookReviews().add(bookReview); book.getBookReviews().add(bookReview); Transaction txn == em.getTransaction(); Transaction txn em.getTransaction(); txn.begin(); txn.begin(); try {{ try book == em.merge(book); book em.merge(book); txn.commit(); txn.commit(); }} finally {{ finally if (txn.isActive()) {{ if (txn.isActive()) txn.rollback(); txn.rollback(); }} }}
  • 32. Unsupported Features of JPA Owned many-to-many relationships, and unowned relationships. "Join" queries. Aggregation queries (group by, having, sum, avg, max, min) Polymorphic queries.
  • 33. Resources Google App Engine for Java HOWTO, Andrew Lombardi, Mar 2010 The Softer Side Of Schemas, Max Ross, May 2009 Official Google App Engine Tutorial, http://code.google.com/appengine/docs/java/gettingstarted/ Programming Google App Engine, Don Sanderson, O'Reilly, 2010
  • 34. Thank you [email protected] www.facebook.com/imcinstitute www.imcinstitute.com