[appengine-java] Re: 1.6.0 Prerelease SDKs are out

2011-11-01 Thread Marcel Overdijk
We have released an experimental utility, available in
the Admin Console, to  assist in migrating your application to the
High Replication datastore.

Does this mean I can migrate existing app to HRD from MS?
I don't need to backup any data so can I just switch to HRD?
Looking into the admin console, I didn't find the utility mentioned.

Cheers,
Marcel


On Nov 1, 2:13 am, Marzia Niccolai ma...@google.com wrote:
 Hi,

 We've just uploaded the 1.6.0 Prerelease 
 SDKs:http://code.google.com/p/googleappengine/downloads/list

 Please note that new features are not available in production until the
 final release, and documentation for these features will be available at
 this time as well. Let us know if there are any issues found.

 Below are the release notes for this release.

 Thanks,
 Marzia

 App Engine Python SDK - Release NotesVersion
 1.6.0===- On November 7th, App Engine will
 be out of Preview. The new Terms of Service  and previously announced
 pricing changes will be in effect. Additionally, all  paid apps are
 now covered by our 
 SLA.http://www.google.com/enterprise/cloud/appengine/pricing.html
 http://www.google.com/url?q=http://www.google.com/enterprise/cloud/ap...-
 Paid apps can now specify the maximum pending latency for instances
 and the  minimum number of idle instances for your application in the
 Admin Console.- We have released an experimental utility, available in
 the Admin Console, to  assist in migrating your application to the
 High Replication datastore. This  utility allows you to copy the bulk
 of your data in the background, while the  source application is still
 serving. You then need a brief read-only period to  migrate your
 application data while you copy the data that has changed from  the
 time the original copy started.- Blobstore, which was previously
 limited to apps with billing enabled, is now  available for all apps.-
 We have published a new article on Datastore Index Selection and
 Advanced  Search which explains our recent improvements to the query
 planner that make  exploding indexes 
 unnecessary.http://code.google.com/appengine/articles/indexselection.html
 http://www.google.com/url?q=http://code.google.com/appengine/articles...-
 Applications can now receive xmpp error stanzas at /_ah/xmpp/error.-
 In the Admin Console data viewer, you can now filter by namespace from
 a drop  down menu, if applicable.- In the Admin Console's Datastore
 Statistics, we now offer namespace suggest  for filtering stats.- We
 have released as experimental the full MapReduce framework.- The
 mail_stub.get_sent_messages() call now returns EmailMessage
 instances.- Fixed an issue when setting an initial_value in
 memcache.incr unexpectedly  returned a 
 string.http://code.google.com/p/googleappengine/issues/detail?id=2012
 http://www.google.com/url?q=http://code.google.com/p/googleappengine/...-
 Fixed an issue where DoS stats in the Admin Console didn't work for
 High  Replication 
 apps.http://code.google.com/p/googleappengine/issues/detail?id=5237
 http://www.google.com/url?q=http://code.google.com/p/googleappengine/...

 App Engine Java SDK - Release NotesVersion 1.6.0=- On
 November 7th, App Engine will be out of Preview. The new Terms of
 Service  and previously announced pricing changes will be in effect.
 Additionally, all  paid apps are now covered by our 
 SLA.http://www.google.com/enterprise/cloud/appengine/pricing.html
 http://www.google.com/url?q=http://www.google.com/enterprise/cloud/ap...-
 Paid apps can now specify the maximum pending latency for instances
 and the  minimum number of idle instances for your application in the
 Admin Console.- We have released an experimental utility, available in
 the Admin Console, to  assist in migrating your application to the
 High Replication datastore. This  utility allows you to copy the bulk
 of your data in the background, while the  source application is still
 serving. You then need a brief read-only period to  migrate your
 application data while you copy the data that has changed from  the
 time the original copy started.- Blobstore, which was previously
 limited to apps with billing enabled, is now  available for all apps.-
 We have published a new article on Datastore Index Selection and
 Advanced  Search which explains our recent improvements to the query
 planner that make  exploding indexes 
 unnecessary.http://code.google.com/appengine/articles/indexselection.html
 http://www.google.com/url?q=http://code.google.com/appengine/articles...-
 Applications can now receive xmpp error stanzas at /_ah/xmpp/error.-
 In the Admin Console data viewer, you can now filter by namespace from
 a drop  down menu, if applicable.- In the Admin Console's Datastore
 Statistics, we now offer namespace suggest  for filtering stats.-
 Added API functionality for making calls to the Memcache API
 asynchronously.- In the Memcache API, getIdentifiable() and
 putIfUntouched() now support  batch 

