Google Cloud Platform Blog
JPA/JDO Java Persistence Tips - The Year In Review
Tuesday, December 22, 2009
If you’re developing a Java application on App Engine you probably already know that you can use JPA and JDO, both standard Java persistence APIs, to interact with the datastore. What you may not know, and what I’m here to point out, is that for the past few months I’ve been accumulating a
collection of practical, real-world examples
that can help you take full advantage of these powerful APIs.
In
episode one
I put together a working example of an owned, bidirectional, one-to-many relationship and demonstrated how you can persist child objects just by associating them with parent objects. In
episode two
I demonstrated how to perform a batch get by issuing a query that only filters on the primary key property of your model object. In
episode three
I explored the exciting world of “transparent persistence,” explaining how you can modify the persistent state of objects without making any explicit calls to repersist them. In
episode four
I issued a keys-only query and got the results back crazy-fast because the datastore skipped the extra scan that turns keys into full-fledged entities. And in
episode five
I demonstrated how serialized fields can help you store arbitrary objects in the datastore.
After episode five I got a little bit tired, but there was still so much more to say, so I pressed on.
In
episode six
I powered through a discussion of long-running transactions and unearthed the ancient secret of how you can use optimistic locking to prevent users from updating stale data. In
episode seven
I explained how using unindexed properties can speed up your writes and save you valuable CPU time. In
episode eight
I attempted (cautiously) to blow your mind with a solution for case-insensitive queries. And finally, in
episode nine
, mere hours after releasing support for != and IN query operators in the SDK, I dove under the hood of these operators to help you understand their performance characteristics.
Many of these topics were inspired by questions from you, our users, so if there are topics you’d like to see covered in the coming year please let me know via
the forum
. As long as you keep reading and asking questions, I’ll keep writing.
Max Ross, App Engine Engineer
No comments :
Post a Comment
Don't Miss Next '17
Use promo code NEXT1720 to save $300 off general admission
REGISTER NOW
Free Trial
GCP Blogs
Big Data & Machine Learning
Kubernetes
GCP Japan Blog
Labels
Announcements
56
Big Data & Machine Learning
91
Compute
156
Containers & Kubernetes
36
CRE
7
Customers
90
Developer Tools & Insights
80
Events
34
Infrastructure
24
Management Tools
39
Networking
18
Open Source
105
Partners
63
Pricing
24
Security & Identity
23
Solutions
16
Stackdriver
19
Storage & Databases
111
Weekly Roundups
16
Archive
2017
Feb
Jan
2016
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2015
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2014
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2013
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2012
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2011
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2010
Dec
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2009
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2008
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Feed
Subscribe by email
Technical questions? Check us out on
Stack Overflow
.
Subscribe to
our monthly newsletter
.
Google
on
Follow @googlecloud
Follow
Follow
No comments :
Post a Comment