Objectify vs Java or Python API

6 views
Skip to first unread message

Bisquite via StackOverflow

unread,
May 15, 2017, 12:18:09 PM5/15/17
to gcd-stac...@googlegroups.com

We are currently using Google Data Store and Objectify to return query results back to the front end. I am currently doing performance comparisons between Data Store and Cloud Storage for returning lists of key values. My question is whether using Objectify will perform better than the Java or Python low-level APIs, or whether they should be the same. If the performance is not better with Objectify then I can safely use the regular APIs for my performance tests.

Any help appreciated.

Thanks, b/



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/43984278/objectify-vs-java-or-python-api

stickfigure via StackOverflow

unread,
May 15, 2017, 1:28:09 PM5/15/17
to gcd-stac...@googlegroups.com

This is a weird question. The performance of the Python and Java low-level APIs are wildly different because of the performance of the runtimes. Objectify is a thin object-mapping layer on top of the Java low-level API. In general, it does not add significant computational cost to do this mapping, although it is possible to create structures and patterns that do (especially with lifecycle callbacks). The "worst" is that Objectify does some class introspection on your entities at boot, which might or might not be significant depending on how many entity classes you have.

If you are asking this question, you are almost certainly prematurely optimizing.



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/43984278/objectify-vs-java-or-python-api/43985448#43985448

Andrei Volgin via StackOverflow

unread,
May 15, 2017, 4:08:05 PM5/15/17
to gcd-stac...@googlegroups.com

Objectify allows you to write code faster and make it easier to maintain at the expense of very small/negligible performance penalty.

You can mix low-level API with Objectify in the same application as necessary. If you ever notice a spot where performance difference is significant (which is unlikely, if you use Objectify correctly), then you can always re-write that part in low-level API code.



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/43984278/objectify-vs-java-or-python-api/43987915#43987915

Bisquite via StackOverflow

unread,
May 16, 2017, 6:03:10 AM5/16/17
to gcd-stac...@googlegroups.com

Thanks for the responses. I am not currently trying to optimise the application (as such) but trying to assess whether our data can be stored in Cloud Storage instead of Datastore, without incurring a significant performance hit when retrieving the keys. We constantly reload our data and thus have a large ingestion cost with Data Store each time we do so. If we used Cloud Storage instead then this would be minimal. This is an option which Google's architects have suggested so we are just doing some due diligence on it.



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/43984278/objectify-vs-java-or-python-api/43998233#43998233
Reply all
Reply to author
Forward
0 new messages