> I had to strongly synchronize my app using Java options (locka,
> synchrnized objects, and so on...).

I have to warn you that all this synchronization will be in vain once
your application grows beyond 1 JVM. Java keyword "synchronized" is
only effective within a single instance of JVM. That is not to say
that even with 1 JVM your application may lose a lot of performance if
you are synchronizing on static methods or singleton objects, e.g. the
datastore.

> I think it is quite unbelievable that a huge giant like BigTable is so
> weak in concurrency issues...

BigTable gives you a lot of well-documented options to deal with
simultaneous access to data. A good place to start is
http://code.google.com/appengine/docs/java/datastore/transactions.html.
In your case, unless you really have to transact on all entities
processed by the servlet, I would recommend that you break your task
into several sub-tasks each limited to a single entity group.

> Perhaps my approach is geared from my experience in relational DBs,
> but I'm quite puzzeld...

Sounds like that might be the case. When working with BigTable, always
keep in mind that two entities (called table rows in RDBMS) do not
necessarily end up on the same server node. This is good, because it
allows BigTable to distribute the load across multiple hard drives.
However, when this happens you no longer are able to transact on these
entities. Entity groups tell BigTable that two or more related
entities must be stored in the database in such a way that a
transaction is possible. Unfortunately, you immediately lose
scalability within the entity group (thus the recommendation to keep
them small). Relational DBs always make that sacrifice by default and
put all table rows on the same hard drive. This makes it easy to
transact on arbitrary entities. However, you have to partition your
database manually to scale. Plus, you cannot transact across
partitions, so even with a RDBMS you still have the same limitation.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to