Re: [google-appengine] Query Embedded entities

2013-05-05 Thread xybrek
Ok I see, when you say synthetic index, do you mean create a Index kind on 
a different namespace?

Xybrek

On Sunday, May 5, 2013 1:42:55 PM UTC+8, Jeff Schnitzer wrote:

 EmbeddedEntity fields are not indexable. This is mentioned in the javadocs:


 https://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/EmbeddedEntity

 This doesn't prevent you from making your own synthetic index in the 
 top-level Entity though.

 Jeff



 On Sat, May 4, 2013 at 8:24 PM, xybrek xyb...@gmail.com javascript:wrote:

 I have few question regarding Query'ing EmbeddedEntity with GAE 
 datastore:

- Is EmbeddedEntity query-able? and Index-able? 
- If so, then how to index such embedded entity?
- Does Query, query Filter works with EmbeddedEntity 
- And that can we build queries that query Entity then filter its 
EmbeddedEntities 

 I've searched the docs by can't seem to find any clear answer to these 
 question.

 http://stackoverflow.com/questions/16380962/query-embedded-entities
  
 -- 
 You received this message because you are subscribed to the Google Groups 
 Google App Engine group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to google-appengi...@googlegroups.com javascript:.
 To post to this group, send email to 
 google-a...@googlegroups.comjavascript:
 .
 Visit this group at http://groups.google.com/group/google-appengine?hl=en
 .
 For more options, visit https://groups.google.com/groups/opt_out.
  
  




-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [google-appengine] Migrating to Python 2.7 - anything to watch out for?

2013-05-05 Thread Google Tasks Backup Moderator
I can answer your second question - you can have both Python 2.5 and 2.7
versions of your app, as different versions.


On 5 May 2013 10:24, NP nearapo...@gmail.com wrote:

 My app is currently deployed on GAE using python 2.5.

 I have made changes to the code and it is now running on python 2.7 and
 lxml. Before deploying the 2.7 code, I wanted to find out if there are any
 specific things I should watch out for/check for.

 Secondly, since we can deploy different versions of our code, is it
 possible for me to have both the 2.5 and 2.7 codes (as different versions)
 or is there a requirement that all versions of your app must use the same
 python version? I was thinking of deploying the 2.7 as a different version
 and watching how it performed before deleting the 2.5 version.

 Finally, the Key IDs for my datastore entities are automatically
 generated. I noticed that for python 2.7, these IDs are very long (they are
 16 digits long on my development server) whereas they are shorter on python
 2.5 (6 digits long). Is there something I can do to reduce the length in
 2.7 or is this the expected behavior in 2.7?

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to google-appengine+unsubscr...@googlegroups.com.
 To post to this group, send email to google-appengine@googlegroups.com.
 Visit this group at http://groups.google.com/group/google-appengine?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [google-appengine] Query Embedded entities

2013-05-05 Thread Jeff Schnitzer
No, I mean make up a field in your POJO that _is_ indexed and automatically
populate it with the value you want to index.  A very crude example is
something like this:

class Person {
   // ...
   String name;
   @Index String nameNormalized;

   public void setName(String value) {
  name = value;
  nameNormalized = value.toLowerCase();
   }
}

Now you can filter by nameNormalized and voila, you have case-insensitive
queries.

You might have to get imaginative about how you create these synthetic
indexes, of course - especially when you have nested layers of collections
of EmbeddedEntity. But you should be able to figure out something that will
work.

Jeff


