[appengine-java] Re: Number of writes per second limitation
If there is no need to reference the objects from outside the group, you would probably find it a lot more efficient to store the while array serialized as a byte array. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/Bp_t85WAAHwJ. To post to this group, send email to google-appengine-java@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.
[appengine-java] Re: many different Properties or Entity for name/value pairs
You can serialize a MapString,String property into a byte array to be stored in the entity The easiest way to do this would be to use Objectify with the @Serialized annotation http://code.google.com/p/objectify-appengine/wiki/IntroductionToObjectify#@Embedded -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/_tZZPKf5r6cJ. To post to this group, send email to google-appengine-java@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.
[appengine-java] Re: many different Properties or Entity for name/value pairs
You can serialize a MapString,String property into a byte array to be stored in the entity The easiest way to do this would be to use Objectify with the @Serialized annotation http://code.google.com/p/objectify-appengine/wiki/IntroductionToObjectify#@Serialized -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/gJlXN2L1eBsJ. To post to this group, send email to google-appengine-java@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.
Re: [appengine-java] Re: many different Properties or Entity for name/value pairs
hi gerald, thx for your answer but this is the ugliest solution ;) why serializing all pairs and storing them in one.property it will never be searchable... using one entity property for every map.entry or using one entity of a key value pair type, thats the question ;) schtief Am 04.11.2011 07:10 schrieb Gerald Tan woefulwab...@gmail.com: You can serialize a MapString,String property into a byte array to be stored in the entity The easiest way to do this would be to use Objectify with the @Serialized annotation http://code.google.com/p/objectify-appengine/wiki/IntroductionToObjectify#@Embedded -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/_tZZPKf5r6cJ. To post to this group, send email to google-appengine-java@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. -- 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-java@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.
Re: [appengine-java] Re: many different Properties or Entity for name/value pairs
From previous threads, it seems that the datastore prefers few large entities to more smaller ones - this is also reflected in pricing, you pay per operation as well as per byte. Storing a Map of Name-Value is exactly what the datastore is made for. I did talk to Jeff at Objectify about this (because I'm using Objectify for all my other entities) and he said that although this use case is probably valid and I'm (clearly now) not the only one doing it, making Objectify handle this case would complicate it too much. I think I agree with this, especially since the datastore handles properties like this so nicely. In addition, I can now make use of Objectify's CachingDatastoreService which means I don't have to worry about Memcache :-) One thought - can you search based on an item in a collection? If not and you do need to search based on these values, you might need to be more creative about how to split them. MyName-MyValue1 and MyName-MyValue2 which might become... MyName-Collection([MyValue1, MyValue2]) or perhaps... MyName.1-MyValue1 and MyName.2-MyValue2 if MyName.1 will never be a property name itself, and you can deal with parsing this. Thanks, Mat. On 4 November 2011 07:53, Mister Schtief lisc...@gmail.com wrote: hi gerald, thx for your answer but this is the ugliest solution ;) why serializing all pairs and storing them in one.property it will never be searchable... using one entity property for every map.entry or using one entity of a key value pair type, thats the question ;) schtief Am 04.11.2011 07:10 schrieb Gerald Tan woefulwab...@gmail.com: You can serialize a MapString,String property into a byte array to be stored in the entity The easiest way to do this would be to use Objectify with the @Serialized annotation http://code.google.com/p/objectify-appengine/wiki/IntroductionToObjectify#@Embedded -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/_tZZPKf5r6cJ. To post to this group, send email to google-appengine-java@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. -- 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-java@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. -- 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-java@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.
[appengine-java] 500 Server ERROR : please report this problem / Using Federated Login
Hi, Just uploaded a new app. The app requires login via Federated Login. The first thing that happens is a redirect using the domain parameter appended to the request : http://1.koma-software-3.appspot.com/go?domain=koma.be This gets redirected to : http://1.koma-software-3.appspot.com/_ah/login_redir?claimid=https://www.google.com/a/koma.be/o8/udcontinue=http://1.koma-software-3.appspot.com/go?domain=koma.be Next thing I see is : Error: Server Error The server encountered an error and could not complete your request. If the problem persists, please reporthttp://code.google.com/appengine/community.html your problem and mention this error message and the query that caused it. How can I investigate further ? Is this a AppEngine problem or mine ? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/Gxh1SlMcNFcJ. To post to this group, send email to google-appengine-java@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.
Re: [appengine-java] Users changing data
Sure, thanks Ikai, I should have done this first time around. When putting the entity (code from around my app stuck together) log(Storing user {0}, us.getCurrentUser().getUserId()); DatastoreServiceConfig DATASTORE_CONFIG = DatastoreServiceConfig.Builder.withDeadline(5); DATASTORE_CONFIG.readPolicy(new ReadPolicy(ReadPolicy.Consistency.EVENTUAL)); DatastoreService ds = DatastoreServiceFactory.getDatastoreService(DATASTORE_CONFIG) Entity e = new Entity(UserForTesting); e.setProperty(User, us.getCurrentUser()); ds.put(e); In a separate request (and I am sure that I'm looking at the same object!) (Dull Java code removed) PreparedQuery pq = ds.prepare(new Query(UserForTesting)); ... pq.asIterable() ... e.getProperties() ... log(u.getUserId()); log('/'); log(u.getNickname()); ... On 4 November 2011 01:05, Ikai Lan (Google) ika...@google.com wrote: Can you post code? It's not clear to me what you're doing. -- Ikai Lan Developer Programs Engineer, Google App Engine plus.ikailan.com | twitter.com/ikai On Thu, Nov 3, 2011 at 4:39 PM, Mat Jaggard matt...@jaggard.org.uk wrote: I have an entity that stores a user, however the user gets changed. When I put the entity in to the local datastore, the ID is like this 18530476822013922411 but when I get it out the ID is like this -1403876245. I haven't tried on production. Any ideas what's causing the issue? Have I done something wrong? Thanks, Mat. -- 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-java@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. -- 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-java@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. -- 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-java@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.
[appengine-java] Re: 500 Server ERROR : please report this problem / Using Federated Login
navigating to data store admin on the backend gives me this error : Error: Not FoundThe requested URL /_ah/login_required?continue=http://ah-builtin-python-bundle-dot-latest-dot-koma-software-3.appspot.com/_ah/datastore_admin/ was not found on this server. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/RzZcY8BoKcUJ. To post to this group, send email to google-appengine-java@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.
Re: [appengine-java] Re: Error: Server Error occurs when login using OpenID using GAE/J
Ah, yes. I saw your original post but couldn't see why it would be happening - it wasn't an error I came across when getting mine working. The code I use for Google accounts (regardless of whether they're apps or not) is like this... UserService us = UserServiceFactory.getUserService(); response.sendRedirect(us.createLoginURL(nextPageURL, null, https://www.google.com/accounts/o8/id;, null)); When I tried with https://www.google.com/a/mydomain.com/o8/ud?be=o8 (with or without the be=o8 bit) instead of https://www.google.com/accounts/o8/id I get a 500 error and nothing in the logs - literally nothing, even when showing All requests! The error is on this page... http://myapp.mydomain.com/_ah/login_redir?claimid=https://www.google.com/a/mydomain.com/o8/udcontinue=http://myapp.mydomain.com/public/loggedin?continue=http%3A%2F%2Fmyapp.mydomain.com%2Fadmin%2Fhome If you did use the method I've used, you could check the domain of the user after they're logged in I guess? Thanks, Mat. On 4 November 2011 10:03, Koen Maes k...@koma.be wrote: Relevant code? * at startup, first thing that happens is a redirect like in case parameter domain is present, otherwise I sent 401 - Unauthorized. The redirect seems to cause the server error. SetString attributesRequest = new HashSetString(); attributesRequest.add(openid.mode=checkid_immediate); attributesRequest.add(openid.ns=http://specs.openid.net/auth/2.0;); String loginUrl = userService.createLoginURL(request.getOriginalRef().toString(), domain, https://www.google.com/a/; + domain + /o8/ud, new HashSetString()); response.redirectTemporary(loginUrl); * Has it ever worked? No, only using dev server, this is the first deploy. I tried re-deploying without luck * What have you tried? I wonder what other options I have to try ? * When do you get the error? Immediately and always * All accounts or just one OpenID provider? It is intended to work with any Google Apps domain - a future apps marketplace application * Any stack trace printed or errors shown in the logs? Nothing whatsoever * Does your authentication work OK on the development server? Yes * Why are these questions in order of length, even though I typed themas I thought of them? LOL One more thing : navigating to data store admin on the backend gives me this error : Error: Not Found The requested URL /_ah/login_required?continue=http://ah-builtin-python-bundle-dot-latest-dot-koma-software-3.appspot.com/_ah/datastore_admin/ was not found on this server. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/EO8cxjjMUskJ. To post to this group, send email to google-appengine-java@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. -- 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-java@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.
Re: [appengine-java] Re: Error: Server Error occurs when login using OpenID using GAE/J
Well, I guess that wont work... I dont want to ordinary google accounts to have access, only customers who installed my app from the google apps marketplace. My URL will be whitelisted and users will never be presented with the login screen. So far the theory Hope someone @ google will take a look at this... maybe the OpenId url is not correct. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/yPJeKDwtUwgJ. To post to this group, send email to google-appengine-java@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.
Re: [appengine-java] Re: Error: Server Error occurs when login using OpenID using GAE/J
fixed it by providing simply the domain as openid idenitty and NULLs for the other params : loginUrl = userService.createLoginURL(request.getOriginalRef().toString(), null, domain, null); :-D -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/EBwqiAnjFU4J. To post to this group, send email to google-appengine-java@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.
[appengine-java] Re: 500 Server ERROR : please report this problem / Using Federated Login
OK, fixed : loginUrl = userService.createLoginURL(request.getOriginalRef().toString(), null, domain, null); -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/hSVK3ZpEHb0J. To post to this group, send email to google-appengine-java@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.
Re: [appengine-java] Re: Error: Server Error occurs when login using OpenID using GAE/J
Excellent but... a. Why?! b. Where's the documentation?! On 4 November 2011 12:49, Koen Maes k...@koma.be wrote: fixed it by providing simply the domain as openid idenitty and NULLs for the other params : loginUrl = userService.createLoginURL(request.getOriginalRef().toString(), null, domain, null); :-D -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/EBwqiAnjFU4J. To post to this group, send email to google-appengine-java@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. -- 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-java@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.
[appengine-java] Re: Users changing data
I can now confirm that I do not see this behaviour in production - only on the dev server. On Nov 4, 9:01 am, Matthew Jaggard matt...@jaggard.org.uk wrote: Sure, thanks Ikai, I should have done this first time around. When putting the entity (code from around my app stuck together) log(Storing user {0}, us.getCurrentUser().getUserId()); DatastoreServiceConfig DATASTORE_CONFIG = DatastoreServiceConfig.Builder.withDeadline(5); DATASTORE_CONFIG.readPolicy(new ReadPolicy(ReadPolicy.Consistency.EVENTUAL)); DatastoreService ds = DatastoreServiceFactory.getDatastoreService(DATASTORE_CONFIG) Entity e = new Entity(UserForTesting); e.setProperty(User, us.getCurrentUser()); ds.put(e); In a separate request (and I am sure that I'm looking at the same object!) (Dull Java code removed) PreparedQuery pq = ds.prepare(new Query(UserForTesting)); ... pq.asIterable() ... e.getProperties() ... log(u.getUserId()); log('/'); log(u.getNickname()); ... On 4 November 2011 01:05, Ikai Lan (Google) ika...@google.com wrote: Can you post code? It's not clear to me what you're doing. -- Ikai Lan Developer Programs Engineer, Google App Engine plus.ikailan.com | twitter.com/ikai On Thu, Nov 3, 2011 at 4:39 PM, Mat Jaggard matt...@jaggard.org.uk wrote: I have an entity that stores a user, however the user gets changed. When I put the entity in to the local datastore, the ID is like this 18530476822013922411 but when I get it out the ID is like this -1403876245. I haven't tried on production. Any ideas what's causing the issue? Have I done something wrong? Thanks, Mat. -- 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-java@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. -- 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-java@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. -- 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-java@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.
[appengine-java] Re: Number of writes per second limitation
Thank you, Gerald. I will look for alternative implementations if I can not call put() many times within a transaction. I am waiting for Ikai's comments. J.Ganesan On Nov 4, 11:02 am, Gerald Tan woefulwab...@gmail.com wrote: If there is no need to reference the objects from outside the group, you would probably find it a lot more efficient to store the while array serialized as a byte array. -- 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-java@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.
Re: [appengine-java] Re: Error: Server Error occurs when login using OpenID using GAE/J
I started from this thread to try these values : https://groups.google.com/d/msg/google-apps-marketplace-api/HpqT-Bh0BjY/KwevpQVoE30J -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/qHRzQkKnPO0J. To post to this group, send email to google-appengine-java@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.
Re: [appengine-java] Re: Users changing data
Yeah, that's weird. When you look at http://localhost:8080/_ah/admin, which user ID is it? Also ... are those the IDs the dev server is giving you? The dev_server should be giving pretty simple IDs, if I'm not mistaken. -- Ikai Lan Developer Programs Engineer, Google App Engine plus.ikailan.com | twitter.com/ikai On Fri, Nov 4, 2011 at 7:35 AM, Mat Jaggard matt...@jaggard.org.uk wrote: I can now confirm that I do not see this behaviour in production - only on the dev server. On Nov 4, 9:01 am, Matthew Jaggard matt...@jaggard.org.uk wrote: Sure, thanks Ikai, I should have done this first time around. When putting the entity (code from around my app stuck together) log(Storing user {0}, us.getCurrentUser().getUserId()); DatastoreServiceConfig DATASTORE_CONFIG = DatastoreServiceConfig.Builder.withDeadline(5); DATASTORE_CONFIG.readPolicy(new ReadPolicy(ReadPolicy.Consistency.EVENTUAL)); DatastoreService ds = DatastoreServiceFactory.getDatastoreService(DATASTORE_CONFIG) Entity e = new Entity(UserForTesting); e.setProperty(User, us.getCurrentUser()); ds.put(e); In a separate request (and I am sure that I'm looking at the same object!) (Dull Java code removed) PreparedQuery pq = ds.prepare(new Query(UserForTesting)); ... pq.asIterable() ... e.getProperties() ... log(u.getUserId()); log('/'); log(u.getNickname()); ... On 4 November 2011 01:05, Ikai Lan (Google) ika...@google.com wrote: Can you post code? It's not clear to me what you're doing. -- Ikai Lan Developer Programs Engineer, Google App Engine plus.ikailan.com | twitter.com/ikai On Thu, Nov 3, 2011 at 4:39 PM, Mat Jaggard matt...@jaggard.org.uk wrote: I have an entity that stores a user, however the user gets changed. When I put the entity in to the local datastore, the ID is like this 18530476822013922411 but when I get it out the ID is like this -1403876245. I haven't tried on production. Any ideas what's causing the issue? Have I done something wrong? Thanks, Mat. -- 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-java@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. -- 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-java@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. -- 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-java@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. -- 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-java@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.
Re: [appengine-java] Re: Number of writes per second limitation
If all 4000 entites are in a single entity group, in theory you can do this because it counts as a single transactional write. There's a maximum RPC size of 11mb (implementation detail) so if you trip this, you're in some trouble - the RPC size include not only the size of the entity but also the size of all the indexes. The problem is that this is a bad design. App Engine charges for datastore ops, so you're already using 4000 datastore write ops per request + multiples for indexes. Instead, try to figure out how to can write the data in as few entities as possible. I suspect you're still thinking relationally. You didn't answer my question about what problem you're trying to solve. What are you building? Why would 4000 writes be needed? Why can't all the data fit into a single entity? -- Ikai Lan Developer Programs Engineer, Google App Engine plus.ikailan.com | twitter.com/ikai On Fri, Nov 4, 2011 at 8:31 AM, J.Ganesan j.gane...@datastoregwt.comwrote: Thank you, Gerald. I will look for alternative implementations if I can not call put() many times within a transaction. I am waiting for Ikai's comments. J.Ganesan On Nov 4, 11:02 am, Gerald Tan woefulwab...@gmail.com wrote: If there is no need to reference the objects from outside the group, you would probably find it a lot more efficient to store the while array serialized as a byte array. -- 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-java@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. -- 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-java@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.
Re: [appengine-java] Re: Users changing data
When I view using the datastore viewer, I can only see the e-mail address of the user (plus the ID of the entity and the encoded key + write ops). The User I'm saving is the one that I get from userService.getCurrentUser() on the dev server and I'm the comparing the difference in ID from user.getUserId() before and after saving to/loading from the datastore. On 4 November 2011 18:30, Ikai Lan (Google) ika...@google.com wrote: Yeah, that's weird. When you look at http://localhost:8080/_ah/admin, which user ID is it? Also ... are those the IDs the dev server is giving you? The dev_server should be giving pretty simple IDs, if I'm not mistaken. -- Ikai Lan Developer Programs Engineer, Google App Engine plus.ikailan.com | twitter.com/ikai On Fri, Nov 4, 2011 at 7:35 AM, Mat Jaggard matt...@jaggard.org.uk wrote: I can now confirm that I do not see this behaviour in production - only on the dev server. On Nov 4, 9:01 am, Matthew Jaggard matt...@jaggard.org.uk wrote: Sure, thanks Ikai, I should have done this first time around. When putting the entity (code from around my app stuck together) log(Storing user {0}, us.getCurrentUser().getUserId()); DatastoreServiceConfig DATASTORE_CONFIG = DatastoreServiceConfig.Builder.withDeadline(5); DATASTORE_CONFIG.readPolicy(new ReadPolicy(ReadPolicy.Consistency.EVENTUAL)); DatastoreService ds = DatastoreServiceFactory.getDatastoreService(DATASTORE_CONFIG) Entity e = new Entity(UserForTesting); e.setProperty(User, us.getCurrentUser()); ds.put(e); In a separate request (and I am sure that I'm looking at the same object!) (Dull Java code removed) PreparedQuery pq = ds.prepare(new Query(UserForTesting)); ... pq.asIterable() ... e.getProperties() ... log(u.getUserId()); log('/'); log(u.getNickname()); ... On 4 November 2011 01:05, Ikai Lan (Google) ika...@google.com wrote: Can you post code? It's not clear to me what you're doing. -- Ikai Lan Developer Programs Engineer, Google App Engine plus.ikailan.com | twitter.com/ikai On Thu, Nov 3, 2011 at 4:39 PM, Mat Jaggard matt...@jaggard.org.uk wrote: I have an entity that stores a user, however the user gets changed. When I put the entity in to the local datastore, the ID is like this 18530476822013922411 but when I get it out the ID is like this -1403876245. I haven't tried on production. Any ideas what's causing the issue? Have I done something wrong? Thanks, Mat. -- 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-java@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. -- 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-java@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. -- 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-java@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. -- 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-java@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. -- 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-java@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.
Re: [appengine-java] Re: Number of writes per second limitation
On Fri, Nov 4, 2011 at 3:56 PM, Ikai Lan (Google) ika...@google.com wrote: If all 4000 entites are in a single entity group, in theory you can do this because it counts as a single transactional write. There's a maximum RPC size of 11mb (implementation detail) so if you trip this, you're in some trouble - the RPC size include not only the size of the entity but also the size of all the indexes. One question: If I write to 5 entities in a single entity group within one transaction, do these get batched up by the client library into a single RPC on commit or will this produce 5 RPCs plus one more for the commit? I'm curious to know what this does to the critical section, which could get large just from RPC latency. Thanks, Jeff -- 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-java@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.
Re: [appengine-java] Re: many different Properties or Entity for name/value pairs
FWIW you can declare a field @Embedded MapString, anything in Objectify and this will create a series of native properties in the low level entity. Ie: class MyEntity { @Id Long id; @Embedded MapString, Long strings; } If the map contained { prop1 : 12 } then you could filter by: ofy.query(MyEntity.class).filter(strings.prop1, 12) Of course the value could be a SetString instead of Long. But yeah, this will make the datastore viewer difficult to read if you have wildly different properties for each entity. Nothing you can do about that if you don't want to make the collection an opaque serialized blob. Jeff On Fri, Nov 4, 2011 at 1:44 AM, Matthew Jaggard matt...@jaggard.org.uk wrote: From previous threads, it seems that the datastore prefers few large entities to more smaller ones - this is also reflected in pricing, you pay per operation as well as per byte. Storing a Map of Name-Value is exactly what the datastore is made for. I did talk to Jeff at Objectify about this (because I'm using Objectify for all my other entities) and he said that although this use case is probably valid and I'm (clearly now) not the only one doing it, making Objectify handle this case would complicate it too much. I think I agree with this, especially since the datastore handles properties like this so nicely. In addition, I can now make use of Objectify's CachingDatastoreService which means I don't have to worry about Memcache :-) One thought - can you search based on an item in a collection? If not and you do need to search based on these values, you might need to be more creative about how to split them. MyName-MyValue1 and MyName-MyValue2 which might become... MyName-Collection([MyValue1, MyValue2]) or perhaps... MyName.1-MyValue1 and MyName.2-MyValue2 if MyName.1 will never be a property name itself, and you can deal with parsing this. Thanks, Mat. On 4 November 2011 07:53, Mister Schtief lisc...@gmail.com wrote: hi gerald, thx for your answer but this is the ugliest solution ;) why serializing all pairs and storing them in one.property it will never be searchable... using one entity property for every map.entry or using one entity of a key value pair type, thats the question ;) schtief Am 04.11.2011 07:10 schrieb Gerald Tan woefulwab...@gmail.com: You can serialize a MapString,String property into a byte array to be stored in the entity The easiest way to do this would be to use Objectify with the @Serialized annotation http://code.google.com/p/objectify-appengine/wiki/IntroductionToObjectify#@Embedded -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/_tZZPKf5r6cJ. To post to this group, send email to google-appengine-java@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. -- 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-java@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. -- 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-java@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. -- 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-java@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.
[appengine-java] A simple imap email connector doesn't work
Hi, A simple imap email program fails on appengine. The error message is clear that appengine does not allow socket classes. Can anyone suggest an option other than running the service outside appengine? Our app runs completely on GAE and it's painful to go for webservice from other cloud provider because of this. I wish google provides some secure wrappers to their own useful services.. java.lang.NoClassDefFoundError: javax.net.SocketFactory is a restricted class. Please see the Google App Engine developer's guide for more details. public static void doit() { Properties props = System.getProperties(); props.setProperty(mail.store.protocol, imaps); try { Session session = Session.getDefaultInstance(props, null); Store store = session.getStore(imaps); store.connect(imap.gmail.com, username, password); System.out.println(store); Folder inbox = store.getFolder(Inbox); inbox.open(Folder.READ_ONLY); Message messages[] = inbox.getMessages(); System.out.println(Message count = + messages.length); for(int i=0; i50; i++) { System.out.println(Time = + messages[i].getReceivedDate() + ; Subject = + messages[i].getSubject()); } } catch (NoSuchProviderException e) { e.printStackTrace(); System.exit(1); } catch (MessagingException e) { e.printStackTrace(); System.exit(2); } } -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/cLUdlzUWQY4J. To post to this group, send email to google-appengine-java@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.
[appengine-java] Re: Issues using JDO query in RemoteAPI
GAE developers, Anyone tried using java RemoteAPI on local servers and using the JDO object conversions? like in the example in this chain? I can only work with low level datastore Entity objects. If anyone has success with usage of JDO syntax on REmote API, your suggestions are much appreciated.. Thanks Neeli -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/andW9BCrtIgJ. To post to this group, send email to google-appengine-java@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.
Re: [appengine-java] Re: many different Properties or Entity for name/value pairs
This is pretty awesome feature, but did you forget to document it? :) -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/z7iXjUGzMLQJ. To post to this group, send email to google-appengine-java@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.