[appengine-java] Re: Slim3 1.0.0 Released

2010-03-26 Thread pman
thanks for the help.

that solve the question - return {parents} based on a {child}
property.

but, i found new problem now with --

(1) return {parents} based on a {child} property and a {parent}
property?

(2) sort the {parents}?

(3) paging the result?


Any idea?



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



Re: [appengine-java] Re: GAEJ Access to Google Calendar, How to Authenticate ?

2010-03-26 Thread John Patterson
One of the additions to the updated road map is OpenId+OAuth.  If it's  
urgent perhaps you could use the dyuproject which supports that now on  
GAE as well as Googles hybrid of the two.


On 26 Mar 2010, at 13:53, seleronm wrote:


Hi,

Though I am not an expert.
If you use not UserService but
[com.google.gdata.client.http.AuthSubUtil] the problem might be
solved.

I think that this link is useful.
http://code.google.com/intl/us/apis/gdata/docs/auth/authsub.html

Please try.
thanks.



Hi GAEJ Experts,

I like to access (Read/Write) a GoogleCalendarfrom the Google App
Engine.
To learn how it works I have Up my Java Google App Application and on
my PC a smallCalendartest program.
Now I need the missing link how to combine both application's.
In my GAEJ servlet I get the current user with :

   UserService userService = UserServiceFactory.getUserService();
   User   user= userService.getCurrentUser();
(after successfully login )

And have access to the user Nickname, email address ...

To access thecalendarI need the user and password.
CalendarService myService = new CalendarService( exampleCo-
exampleApp-1);
   myService.setUserCredentials( myAccount, myPassword );

I understand that I have no access to the User Password. For this
reason I think there must be a other way around to access the  
usercalendar's.
I  can't believe there is no other way to access the  
CalendarService ?

Any Idea ?
Magic Cookies ?

Regards

 Stephan


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



[appengine-java] Re: Objectify-Appengine 2.1 released, supports Partial Indexes

2010-03-26 Thread ZeroCool
This function is really cool. Many thanks for saving my money and
time.
With GAE and Objectify's help, I will hopefully release my Android/GAE
MMO game on Apr,1

On Mar 26, 5:14 am, Duong BaTien duong.bat...@gmail.com wrote:
 Hi:

 Congratulation and thank for tremendous efforts from the Objectify Team.

 By the way, has any one attempted Objectify with possible very large
 index of subscribers and publishers of web-hook pub-sub (Google
 PubSubHubbub of Atom or short message twitter style).

 Thanks
 Duong BaTien
 DBGROUPS and BudhNet

 On Thu, 2010-03-25 at 13:45 -0700, Jeff Schnitzer wrote:
  Today we released Objectify v2.1, the latest version of our opensource
  replacement for JDO/JPA on the Google App Engine datastore.

  This version includes a major new feature, Partial Indexes.  If you
  aren't sure what partial indexes are, the Wikipedia page
  (http://en.wikipedia.org/wiki/Partial_index) describes them so:

  A partial index, also known as filtered index is a database index
  which has some condition applied to it such that it only includes a
  portion of the rows in the table.  This can allow the index to remain
  small even though the table may be rather large, and have fairly
  extreme selectivity.

  Here is an example of an Objectify entity using partial indexes:

  public class Player {
      @Id Long id;

      // Simple conditions:  IfFalse, IfTrue, IfZero, IfNull, etc
      @Unindexed(IfFalse.class) boolean admin;

      // Smarter - sensitive to the actual default value
      @Unindexed(IfDefault.class) Team team = Team.NOTCHOSEN;

      // You can make your own conditions
      @Unindexed(IfCustomCondition.class) Status status;

      static class IfCustomCondition extends ValueIfStatus {
          public boolean matches(Status value) {
              return (value == Status.DEAD || value == Status.RETIRED);
          }
      }
  }

  Why should you care about optimizing indexes?

  All queries in the datastore require indexes, which are a sort of
  reverse-mapping from value to key.  These indexes occupy space and
  consume cpu resources whenever an entity is written to the datastore.
  With the addition of just a few indexes, this cost quickly doubles or
  triples the cost of storing the original entity:

   * A basic entity with no indexes costs 48 api_cpu_ms to store.
   * Each single-property indexed field adds an additional 17 api_cpu_ms.

  This number appears stable and consistent; appengine seems to have a
  static formula for computing datastore costs.  Storage size costs are
  harder to measure, but from watching mailing list traffic it seems
  quite easy to double or triple your storage size with unnecessary
  indexes.

  When should you care about optimizing indexes?

   * Removing unnecessary indexes will not make writes faster, it will
  make them /cheaper/.  All indexes are written in parallel, so indexes
  do not add latency to writes.  Instead, indexes add $ to the bill you
  get at the end of the week - and push you closer to your quota limits.

   * If your application has relatively small quantities of relatively
  static data, index optimization is probably pointless.  On the other
  hand, if you have large data volumes or heavy write loads, you must
  carefully choose your indexes (or be very rich).

  Do I need partial indexes, as opposed to just declaring whole fields
  indexed or not?

  It depends on your dataset and your queries.  In the Player example
  above, partial indexes can be extremely effective:

   * You only ever filter on the admin field for actual admins, and most
  players are not admins.
   * You only ever filter on the team field for players who have chosen
  a team, and the bulk of players are not associated with a team.
   * You only ever filter on the status field for players who have
  active statuses, and you have a large number of inactive players.

  Objectify's support for partial indexes also has the ability to
  determine index behavior based on the whole entity.  This allows you
  to perform certain kinds of limited multiple-property queries
  (including double inequality queries) without creating a
  multi-property index.  As an example, it is very easy to model this
  index from the Wikipedia page:

      create index partial_salary on employee(age) where salary  2100;

  An example of this is documented in the Objectify manual.

  Thanks,
  The Objectify Team
  Jeff, Scott, and Matt

  --
  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 
  athttp://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 

[appengine-java] Re: GAEJ Access to Google Calendar, How to Authenticate ?

2010-03-26 Thread andrii.zadorozhnii
Use google data API to access anything you want :)