On Sat, May 4, 2013 at 11:08 PM, xybrek xyb...@gmail.com wrote:

 Ok I see, when you say synthetic index, do you mean create a Index kind on
 a different namespace?

 Xybrek


 On Sunday, May 5, 2013 1:42:55 PM UTC+8, Jeff Schnitzer wrote:

 EmbeddedEntity fields are not indexable. This is mentioned in the
 javadocs:

 https://developers.google.com/**appengine/docs/java/javadoc/**
 com/google/appengine/api/**datastore/EmbeddedEntityhttps://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/EmbeddedEntity

 This doesn't prevent you from making your own synthetic index in the
 top-level Entity though.

 Jeff



 On Sat, May 4, 2013 at 8:24 PM, xybrek xyb...@gmail.com wrote:

 I have few question regarding Query'ing EmbeddedEntity with GAE
 datastore:

- Is EmbeddedEntity query-able? and Index-able?
- If so, then how to index such embedded entity?
- Does Query, query Filter works with EmbeddedEntity
- And that can we build queries that query Entity then filter its
EmbeddedEntities

 I've searched the docs by can't seem to find any clear answer to these
 question.

 http://stackoverflow.com/**questions/16380962/query-**embedded-entitieshttp://stackoverflow.com/questions/16380962/query-embedded-entities

 --
 You received this message because you are subscribed to the Google
 Groups Google App Engine group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to google-appengi...@**googlegroups.com.
 To post to this group, send email to google-a...@googlegroups.**com.

 Visit this group at http://groups.google.com/**
 group/google-appengine?hl=enhttp://groups.google.com/group/google-appengine?hl=en
 .
 For more options, visit 
 https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
 .






-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [google-appengine] Re: Best strategy for near real time updates?

2013-05-05 Thread Pertti Kellomäki
Hi Vinny,

Essentially, if you want to push updates in less than a handful of seconds,
 use the channel API. For anything else, AJAX/JSONP pull updating is
 completely fine.


Thanks for your insight. In my case updates are relatively infrequent and
latency is not a big problem, so I guess I'll save a few bucks and
implement pull updating.
-- 
Pertti

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [google-appengine] Re: Best strategy for near real time updates?

2013-05-05 Thread Pertti Kellomäki
Hi again Vinny,

A related question about implementing pull updates. I would like to pull
only the updates since the previous pull, but if possible I would like to
avoid recording which updates have been delivered to each client.

How much can I trust the datastore timestamps (i.e. auto_now)? The hrd is
eventually consistent, and from what I've read eventually means within a
few seconds. Would I be in the clear if I post the server side timestamp T
returned by the previous poll, and the server replies with all updates with
timestamps from say T-30s up to now? So if the client polls once a minute,
it polls 90 second time windows at 60 second intervals. Any duplicates
would be dealt with by the client.
-- 
Pertti

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [google-appengine] Re: Best strategy for near real time updates?

2013-05-05 Thread Jeff Schnitzer
This has come up a number of times in the past. Timestamps are based on the
clock on the server running your Python code. Google makes no official
guarantees about clock skew in the cluster, although presumably they are
all NTP synchronized. In practice, 30s of overlap is going to work 99.9% of
the time. I wouldn't trust anything less than 10s through - people I trust
have observed multiple seconds of skew in the system.

Jeff


On Sun, May 5, 2013 at 12:13 PM, Pertti Kellomäki 
pertti.kellom...@gmail.com wrote:

 Hi again Vinny,

 A related question about implementing pull updates. I would like to pull
 only the updates since the previous pull, but if possible I would like to
 avoid recording which updates have been delivered to each client.

 How much can I trust the datastore timestamps (i.e. auto_now)? The hrd is
 eventually consistent, and from what I've read eventually means within a
 few seconds. Would I be in the clear if I post the server side timestamp T
 returned by the previous poll, and the server replies with all updates with
 timestamps from say T-30s up to now? So if the client polls once a minute,
 it polls 90 second time windows at 60 second intervals. Any duplicates
 would be dealt with by the client.
 --
 Pertti


  --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to google-appengine+unsubscr...@googlegroups.com.
 To post to this group, send email to google-appengine@googlegroups.com.
 Visit this group at http://groups.google.com/group/google-appengine?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[google-appengine] Mungo API, a Document interface to the GAE Datastore

2013-05-05 Thread Kerby Martino
Due to my requirement to natively store JSON documents into the Datastore 
I was able to put up a working prototype http://bit.ly/13eSDpr.

I called it Mungo, and its is a Document interface to the App Engine 
Datastore which introduces the concept of DB, DBCollection, and DBObject. 
It is designed to allow the storing of JSON-documents in the most native 
way possible. DB maps to Namespaces, DBCollection maps to Kinds, and 
DBObject maps to Entities (w/ Embedded entities). I chose this approach so 
that it maps natively and not just set a specific Datastore Kind for a 
JSON document. This way existing data of any kind and entity can be 
retrieved as JSON document directly. 


I'd like to share this to the GAE community. There are still lots of work 
to be done, but at least some of its core function is up. 

You can check the Ohloh link if you just want to check the status of the 
project, but if you want to dig into the code (and perhaps help out), you 
can check the Github page. You can also try it in your code, just check the 
Github project page README. 


Here are some links for the project:

https://www.ohloh.net/p/mungo 

https://github.com/pagecrumb/mungo


Join us in Google+: Mungo 
Communityhttps://plus.google.com/u/0/communities/115821851437598488897

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[google-appengine] Re: Attention Java MapReduce users

2013-05-05 Thread Eric Jahn
Tom,
This is great news.  I have one lingering problem as a result of the Files 
API Bug.  Before the Files API fix, I had persisted the file service urls 
whilst I had been writing to them, and then finalized them successfully.  
But, because of this bug I couldn't retrieve a blobstore key by passing 
these urls to BlobKey.getKeyString().   btw, I'm not using java MapReduce , 
just the App Engine Files API and Blobstore).  Is there a way I can somehow 
retrieve my finalized blobstore files which aren't appearing in my App 
Engine dashboard Blobstore viewer?  If I start with a new file, I see them 
appear, but this is now after the Files API bug fix, I presume.  Thanks for 
any thoughts.  -Eric


On Wednesday, May 1, 2013 5:42:53 PM UTC-4, Tom Kaitchuck wrote:

 This is something we are aware of and are working on for future releases.

 For this update we encourage you to download and deploy the new code right 
 away.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[google-appengine] Google Drive search functionality for GAE ?

2013-05-05 Thread Davy Sitbon
Hi,

I'm interesting in storing files in GAE and would like to know if it's possible 
to index their contents for future search requests without having to decode the 
content and use GAE search API. As GAE is supposed to give access to 
technologies used by google products I'm wondering if Google Drive Search API 
is usable for files stored in GAE even if there are known limitations :)

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [google-appengine] Re: Best strategy for near real time updates?

2013-05-05 Thread Pertti Kellomäki
Hi,

On Sun, May 5, 2013 at 10:20 PM, Jeff Schnitzer j...@infohazard.org wrote:

 This has come up a number of times in the past. Timestamps are based on
 the clock on the server running your Python code. Google makes no official
 guarantees about clock skew in the cluster, although presumably they are
 all NTP synchronized. In practice, 30s of overlap is going to work 99.9% of
 the time.


Thanks, that's plenty reliable for my purposes. I realize this may be well
trodden water, apologies for that. I am fairly new to app engine so I need
to feel my way around a bit.
-- 
Pertti

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.