Re: [appengine-java] 1.6.0 Prerelease SDKs are out

2011-11-01 Thread Matthew Jaggard
Regarding the index selection shown here:
http://code.google.com/appengine/articles/indexselection.html

is it possible / required to put the query in the right order to get
the best performance?

For example, if I have a lot of black and white photos and just a
handful of panoramic ones, does the first query below behave
differently compared to the second?
SELECT * FROM Photo WHERE colouration=black  white AND
aspect=panoramic ORDER BY date_added DESC;
SELECT * FROM Photo WHERE aspect=panoramic AND colouration=black 
white ORDER BY date_added DESC;

On 1 November 2011 01:13, Marzia Niccolai ma...@google.com wrote:
 Hi,
 We've just uploaded the 1.6.0 Prerelease SDKs:
 http://code.google.com/p/googleappengine/downloads/list
 Please note that new features are not available in production until the
 final release, and documentation for these features will be available at
 this time as well. Let us know if there are any issues found.
 Below are the release notes for this release.
 Thanks,
 Marzia

 App Engine Python SDK - Release Notes

 Version 1.6.0
 ===
 - On November 7th, App Engine will be out of Preview. The new Terms of
 Service
   and previously announced pricing changes will be in effect. Additionally,
 all
   paid apps are now covered by our SLA.
 http://www.google.com/enterprise/cloud/appengine/pricing.html
 - Paid apps can now specify the maximum pending latency for instances and
 the
   minimum number of idle instances for your application in the Admin
 Console.
 - We have released an experimental utility, available in the Admin Console,
 to
   assist in migrating your application to the High Replication datastore.
 This
   utility allows you to copy the bulk of your data in the background, while
 the
   source application is still serving. You then need a brief read-only
 period to
   migrate your application data while you copy the data that has changed
 from
   the time the original copy started.
 - Blobstore, which was previously limited to apps with billing enabled, is
 now
   available for all apps.
 - We have published a new article on Datastore Index Selection and Advanced
   Search which explains our recent improvements to the query planner that
 make
   exploding indexes unnecessary.
 http://code.google.com/appengine/articles/indexselection.html
 - Applications can now receive xmpp error stanzas at /_ah/xmpp/error.
 - In the Admin Console data viewer, you can now filter by namespace from a
 drop
   down menu, if applicable.
 - In the Admin Console's Datastore Statistics, we now offer namespace
 suggest
   for filtering stats.
 - We have released as experimental the full MapReduce framework.
 - The mail_stub.get_sent_messages() call now returns EmailMessage instances.
 - Fixed an issue when setting an initial_value in memcache.incr unexpectedly
   returned a string.
 http://code.google.com/p/googleappengine/issues/detail?id=2012
 - Fixed an issue where DoS stats in the Admin Console didn't work for High
   Replication apps.
 http://code.google.com/p/googleappengine/issues/detail?id=5237

 App Engine Java SDK - Release Notes

 Version 1.6.0
 =
 - On November 7th, App Engine will be out of Preview. The new Terms of
 Service
   and previously announced pricing changes will be in effect. Additionally,
 all
   paid apps are now covered by our SLA.
 http://www.google.com/enterprise/cloud/appengine/pricing.html
 - Paid apps can now specify the maximum pending latency for instances and
 the
   minimum number of idle instances for your application in the Admin
 Console.
 - We have released an experimental utility, available in the Admin Console,
 to
   assist in migrating your application to the High Replication datastore.
 This
   utility allows you to copy the bulk of your data in the background, while
 the
   source application is still serving. You then need a brief read-only
 period to
   migrate your application data while you copy the data that has changed
 from
   the time the original copy started.
 - Blobstore, which was previously limited to apps with billing enabled, is
 now
   available for all apps.
 - We have published a new article on Datastore Index Selection and Advanced
   Search which explains our recent improvements to the query planner that
 make
   exploding indexes unnecessary.
 http://code.google.com/appengine/articles/indexselection.html
 - Applications can now receive xmpp error stanzas at /_ah/xmpp/error.
 - In the Admin Console data viewer, you can now filter by namespace from a
 drop
   down menu, if applicable.
 - In the Admin Console's Datastore Statistics, we now offer namespace
 suggest
   for filtering stats.
 - Added API functionality for making calls to the Memcache API
 asynchronously.
 - In the Memcache API, getIdentifiable() and putIfUntouched() now support
   batch operations.
 - We've added a page, /_ah/admin/capabilitiesstatus, to the dev console that
   allows you to configure the capability 