On 25 Бер, 11:33, ska s...@kauss.org wrote:
 Hi GAEJ Experts,

 I  can't believe there is no other way to access the CalendarService ?
 Any Idea ?
 Magic Cookies ?

 Regards

  Stephan

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



[appengine-java] AuthSub InvalidToken problem

2010-03-26 Thread nicanor.babula
Hi all,

I am facing a strange problem in with my app in GAE and I can't seem
to figure it up by myself, so I hope you'll help me.. Here we are:

I do :

[code]
String authSubUrl = AuthSubUtil.getRequestUrl(nextUrl, http://
www.google.com/calendar/feeds/default/private/full, false, true);
response.sendRedirect(authSubUrl);
[/code]

in my servlet in order to get an auth sub token. And the servlet at
nextUrl does:
[code]
String oneTimeUseToken =
AuthSubUtil.getTokenFromReply(request.getQueryString());
if(oneTimeUseToken != null){
  String sessionToken =
AuthSubUtil.exchangeForSessionToken(oneTimeUseToken, null);
  // persist the session token
}
// redirect to the page using google services
[/code]
in order to retrieve and persist the session token along with other
user information.

The problem is that when later I do:
[code]
URL feedUrl = new URL(http://www.google.com/calendar/feeds/default/
private/full);
CalendarQuery myQuery = new CalendarQuery(feedUrl);
CalendarService calendarService = new CalendarService(some-app-
name);
calendarService.setAuthSubToken(currentUser.authSubToken, null);
CalendarEventFeed resultFeed = calendarService.query(myQuery,
CalendarEventFeed.class);
[/code]

It says that the token is invalid, and raises this exception:
[code]
cri.domodentweb.server.rpc.CalendarEventsServiceImpl getEventsDev:
null
com.google.gdata.util.AuthenticationException: OK
HTML
HEAD
TITLEToken invalid - Invalid AuthSub token./TITLE
/HEAD
BODY BGCOLOR=#FF TEXT=#00
H1Token invalid - Invalid AuthSub token./H1
H2Error 401/H2
/BODY
/HTML

at
com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:
596)
at
com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:
563)
at
com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:
550)
at
com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:
530)
at
com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:
535)
at com.google.gdata.client.Service.getFeed(Service.java:1102)
at com.google.gdata.client.Service.getFeed(Service.java:1044)
at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:
662)
at com.google.gdata.client.Service.query(Service.java:1204)
at com.google.gdata.client.Service.query(Service.java:1145)
at
cri.domodentweb.server.rpc.CalendarEventsServiceImpl.getEventsDev(CalendarEventsServiceImpl.java:
133)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_
$1.run(Method_.java:165)
at java.security.AccessController.doPrivileged(Native Method)
at
com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.privilegedInvoke(Method_.java:
163)
at
com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.invoke_(Method_.java:
124)
at
com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.invoke(Method_.java:
43)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
562)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
188)
at
cri.domodentweb.server.rpc.BaseServiceImpl.processCall(BaseServiceImpl.java:
12)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
224)
at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
511)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
at
com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:
97)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:
35)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
43)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
388)
at

[appengine-java] CPU Quota Exceeded on Startup

2010-03-26 Thread Hanshew
I have uploaded a Ruby on Rails app that is very difficult to get
going because of the CPU quota.  I can sometimes get access by hitting
refresh multiple times.  After it gets going I can use it, but if I
wait too long I begin to get the Internal Server Error message
again.  This is a very simple Rails app.  This feature of appengine
will make it incompatible with Rails apps if it persists.

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



Re: [appengine-java] App Engine SDK 1.3.2 is out!

2010-03-26 Thread Ikai L (Google)
Here are the Java release notes. I mistakenly posted the Python notes:

App Engine Java SDK - Release Notes
Version 1.3.2 - March 25, 2010

   - New API to read the contents of uploaded Blobs (fetch_data)
  - http://code.google.com/p/googleappengine/issues/detail?id=2536
   - URLFetch now supports accessing ports 80-90, 440-450, and 1024-65535
   - Mail API now allows common document formats as attachments
  - http://code.google.com/p/googleappengine/issues/detail?id=494
   - The Task Queue API now supports adding multiple tasks in a single call
   to Queue.add()
   - Fixed charset handling for inbound emails
  - http://code.google.com/p/googleappengine/issues/detail?id=2326
   - Fixed issue with compositing background colors in dev_appserver
   - New feature in the datastore to specify whether to use strong or
   eventually consistent reads (the default is strong)
   - New datastore feature allows setting deadlines for operations
   - Increased the maximum Task Queue refill rate from 20/s to 50/s
   - Support for IP blacklisting to prevent denial of service (DoS) attacks
   - App Stats is now available for the Java SDK in addition to Python
   - Fix issue with expiration times not being reset on Put on the Memchache
   API
  - http://code.google.com/p/googleappengine/issues/detail?id=1284
   - Fix issue preventing static files from being served when a servlet is
   mapped to root
  - http://code.google.com/p/googleappengine/issues/detail?id=1379

JDO/JPA Changes

   - Support default rpc deadlines and query-specific deadlines
   - Support default read consistency config and query-specific read
   consistency config

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