[appengine-java] Re: Change from String to Integer , now can't rid of Zombie instances... what is the right procedure to do so?

2011-11-01 Thread Daniel
Thanks for the suggestions,

Ian's sounds unrealistic (to me at least)

Ronaldo, could you please explain more about the method you are using?
or post some references/url's so i could read some more?


Thanks!

On Oct 30, 10:33 am, Ian Marshall ianmarshall...@gmail.com wrote:
 You might want to implement an alternative procedure of the following
 stages to change the data type of your data mamber = field:

 1.  Add the data member quantityToAddNew of data type Integer. Use
 this in your code instead of quantityToAdd. Deploy.
 2.  After a suitable delay (at least 24 hours?): change the data type
 of the data member quantityToAdd to Integer. Use this in your code
 instead of quantityToAddNew. Deploy.
 3.  After a suitable delay (at least 24 hours?): remove the data
 member quantityToAddNew. Deploy. You're done.

 Enjoy?

 On Oct 29, 11:44 pm, Ronoaldo José de Lana Pereira







 rpere...@beneficiofacil.com.br wrote:
  Sine you are talking about _ah_SESSION stuff I suppose you are serializing
  ToBuyBeans to the sessions. On AppEngine, sessions are implemented using a
  combination of datastore and memecache. When you deleted your old session
  data from the datastore, the memcache was still there, and only when they
  got flushed your problem was automatic solved.

  Sadly, I was having this trouble too previously, and the only way to get
  rid of it was to deploy a versions that was trying to fetch data from
  session and convert to new format or invalidate the session. This is very
  odd, tought, so I started to store only unchanged data, like a JSON
  representation of you objects, that will never stop your app when you
  change your code and redeploy. Gson and flex-json are good start points,
  apart from the fact that they add some small conversion overhead before
  store data in session.

  Hope this helps (sorry for typos ... I'm sleepy)

  -Ronoaldo

-- 
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: Change from String to Integer , now can't rid of Zombie instances... what is the right procedure to do so?

2011-11-01 Thread Ronoaldo José de Lana Pereira
Daniel,

To convert old session data I started to persist just the user Id in 
session. Sadly, unlike memcache, you can't control how the session is 
deserialized. In my case, any request with has the old user data in session 
was throwing 500 erros and I couldn't control this behavior (it was a 
filter from the gae...). What I did was something like this:

public MyUser getCurrentUser(HttpServletRequest req) {
   Object userOrId = req.getSession().getAttribute(user);
   if (userOrId instanceof Long) {
  return loadUserFromDsOrMemcache((Long) userOrId);
   } else {
  // Remove user from session and start storing ID for next change to 
User class dont raise exceptoins ... 
  User user = (User) userOrId;
  req.getSession().setAttribute(user, user.getId());
  return user;
   }
}

This way I could get rid of storing this in session and of the app being 
unacessible when I changed my model (wich was happening heavly by the 
way...). Note that at the time I deployed this code, the User object hasn't 
changed.

After running this for a while (you can expire sessions or delete them in 
bulk from the datastore so you can force them to expire, I deployed the new 
version.

To store json data, you may use some json library that can map/convert 
to/from Java - Json, like Google Gson:

String userJson = new Gson().toJson(user);
req.getSession().setAttribute(user, userJson);
(...)

String userJson = (String) req.getSession().getAttribute(user);
if (userJson != null) {
   User user = new Gson().fromJson(User.class, userJson);
}

This way you can add/remove fields to you model, and old session data will 
be restored as expected. Note that is a good practice to set defaults for 
the new fields, so your session data won't create unusable objects. In your 
original post, the change from string to integer may be solved by 
overriding the Gson de-serializer to handle the id field as number and not 
as string. I guess that you can change the way Java will de-serialize your 
classes too, but I'm not sure if this will solve your particular issue 
mentioned.

Not sure if this is the best way to handle, but this is how I solved on our 
live app.

More on Gson: http://code.google.com/p/google-gson/.

Hope this helps (sorry for some typos or misspelled words)

Best Regards,

-Ronoaldo

-- 
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/-/kReedxuxpgEJ.
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] 1.6.0 Prerelease SDKs are out

2011-11-01 Thread Alfred Fuller
The order of the filters does not have an effect on the performance (the
zigzag algorithm we use does not give preference to any index scans it is
performing).

On Tue, Nov 1, 2011 at 2:45 AM, Matthew Jaggard matt...@jaggard.org.ukwrote:

 Regarding the index selection shown here:
 http://code.google.com/appengine/articles/indexselection.html

 is it possible / required to put the query in the right order to get
 the best performance?

 For example, if I have a lot of black and white photos and just a
 handful of panoramic ones, does the first query below behave
 differently compared to the second?
 SELECT * FROM Photo WHERE colouration=black  white AND
 aspect=panoramic ORDER BY date_added DESC;
 SELECT * FROM Photo WHERE aspect=panoramic AND colouration=black 
 white ORDER BY date_added DESC;

 On 1 November 2011 01:13, Marzia Niccolai ma...@google.com wrote:
  Hi,
  We've just uploaded the 1.6.0 Prerelease SDKs:
  http://code.google.com/p/googleappengine/downloads/list
  Please note that new features are not available in production until the
  final release, and documentation for these features will be available at
  this time as well. Let us know if there are any issues found.
  Below are the release notes for this release.
  Thanks,
  Marzia
 
  App Engine Python SDK - Release Notes
 
  Version 1.6.0
  ===
  - On November 7th, App Engine will be out of Preview. The new Terms of
  Service
and previously announced pricing changes will be in effect.
 Additionally,
  all
paid apps are now covered by our SLA.
  http://www.google.com/enterprise/cloud/appengine/pricing.html
  - Paid apps can now specify the maximum pending latency for instances and
  the
minimum number of idle instances for your application in the Admin
  Console.
  - We have released an experimental utility, available in the Admin
 Console,
  to
assist in migrating your application to the High Replication datastore.
  This
utility allows you to copy the bulk of your data in the background,
 while
  the
source application is still serving. You then need a brief read-only
  period to
migrate your application data while you copy the data that has changed
  from
the time the original copy started.
  - Blobstore, which was previously limited to apps with billing enabled,
 is
  now
available for all apps.
  - We have published a new article on Datastore Index Selection and
 Advanced
Search which explains our recent improvements to the query planner that
  make
exploding indexes unnecessary.
  http://code.google.com/appengine/articles/indexselection.html
  - Applications can now receive xmpp error stanzas at /_ah/xmpp/error.
  - In the Admin Console data viewer, you can now filter by namespace from
 a
  drop
down menu, if applicable.
  - In the Admin Console's Datastore Statistics, we now offer namespace
  suggest
for filtering stats.
  - We have released as experimental the full MapReduce framework.
  - The mail_stub.get_sent_messages() call now returns EmailMessage
 instances.
  - Fixed an issue when setting an initial_value in memcache.incr
 unexpectedly
returned a string.
  http://code.google.com/p/googleappengine/issues/detail?id=2012
  - Fixed an issue where DoS stats in the Admin Console didn't work for
 High
Replication apps.
  http://code.google.com/p/googleappengine/issues/detail?id=5237
 
  App Engine Java SDK - Release Notes
 
  Version 1.6.0
  =
  - On November 7th, App Engine will be out of Preview. The new Terms of
  Service
and previously announced pricing changes will be in effect.
 Additionally,
  all
paid apps are now covered by our SLA.
  http://www.google.com/enterprise/cloud/appengine/pricing.html
  - Paid apps can now specify the maximum pending latency for instances and
  the
minimum number of idle instances for your application in the Admin
  Console.
  - We have released an experimental utility, available in the Admin
 Console,
  to
assist in migrating your application to the High Replication datastore.
  This
utility allows you to copy the bulk of your data in the background,
 while
  the
source application is still serving. You then need a brief read-only
  period to
migrate your application data while you copy the data that has changed
  from
the time the original copy started.
  - Blobstore, which was previously limited to apps with billing enabled,
 is
  now
available for all apps.
  - We have published a new article on Datastore Index Selection and
 Advanced
Search which explains our recent improvements to the query planner that
  make
exploding indexes unnecessary.
  http://code.google.com/appengine/articles/indexselection.html
  - Applications can now receive xmpp error stanzas at /_ah/xmpp/error.
  - In the Admin Console data viewer, you can now filter by namespace from
 a
  drop
down menu, if applicable.
  - In the Admin Console's Datastore 

[appengine-java] Re: No bytes available in doPost

2011-11-01 Thread Rune Nielsen
Hi Dick,

Your suggestions did the trick - thanks ever so much!

Sincerely,
Rune Nielsen

On Oct 27, 9:39 am, Dick Larsson dicklars...@gmail.com wrote:
 In method uploadAvatarImage you call for the inputStream before you
 have sent your bytes to the server.
 Please try this instead
 os.flush();
 os.close();
 InputStream is = servletConnection.getInputStream();

 Next thing, in your servlet.
 You should use InputStream instead of Reader since you are dealing
 with bytes

 InputStream reader = request.getInputStream();
 byte[] imageBytes =
 org.apache.commons.io.IOUtils.toByteArray(reader);

 Hope it helps
 Best regards
 /Dick Larsson

 On 24 Okt, 16:17, Rune Nielsen runeniel...@gmail.com wrote:







  Hi,

  I'm trying to upload an image to store in the Blobstore, but I'm having
  trouble streaming it to my servlet as a byte array.

  Here's the code for the client method streaming the byte array to the
  servlet - it's using the Commons IO:

  public void uploadAvatarImage(byte[] imageBytes) {
          try {
              URL myURL = new
  URL(http://myapp.appspot.com/SetAvatar?globalId=1;);
              URLConnection servletConnection = myURL.openConnection();

              servletConnection.setRequestProperty(Content-Type,
  application/octet-stream);

              servletConnection.setDoOutput(true);
              servletConnection.setDoInput(true);

              OutputStream os = servletConnection.getOutputStream();
              InputStream is = servletConnection.getInputStream();

              IOUtils.write(imageBytes, os);

              os.flush();
              os.close();

              BufferedReader in = new BufferedReader(new
  InputStreamReader(is));
              String inputLine;

              while ((inputLine = in.readLine()) != null) {
                  System.out.println(inputLine);
              }

              in.close();
          }
          catch (Exception e) {
              System.out.println(e);
          }
      }

  Here's the code for the doPost method of my servlet:

      @Override
      public void doPost(HttpServletRequest request, HttpServletResponse
  response) throws IOException, ServletException {
          BufferedReader reader = request.getReader();
          byte[] imageBytes = IOUtils.toByteArray(reader);

          PrintWriter outputWriter = response.getWriter();

          int len = ;
          outputWriter.println(Content type is:  + request.getContentType()
  +  - length is:  + request.getContentLength());
          outputWriter.println(Bytes:  + imageBytes.length);

          outputWriter.close();
      }

  The output from the servlet is:

  Content type is: application/octet-stream - length is 0
  Bytes: 0

  Everything looks good on the client side and the size of the byte array on
  the client size is about 300kb. But for some reason there's no available
  bytes on the server side. Any ideas why? I've tried just about everything,
  but to no avail.

  Thanks in advance for any hints!

  Sincerely,
  Rune Nielsen

-- 
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] DataNucleus App Engine Plugin v2.0.0-RC1 available for testing

2011-11-01 Thread Max Ross (Google)
JPA 2, JDO 3, unowned relationships, and tons of bug fixes.

https://plus.google.com/102837845875216819095/posts/9U9VFWqhPx7

-- 
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/-/zwhh5eEfXx8J.
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: Strange behavior with OpenID

2011-11-01 Thread Miguel
Yes thank you again Jose,
probably there was a misunderstanding in my last post: I was thinking
about the session in my web-app (Google App Engine) and not in OpenID
providers!

Thanks
Michele

On Oct 31, 11:47 am, Jose Montes de Oca jfmontesde...@google.com
wrote:
 Hi Miguel,

 I do not think you will be able to implement a solution relying on session
 from OpenID Providers. OpenId is just an authentication mechanism, You only
 Handle your own users sessions within you application and App Engine makes
 it easy to with the users API.

 If you would like a session mechanism that would log out and will also
 logout of the from the Identity provider, you can use App Engine users API
 but for just Google Accounts (Not choosing Federation Login),
 IIRC when using the users API for only Google Accounts it would also sign
 out the users from their google accounts.

 Hope this Helps!

 Jose Montes de Oca

-- 
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] Is it suggested to use DatastoreMutationPool

2011-11-01 Thread Miguel
.. in normal writes to datastore? Or it is suggested only in using
with mapreduce?
http://code.google.com/p/appengine-mapreduce/source/browse/trunk/java/src/com/google/appengine/tools/mapreduce/DatastoreMutationPool.java

I was thinking about a persistence layer who writes on memcache and
append request to DatastoreMutationPool..

Thank you,
Michele

-- 
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.