[appengine-java] How to assing an enitity to two different enitites ?

2010-07-13 Thread cscsaba
Hello,

I would like to build an web application where the entity relationship looks
like as follow:

User 1 - * Possibility * - 1 Country
   1 - 1 Profile * - 1 Country

 *initialization and persistence*

User.getPossibilities().add(Possibility);Possibility.setCountry(Country);
User.setProfile(Profile);Profile.setCountry(Country);

em.persist(User);

 *I got this error below*
WARNING: Exception:Detected attempt to establish CPossibility(no-id-yet) as
the
parent of CUser(46)/CProfile(47)/CCountry(48) but the entity identified by
CUser
(46)/CProfile(47)/CCountry(48) is already a child of
CUser(46)/CProfile(47).  A
parent cannot be established or changed once an object has been persisted.

Does this concept goes against the GAE datastore hierarchy  ?

There are many situation when we have to share the same locations among the
individual object.

What is the real solution on this issue ?
Thanks in advance.

cscsaba

*PS:Implementation of the entities*
... CUser
@Entity
public class CUser {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name=USER_ID)
private Key Id;
private String email;

@OneToMany(cascade = CascadeType.ALL)
private ListCPossibility Possibilities = new
ArrayListCPossibility();

@OneToOne(fetch = FetchType.LAZY,cascade = CascadeType.ALL)
private CProfile Profile;
... CPossibility
@Entity
public class CPossibility {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name=POSSIBILITY_ID)
private Key id;
private String name;

@ManyToOne(fetch = FetchType.LAZY,cascade = CascadeType.ALL)
private CCountry country;
... CProfile
@Entity
public class CProfile {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Key id;
private String phone;

@ManyToOne(fetch = FetchType.LAZY,cascade = CascadeType.ALL)
private CCountry country;

... CCountry
@Entity
public class CCountry {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Key id;
private String name;

-- 
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: Sending mail in transaction

2010-07-13 Thread dflorey
The request headers will not help.
You'll run into problems whenever you are doing an api call that
return with an unknown state and the method you are calling is not
idempotent (like sending mail, creating a contact etc.)
So in case of email you can add your app as bcc and use a mail-in
handler to check whether the mail has been sent successfully or not.
This is an ugly workaround but there is nothing else that comes to my
mind.

On 12 Jul., 22:54, Marcus Brody mhrab...@gmail.com wrote:
 dflorey and Pieter,

 thank you for the links,
 I will look into it asap.

 On Jul 12, 10:35 pm, Pieter Coucke pieter.cou...@onthoo.com wrote:



  You can check request headers to see if this is a first invocation of a task
  (http://code.google.com/appengine/docs/java/taskqueue/overview.html#Ta...),
  so you can detect a second invocation of a task.

  Maybe if you combine this with specific catch blocks for mail exceptions?

  On Mon, Jul 12, 2010 at 10:07 PM, Marcus Brody mhrab...@gmail.com wrote:
   Pieter,

   although this looks easy its not that easy, I am aware that I can
   queue a mail sending task,
   problem is that task has to be idempotent to achiev desired behaviour,

   a queue task can be executed for example twice, since those are
   specifications
   and this would result in sending mail twice,
   a naive aproach would be to update some db lock to prevent sending
   mail more than 1 time,
   but it is not easy, this is much more complicated,
   in other words operation is either atomic or it isnt, and without very
   precise mechanism you
   cannot prove that task will be runned only one.

   My own tests proved that due to email quota being reached (task fail
   and has be resheduled) some of the mails
   has been send twice.

   If Mail API would allowed to send mail only in case of some db
   transaction success it would be very easy to garant
   that mail will be send exactly 1 time. (although if it fails for some
   other reasons like recipient not found or so thats whole another
   story :)

   Basically this can be solved by
   1) adding new API for sending mail (dont know if it so easy or whole
   problem isnt much much bigger than i think  - distributed
   transactions ?)
   2) implementing locking mechanism

   On Jul 12, 9:13 pm, Pieter Coucke pieter.cou...@onthoo.com wrote:
Create a task for sending e-mail instead of calling the mailservice
directly.

use this in your task (a task can be part of a transaction)

try{
...

} catch (Throwable thr) {
 log.error(...);
}

and all exceptions will be catched.  I think a task will be re-executed
   only
if it fails (throws an exception).

On Sat, Jul 10, 2010 at 6:43 PM, Marcus Brody mhrab...@gmail.com
   wrote:
 Hello,

 I would like to ask, if there is some way how to send mail only in
 case that some db transaction will be successful.
 I am not very experienced with gae, but I did study it now for about 2
 weeks.

 Desired output:

          1) prepare email
          2) db transaction.begin()
          3) do some db operation
          4) bind sending mail with current transaction (similar to
 how can you can attach Task to queue)
          5) db transaction.commit()

 I am aware that I can queue mail sending task to task queue, but i
 cannot find the way how to do that mail sending task Idempotent
 without (i think) complicated locking mechanism .
 Most simple solution would be to put mail sending task to task queue,
 but this means mail could be send twice in some rare situation. (this
 is maybe not that bad but if there is some way how to avoid it, I
 would like to know)

 Thank you,

 Marcus

 --
 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.comgoogle-appengine-java%2B
  unsubscr...@googlegroups.com
   google-appengine-java%2bunsubscr...@googlegroups.comgoogle-appengine-java
%252bunsubscr...@googlegroups.com

 .
 For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.

--
Pieter Coucke
Onthoo BVBAhttp://www.onthoo.comhttp://www.koopjeszoeker.be

   --
   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.comgoogle-appengine-java%2B
unsubscr...@googlegroups.com
   .
   For more options, visit this group at
  http://groups.google.com/group/google-appengine-java?hl=en.

  --
  Pieter Coucke
  Onthoo 

[appengine-java] Re: Cannot see 'New Web Application' in New menu

2010-07-13 Thread John
Thanks, 3.6 as root was the problem.

John

On Jul 7, 7:56 pm, Jason Parekh jasonpar...@gmail.com wrote:
 Hi John,

 Do you see any of the other Google Plugin for Eclipse features, like a few
 toolbar buttons?

 Did you happen to install Eclipse 3.6 as root and the plugin as your user?
  There's a known Eclipse issue where in some cases, that situation can lead
 installed plugins not appearing, similar to your symptoms.  If this is the
 case, try installing Eclipse as your user and also run it with the same
 user.

 jason



 On Wed, Jul 7, 2010 at 11:19 AM, John johnsing...@gmail.com wrote:
  I've installed the google plugin into a clean install of Eclipse 3.6
  on ubuntu. The install finished without reporting any errors, and
  eclipse restarted successfully, but the File - New option doesn't
  have the Web Application Project choice in it.

  Can someone tell me what I've done wrong?

  John

  --
  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.comgoogle-appengine-java%2B 
  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] How long is my application state hold on the app engine?

2010-07-13 Thread ingo
hello everyone,

i want to collect some performance figures of my app on the server
side. but i do not want to persist them in the database, i only want
to collect them by changing the state of some class (i.e. changing
class members like number of requests, number of method calls, etc). i
want to read these values on the client side and display them in an
administration panel (or a profiler-like ui).

but currently i think the application state is at least lost after
each new deployment. is this the only time the state is resetted? does
a jvm holding my application state run all the time between each
deployment?

i have the same question regarding static members. i use singletons or
static variables on server side to make sure they are constructed only
once whenever their construction is expensive. so i want to make sure
that the jvm holding the instances is running for a very long time to
avoid reconstruction of them. however, it feels like the jvm is
restarted relatively often (due to very low load on my app maybe) and
thus the singletons are recreated during the jvm startup.

kind regards,
ingo

-- 
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: problem with storing data in datastore

2010-07-13 Thread Vishakha
Hi I am akriti's team member.

This is part of my servlet code.

public void doPost(HttpServletRequest request, HttpServletResponse
response)  throws ServletException, IOException {
{
ServletFileUpload upload = new ServletFileUpload();


try{
FileItemIterator iter = upload.getItemIterator(request);

while (iter.hasNext()) {
FileItemStream item = iter.next();
String name = item.getFieldName();
InputStream stream = item.openStream();
   // try{
 Kml kml = Kml.unmarshal(stream);

//if (kml == null)
{
Feature feature = kml.getFeature();
processFeature(null, feature);
}

On Jul 13, 12:31 pm, Pieter Coucke pieter.cou...@onthoo.com wrote:
 Could it be that the file upload tries to store the file in a temporary
 directory somewhere?

 --
 Pieter Coucke
 Onthoo BVBAhttp://www.onthoo.comhttp://www.koopjeszoeker.be

-- 
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: problem with storing data in datastore

2010-07-13 Thread Vishakha
Hi I am akriti's team member.

This is part of my servlet code.

public void doPost(HttpServletRequest request, HttpServletResponse
response)  throws ServletException, IOException {
{
ServletFileUpload upload = new ServletFileUpload();

try{
FileItemIterator iter = upload.getItemIterator(request);

while (iter.hasNext()) {
FileItemStream item = iter.next();
String name = item.getFieldName();
InputStream stream = item.openStream();
   // try{
 Kml kml = Kml.unmarshal(stream);

//if (kml == null)
{
Feature feature = kml.getFeature();
processFeature(null, feature);
}

On Jul 13, 12:31 pm, Pieter Coucke pieter.cou...@onthoo.com wrote:
 Could it be that the file upload tries to store the file in a temporary
 directory somewhere?

 --
 Pieter Coucke
 Onthoo BVBAhttp://www.onthoo.comhttp://www.koopjeszoeker.be

-- 
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: Sending mail in transaction

2010-07-13 Thread Marcus Brody
I was thinking about storing some unique string which is derived from
email content and recipient (i have some unique stuff sending in each
mail)
and store in memcache/db, I know its not bullet proof but at least in
case
some possible 2x sending mail would be filtered.

Concept :

Check flag if set we know we did send
Send mail, if successful, set some flag in memcache/db

I am aware ITS NOT BULLET PROOF, but maybe can filter some cases, when
same task
is triggered after that interval neccessary to change/store flag.
What you think ?


On Jul 13, 5:15 pm, dflorey daniel.flo...@gmail.com wrote:
 The request headers will not help.
 You'll run into problems whenever you are doing an api call that
 return with an unknown state and the method you are calling is not
 idempotent (like sending mail, creating a contact etc.)
 So in case of email you can add your app as bcc and use a mail-in
 handler to check whether the mail has been sent successfully or not.
 This is an ugly workaround but there is nothing else that comes to my
 mind.

 On 12 Jul., 22:54, Marcus Brody mhrab...@gmail.com wrote:

  dflorey and Pieter,

  thank you for the links,
  I will look into it asap.

  On Jul 12, 10:35 pm, Pieter Coucke pieter.cou...@onthoo.com wrote:

   You can check request headers to see if this is a first invocation of a 
   task
   (http://code.google.com/appengine/docs/java/taskqueue/overview.html#Ta...),
   so you can detect a second invocation of a task.

   Maybe if you combine this with specific catch blocks for mail exceptions?

   On Mon, Jul 12, 2010 at 10:07 PM, Marcus Brody mhrab...@gmail.com wrote:
Pieter,

although this looks easy its not that easy, I am aware that I can
queue a mail sending task,
problem is that task has to be idempotent to achiev desired behaviour,

a queue task can be executed for example twice, since those are
specifications
and this would result in sending mail twice,
a naive aproach would be to update some db lock to prevent sending
mail more than 1 time,
but it is not easy, this is much more complicated,
in other words operation is either atomic or it isnt, and without very
precise mechanism you
cannot prove that task will be runned only one.

My own tests proved that due to email quota being reached (task fail
and has be resheduled) some of the mails
has been send twice.

If Mail API would allowed to send mail only in case of some db
transaction success it would be very easy to garant
that mail will be send exactly 1 time. (although if it fails for some
other reasons like recipient not found or so thats whole another
story :)

Basically this can be solved by
1) adding new API for sending mail (dont know if it so easy or whole
problem isnt much much bigger than i think  - distributed
transactions ?)
2) implementing locking mechanism

On Jul 12, 9:13 pm, Pieter Coucke pieter.cou...@onthoo.com wrote:
 Create a task for sending e-mail instead of calling the mailservice
 directly.

 use this in your task (a task can be part of a transaction)

 try{
 ...

 } catch (Throwable thr) {
  log.error(...);
 }

 and all exceptions will be catched.  I think a task will be 
 re-executed
only
 if it fails (throws an exception).

 On Sat, Jul 10, 2010 at 6:43 PM, Marcus Brody mhrab...@gmail.com
wrote:
  Hello,

  I would like to ask, if there is some way how to send mail only in
  case that some db transaction will be successful.
  I am not very experienced with gae, but I did study it now for 
  about 2
  weeks.

  Desired output:

           1) prepare email
           2) db transaction.begin()
           3) do some db operation
           4) bind sending mail with current transaction (similar to
  how can you can attach Task to queue)
           5) db transaction.commit()

  I am aware that I can queue mail sending task to task queue, but i
  cannot find the way how to do that mail sending task Idempotent
  without (i think) complicated locking mechanism .
  Most simple solution would be to put mail sending task to task 
  queue,
  but this means mail could be send twice in some rare situation. 
  (this
  is maybe not that bad but if there is some way how to avoid it, I
  would like to know)

  Thank you,

  Marcus

  --
  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.comgoogle-appengine-java%2B
   unsubscr...@googlegroups.com
google-appengine-java%2bunsubscr...@googlegroups.comgoogle-appengine-java
 %252bunsubscr...@googlegroups.com

  .
  For more 

[appengine-java] Re: problem with storing data in datastore

2010-07-13 Thread Shyam Visamsetty
So, if you are directly accessing the stream, it is still in memory
and not stored anywhere. I think you should try logging the stream you
receive. I think it is hitting a null ptr exception for some reason.
did you use printstacktrace in your catch block?

Thanks,
Shyam.

On Jul 13, 1:47 am, Vishakha vish0...@gmail.com wrote:
 Hi I am akriti's team member.

 This is part of my servlet code.

 public void doPost(HttpServletRequest request, HttpServletResponse
 response)  throws ServletException, IOException {
                 {
         ServletFileUpload upload = new ServletFileUpload();

         try{
             FileItemIterator iter = upload.getItemIterator(request);

             while (iter.hasNext()) {
                 FileItemStream item = iter.next();
                 String name = item.getFieldName();
                 InputStream stream = item.openStream();
                // try{
                  Kml kml = Kml.unmarshal(stream);

                 //if (kml == null)
                         {
                                 Feature feature = kml.getFeature();
                                 processFeature(null, feature);
                         }

 On Jul 13, 12:31 pm, Pieter Coucke pieter.cou...@onthoo.com wrote:



  Could it be that the file upload tries to store the file in a temporary
  directory somewhere?

  --
  Pieter Coucke
  Onthoo BVBAhttp://www.onthoo.comhttp://www.koopjeszoeker.be- Hide quoted 
  text -

 - Show quoted text -

-- 
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: same application same datastore different subdomain

2010-07-13 Thread Shyam Visamsetty
You definitely cannot share the data store between two applications as
of now.

But, you can definitely create another application a2 which contains a
webservice which can call a service from  an application a1.

-Shyam.

On Jul 13, 5:22 am, IvanRdz ivan.rd...@gmail.com wrote:
 Hello world!

 I want to know if is possible to use the same datastore across
 multiple (or different) subdomains/applications. I have googleapps
 account and I have already configure it with www domain for the main
 app.

 What I want to do is:

 www.myapp.com-- user interface application, gwt developed and RPC for
 server calls
 api.myapp.com   -- Restful webservices (wich have to communicate
 acrosswww.myapp.combussines logic)

 It is possible?

-- 
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] Disappearing functionality after upgrading App Engine/GWT plugins

2010-07-13 Thread Rajeev Dayal
Hi,

Did you install Eclipse as root? Did you perform the upgrade as non-root?
There is an issue in Eclipse with installing it as root, and then updating
plugins as non-root.

I'd recommend that if you install Eclipse as root, switch to root when
updating your plugins.

It might be easiest to start out with a clean Eclipse install and a clean
workspace.


Rajeev

On Mon, Jul 12, 2010 at 1:38 AM, ThisSideUp 
webmas...@thissideupsoftware.com wrote:

 Hello,

 I am running on Ubuntu 8.04 LTS, using Eclipse Galileo. I am new to
 the App Engine, GWT, and Eclipse.

 Back in April I installed the App Engine and GWT plugins and started
 experimenting with a web app project that uses the App Engine  GWT.

 Today I was prompted to upgrade the plugins:
 - App Engine SDK bundle from 1.3.2 to 1.3.5
 - GWT SDK bundle from 2.0.3 to 2.0.4

 After doing so, all of the App Engine and GWT buttons and menu options
 disappeared from Eclipse, and I can no longer run the web app nor can
 I create new web app projects.

 I attempted to resolve the problem by removing the 1.3.2 and 2.0.3
 versions of the plugins, but now my web app does not compile.

 I am familiar with using Maven to update dependencies, but I do not
 have Maven installed right now. How do I go about getting my web app
 to use the new versions of the libraries, and how do I fix my Eclipse
 configuration?

 Thanks in advance.

 --
 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.comgoogle-appengine-java%2bunsubscr...@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: Java Server Faces 2.0 does not works in GAE (for me)

2010-07-13 Thread Daniel
It looks fine to me... all ur settings and configs aresame as at my
web app i also took them from that web site

If i were u i would delete the project and build it from scratch.. its
probably some silly mistake... its not that u in the middle of the
project..
u just started it


should work


good luck

On Jul 13, 3:02 am, SammyBar sammy...@gmail.com wrote:
 Hi all,

 I'm trying to config my first Java Server Faces project with GAE. I
 have already configured my Eclipse following instructions published 
 athttps://sites.google.com/a/wildstartech.com/adventures-in-java/Java-P...,
 and also included the fix on the jsf-impl-gae.jar. I'm able to run my
 project in Eclipse without errors. The console displays INFO: The
 server is running athttp://localhost:/;. It looks everything is
 OK.
 But when I direct the browser to the above mentioned URL, I get a HTTP
 404 error /welcome.jsf not found
 I'm able to put a breakpoint in the index.jsp page at %
 response.sendRedirect(welcome.jsf); % It confirms me the app is
 working because the breakpoint is reached, but it looks like the
 server is unable to understand the welcome.xhtml file should be
 processed as welcome.jsf. Similarly by pointing the browser 
 tohttp://localhost:/welcome.xhtmlalso returns a 404 error. What is
 wrong with my configuration?

 Any hint is welcomed.
 Thanks in advance
 Sammy

 Follows the appengine-web.xml and web.xml files from my war/WEB-INF
 folder which are copies of the reccommended files published in the
 above mentioned site:

 --- appengine-web.xml
 
 ?xml version=1.0 encoding=utf-8?
 appengine-web-app xmlns=http://appengine.google.com/ns/1.0;
         applicationTestJSF/application
         version1/version
         sessions-enabledtrue/sessions-enabled

         !-- Configure java.util.logging --
         system-properties
                 property name=java.util.logging.config.file value=WEB-INF/
 logging.properties/
         /system-properties

 /appengine-web-app

 --- web.xml
 
 ?xml version=1.0 encoding=utf-8?
 web-app version=2.5 xmlns=http://java.sun.com/xml/ns/javaee;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   
 xsi:schemaLocation=http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
   display-name
     Wildstar Technologies, LLC. Google AppEngine JSF 2.0 Template
   /display-name
   description
     Template JSF 2.0 application configured to run on the Google
     AppEngine for Java.
   /description
   !-- * GAE 1.3.0 appears to handle server-side state saving.
 *  --
   context-param
     param-namejavax.faces.STATE_SAVING_METHOD/param-name
     param-valueserver/param-value
   /context-param
   context-param
   param-namejavax.faces.DEFAULT_SUFFIX/param-name
     param-value.xhtml/param-value
   /context-param
   !-- GAE Bug 1506 JSP 2.1 API but 2.0 Implementation --
   context-param
     param-namecom.sun.faces.expressionFactory/param-name
     param-valuecom.sun.el.ExpressionFactoryImpl/param-value
   /context-param
   context-param
     description
       Set this flag to true if you want the JavaServer Faces
       Reference Implementation to validate the XML in your
       faces-config.xml resources against the DTD. Default
       value is false.
     /description
     param-namecom.sun.faces.validateXml/param-name
     param-valuetrue/param-value
   /context-param
   !-- * Accommodate Single-Threaded Requirement of Google
 AppEngine  --
   context-param
     description
       When enabled, the runtime initialization and default
 ResourceHandler
       implementation will use threads to perform their functions. Set
 this
       value to false if threads aren't desired (as in the case of
 running
       within the Google Application Engine).

       Note that when this option is disabled, the ResourceHandler will
 not
       pick up new versions of resources when ProjectStage is
 development.
     /description
     param-namecom.sun.faces.enableThreading/param-name
     param-valuefalse/param-value
   /context-param
   !-- Faces Servlet --
   servlet
     servlet-nameFaces Servlet/servlet-name
     servlet-classjavax.faces.webapp.FacesServlet/servlet-class
     load-on-startup1/load-on-startup
   /servlet
   servlet-mapping
     servlet-nameFaces Servlet/servlet-name
     url-pattern/faces/*/url-pattern
     url-pattern*.jsf/url-pattern
   /servlet-mapping
   session-config
     session-timeout30/session-timeout
   /session-config
   welcome-file-list
     welcome-fileindex.jsp/welcome-file
     welcome-fileindex.xhtml/welcome-file
     welcome-fileindex.html/welcome-file
   /welcome-file-list
 /web-app

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

[appengine-java] Re: Java Server Faces 2.0 does not works in GAE (for me)

2010-07-13 Thread SammyBar
Silly error...!

I mistakenly named welcome.xhtml as welcome.xhml

Sorry, JSF 2.0 works for me too!

On 12 jul, 19:02, SammyBar sammy...@gmail.com wrote:
 Hi all,

 I'm trying to config my first Java Server Faces project with GAE. I
 have already configured my Eclipse following instructions published 
 athttps://sites.google.com/a/wildstartech.com/adventures-in-java/Java-P...,
 and also included the fix on the jsf-impl-gae.jar. I'm able to run my
 project in Eclipse without errors. The console displays INFO: The
 server is running athttp://localhost:/;. It looks everything is
 OK.
 But when I direct the browser to the above mentioned URL, I get a HTTP
 404 error /welcome.jsf not found
 I'm able to put a breakpoint in the index.jsp page at %
 response.sendRedirect(welcome.jsf); % It confirms me the app is
 working because the breakpoint is reached, but it looks like the
 server is unable to understand the welcome.xhtml file should be
 processed as welcome.jsf. Similarly by pointing the browser 
 tohttp://localhost:/welcome.xhtmlalso returns a 404 error. What is
 wrong with my configuration?

 Any hint is welcomed.
 Thanks in advance
 Sammy

 Follows the appengine-web.xml and web.xml files from my war/WEB-INF
 folder which are copies of the reccommended files published in the
 above mentioned site:

 --- appengine-web.xml
 
 ?xml version=1.0 encoding=utf-8?
 appengine-web-app xmlns=http://appengine.google.com/ns/1.0;
         applicationTestJSF/application
         version1/version
         sessions-enabledtrue/sessions-enabled

         !-- Configure java.util.logging --
         system-properties
                 property name=java.util.logging.config.file value=WEB-INF/
 logging.properties/
         /system-properties

 /appengine-web-app

 --- web.xml
 
 ?xml version=1.0 encoding=utf-8?
 web-app version=2.5 xmlns=http://java.sun.com/xml/ns/javaee;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   
 xsi:schemaLocation=http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
   display-name
     Wildstar Technologies, LLC. Google AppEngine JSF 2.0 Template
   /display-name
   description
     Template JSF 2.0 application configured to run on the Google
     AppEngine for Java.
   /description
   !-- * GAE 1.3.0 appears to handle server-side state saving.
 *  --
   context-param
     param-namejavax.faces.STATE_SAVING_METHOD/param-name
     param-valueserver/param-value
   /context-param
   context-param
   param-namejavax.faces.DEFAULT_SUFFIX/param-name
     param-value.xhtml/param-value
   /context-param
   !-- GAE Bug 1506 JSP 2.1 API but 2.0 Implementation --
   context-param
     param-namecom.sun.faces.expressionFactory/param-name
     param-valuecom.sun.el.ExpressionFactoryImpl/param-value
   /context-param
   context-param
     description
       Set this flag to true if you want the JavaServer Faces
       Reference Implementation to validate the XML in your
       faces-config.xml resources against the DTD. Default
       value is false.
     /description
     param-namecom.sun.faces.validateXml/param-name
     param-valuetrue/param-value
   /context-param
   !-- * Accommodate Single-Threaded Requirement of Google
 AppEngine  --
   context-param
     description
       When enabled, the runtime initialization and default
 ResourceHandler
       implementation will use threads to perform their functions. Set
 this
       value to false if threads aren't desired (as in the case of
 running
       within the Google Application Engine).

       Note that when this option is disabled, the ResourceHandler will
 not
       pick up new versions of resources when ProjectStage is
 development.
     /description
     param-namecom.sun.faces.enableThreading/param-name
     param-valuefalse/param-value
   /context-param
   !-- Faces Servlet --
   servlet
     servlet-nameFaces Servlet/servlet-name
     servlet-classjavax.faces.webapp.FacesServlet/servlet-class
     load-on-startup1/load-on-startup
   /servlet
   servlet-mapping
     servlet-nameFaces Servlet/servlet-name
     url-pattern/faces/*/url-pattern
     url-pattern*.jsf/url-pattern
   /servlet-mapping
   session-config
     session-timeout30/session-timeout
   /session-config
   welcome-file-list
     welcome-fileindex.jsp/welcome-file
     welcome-fileindex.xhtml/welcome-file
     welcome-fileindex.html/welcome-file
   /welcome-file-list
 /web-app

-- 
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: How to upload primary key as an id instead of name

2010-07-13 Thread Matthew Blain
Sorry, this won't be available until 1.3.6. You should be able to do
something like this:

 - property: __key__
   external_name: CityId
   export_transform: datastore.Key.id
   import_transform: lambda value: datastore.Key.from_path('City',
int(value))


--Matthew

On Jul 10, 5:53 pm, Pasha pavel.selivers...@gmail.com wrote:
 Could you please post an example. Thank you in advance.

 On Jun 30, 1:18 pm, Matthew Blain matthew.bl...@google.com wrote:



  The 1.3.5 bulkloader client will allow you to specify a numeric key;
  you must use the Key constructor explicitly to do this, integers will
  still be converted into strings.

  On Jun 30, 12:12 am, MANISH DHIMAN manisd...@gmail.com wrote:

   Hi All
   When I upload data using CSV file on G A E. Primary key is stored
   there as a name instead of id.
   Example.

   Format of .yaml is Given below
   transformers:
   - kind: City
     connector: csv
     connector_options:
       encoding: utf-8
       columns: from_header
     property_map:
       - property: __key__
         external_name: CityId
         export_transform: datastore.Key.id
       - property: Name
         external_name: Name

   Primary key stored there is:
   ID/Name                   Name
   name=1                    Delhi
   name=2                    London

   Due to uploaded data with name=keyvalue, when I am try to get Key
   from any Fetched Entities, then Key contains only name value but id
   value is 0 and also name contains long value as a String instance.

   Is it possible to store primary key(Using CSV while uploading data) in
   a format given below :
   ID/Name              Name
   id=1                    Delhi
   id=2                    London

   When data is stored with id=keyvalue, then Key contains id value is
   keyvalue as long instance.

-- 
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: How to upload primary key as an id instead of name

2010-07-13 Thread John Patterson

You can do this now using the RemoteDatastore Java utility

http://code.google.com/p/remote-datastore/

For example, this code runs on your desktop and creates a single  
entity in your live datastore:


   // divert datastore operations to live application
   RemoteDatastore.install();
   RemoteDatastore.divert(http://myVersion.latest.myApp.appspot.com/remote-datastore 
, myApp, myVersion);


   // create an entity with a numeric key
   Key key = KeyFactory.createKey(MyKindName, 35);
   Entity entity1 = new Entity(key);
   entity1.setProperty(property1, hello);

   // put entity to the remote datastore
   DatastoreService service =  
DatastoreServiceFactory.getDatastoreService();

   datastore.put(entity1);

This also works for bulk puts

On 14 Jul 2010, at 03:37, Matthew Blain wrote:


Sorry, this won't be available until 1.3.6. You should be able to do
something like this:

- property: __key__
  external_name: CityId
  export_transform: datastore.Key.id
  import_transform: lambda value: datastore.Key.from_path('City',
int(value))


--Matthew

On Jul 10, 5:53 pm, Pasha pavel.selivers...@gmail.com wrote:

Could you please post an example. Thank you in advance.

On Jun 30, 1:18 pm, Matthew Blain matthew.bl...@google.com wrote:




The 1.3.5 bulkloader client will allow you to specify a numeric key;
you must use the Key constructor explicitly to do this, integers  
will

still be converted into strings.



On Jun 30, 12:12 am, MANISH DHIMAN manisd...@gmail.com wrote:



Hi All
When I upload data using CSV file on G A E. Primary key is stored
there as a name instead of id.
Example.



Format of .yaml is Given below
transformers:
- kind: City
  connector: csv
  connector_options:
encoding: utf-8
columns: from_header
  property_map:
- property: __key__
  external_name: CityId
  export_transform: datastore.Key.id
- property: Name
  external_name: Name



Primary key stored there is:
ID/Name   Name
name=1Delhi
name=2London



Due to uploaded data with name=keyvalue, when I am try to get Key
from any Fetched Entities, then Key contains only name value but id
value is 0 and also name contains long value as a String instance.


Is it possible to store primary key(Using CSV while uploading  
data) in

a format given below :
ID/Name  Name
id=1Delhi
id=2London


When data is stored with id=keyvalue, then Key contains id  
value is

keyvalue as long instance.


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



Re: [appengine-java] Re: same application same datastore different subdomain

2010-07-13 Thread John Patterson


On 14 Jul 2010, at 01:39, Shyam Visamsetty wrote:


You definitely cannot share the data store between two applications as
of now.


Technically you actually can share data between applications using  
RemoteDatastore - you can divert datastore operations to a different  
application.


http://code.google.com/p/remote-datastore/

But you need to be careful not to break Googles terms of use by trying  
to spread you load between different applications to avoid fees.


--
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] deploy through proxy

2010-07-13 Thread senderj
I am using Netbeans 6.8 with GAE plug-in. I need to deploy to GAE
through a proxy. I've specified the correct proxy host and port in NB
but still I got connection timeout in every deployment. The proxy host
and prot is correct because they works in Eclipse. But not in NB.
Seems the NB plug-in has its own way of handling proxy. Please help.

Secondly, when deploying in NB, I was prompted for google login once
only. But never in subsequent deployment. Where can I check the google
id and password is stored?

-- 
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] I cannot access the url of my deployed application? getting Not Found

2010-07-13 Thread Daniel
Hi

I got no firewall on the PC and i can log in into the https://
appengine.google.com/dashboard?app_id=*

Than when i browse to Administration - Versions  i click on the link
of the application and getting immediate Not Found it looks like it
doesn't even try to surf to the web page

tried in FF and IE same result...

Am im missing something?

there is no trace in the logs either... so its not an application
error..

It used to work and suddenly starting couple of days ago, it
stopped.

What can i do?

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



[google-appengine] Re: Is _ah/openid_logout going to be a stable logout URL

2010-07-13 Thread l.denardo
It was one of the other ways to do it, I just wanted to avoid more
code in my architecture just to do this (MVP has the disadvantage of
added boilerplate for simple tasks like this one).
Anyway I found a workaroud, passing the URL in an invisible div in my
page and then reading and populating another field in my page using
GWT RootPanel.get(id), using different ids for various parts of the
page.

Thanks for your advice.

Regards
Lorenzo

On Jul 12, 5:20 pm, gops patelgo...@gmail.com wrote:
 as this is undocumented behaviour , you should not use it. ( i don't
 think they will change this but still )

 we not just fetch logout url via ajax and create link.

 On Jul 12, 6:53 pm, l.denardo lorenzo.dena...@gmail.com wrote:

  Hello,
  I'm currently using openID for users authentication.
  What I've done until now is to generate a logout link on server side,
  using the Users API.

  Now I need to generate such URL on client side, to add a click
  listener to it and automatically save user's work before sign out.
  User service always  generates _ah/openid_logout as a logout URL, so
  I wanted to know if this is intended to be a stable logout url and so
  can be used safely to generate a logout link, or it's better to find
  another workaround for this.

  Thanks for your advice
  Regards
  Lorenzo

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



Re: [google-appengine] Offline processing

2010-07-13 Thread Pieter Coucke
Well, it has the benefit that all B tasks can be executed in parallel so
it can be very fast.
You can also wait until the background services functionality is added to
App Engine (this is on the roadmap).



On Tue, Jul 13, 2010 at 2:13 AM, Phil McDonnell
phil.a.mcdonn...@gmail.comwrote:

 I see how this is possible, but it feels very clunky.  Is this standard
 practice?

 Thanks,
 Phil


 On Mon, Jul 12, 2010 at 7:09 PM, Pieter Coucke 
 pieter.cou...@onthoo.comwrote:

 For a similar problem I use a task A which fetches 10 entities, creates
 subtasks B for them and then creates a new task A with the datastore cursor
 as a parameter so this task can continue creating subtasks.



 On Mon, Jul 12, 2010 at 1:31 AM, Phil McDonnell 
 phil.a.mcdonn...@gmail.com wrote:

 I know there are a number of different frameworks and mechanisms to
 process data offline on GAE.  I need to have a daily job that scans one of
 my datastore tables and computes an updated profile for all my users.  What
 would be the best mechanism to do this?  Are task queues appropriate?
  Should I be using some sort of mapreduce?  If I should use some sort of
 mapreduce framework, how does that integrate with GAE?  My user base right
 now is small, but I intend to scale this.

 Thanks,
 Phil

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.




 --
 Pieter Coucke
 Onthoo BVBA
 http://www.onthoo.com
 http://www.koopjeszoeker.be

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.




-- 
Pieter Coucke
Onthoo BVBA
http://www.onthoo.com
http://www.koopjeszoeker.be

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



Re: [google-appengine] Re: Local development solution for Closure JavaScript library + AppEngine

2010-07-13 Thread Jeff Schwartz
Then there's Groovy which supports closure at the language level and is byte
code compatible with Java. Gaelyk is a lite weight appengine framework built
on top of Groovy. A sweet combination.

On Tue, Jul 13, 2010 at 1:40 AM, gops patelgo...@gmail.com wrote:

 I think you are using java.

 for python, kay framework has built in media compilation with closure-
 library and compiler.

 On Jul 13, 6:48 am, Mike mickn...@gmail.com wrote:
  Hi guys
 
  I came across plovr today, which has made my life a lot easier, so I
  wanted to share.
 
  It is wrapper for the Closure JavaScript compiler that will compile on
  the fly and serve the compiled JavaScript from it's own server. This
  makes it really easy to develop an application locally with AppEngine,
  without having to server all the individual closure dependencies.
 
  Once you've set it up with a simple JSON config file, you simply
  insert a single script tag hitting this location:
 http://localhost:9810/compile?id={projecthttp://localhost:9810/compile?id=%7Bprojectid
  here}
 
  When you change the JavaScript files, all of the source files will be
  automatically recompiled.
 
  Here's the getting started guide:
 http://code.google.com/p/plovr/wiki/GettingStarted
 
  Mike
 
  p.s. I'm not associated with this project, but I loved this solution
  so much I wanted to share! Hope it helps someone.

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.




-- 
--
Jeff

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



Re: [google-appengine] datastore keys security question

2010-07-13 Thread Jeff Schwartz
I would use the key's id and not the full key which contains too much
private information. Also, at a minimum, convert the id to base64 url
friendly. It won't stop a committed hacker but it will offer some
obfuscation. You could use a stronger encryption than base64 of course as
base64 is easy to decrypt.

On Mon, Jul 12, 2010 at 3:42 PM, Felippe Bueno felippe.bu...@gmail.comwrote:

 Hi,

 I'm using python/django and I'm planing to use the following URL design:

 /application/edit/content/KEY/

 where KEY is the datastore key of 'content'.

 Ex:
 /application/edit/content/aghlcHVicHViMnILCxIFSXNzdWUYHww/

 Is there any security problem ?

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.




-- 
--
Jeff

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



[google-appengine] Datastore is now slower than before last week's maintenance

2010-07-13 Thread takeru sasaki
Hello,

I feel Datastore is now slower than before last week's maintenance.
Does anyone feel like same?

In my dashboard, Milliseconds/Request is now 800+ms.
But it was about 400ms before the maintenance.


I want to back faster by this week's maintenance.
But someone said it will not back, in Twitter timeline #appengine in Japanese.

What is happening now in datastore?

takeru

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



[google-appengine] Re: Datastore is now slower than before last week's maintenance

2010-07-13 Thread Geoffrey Spear
The maintenance announcement stated that they expected increased
latency between the first maintenance period and the second one, which
is scheduled for tomorrow.

On Jul 13, 7:45 am, takeru sasaki sasaki.tak...@gmail.com wrote:
 Hello,

 I feel Datastore is now slower than before last week's maintenance.
 Does anyone feel like same?

 In my dashboard, Milliseconds/Request is now 800+ms.
 But it was about 400ms before the maintenance.

 I want to back faster by this week's maintenance.
 But someone said it will not back, in Twitter timeline #appengine in 
 Japanese.

 What is happening now in datastore?

 takeru

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



[google-appengine] Re: Datastore is now slower than before last week's maintenance

2010-07-13 Thread Mike Wesner
see http://googleappengine.blogspot.com/2010/07/upcoming-datastore-downtime.html

we'd like to inform developers that during the period between the
two maintenance events listed above, we are expecting that Datastore
performance will be impacted and applications will see higher read/
write latencies.


-mike
On Jul 13, 6:45 am, takeru sasaki sasaki.tak...@gmail.com wrote:
 Hello,

 I feel Datastore is now slower than before last week's maintenance.
 Does anyone feel like same?

 In my dashboard, Milliseconds/Request is now 800+ms.
 But it was about 400ms before the maintenance.

 I want to back faster by this week's maintenance.
 But someone said it will not back, in Twitter timeline #appengine in 
 Japanese.

 What is happening now in datastore?

 takeru

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



Re: [google-appengine] Re: datastore keys security question

2010-07-13 Thread Felippe Bueno
 datastore_types.Key.from_path(u'Issue', 31L, _app=u'epubpub2')

How you did it ?
You simply asked for db.Key(mykey)?
Is it possible to get other informations for this entity, from another app-id ?

Jeff, I can't find the key's id using datastore view or in documentation.

The idea is to have 4 commands
/add/application, edit, remove and view.

the 'view' command will be used to display content to my visitors
(unauthenticated).

add/edit/remove will verify if that key belongs to that user

How you guys do something like that ?
I mean, pass an identification parameter to your application, in a safe way ?

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



Re: [google-appengine] Re: Datastore is now slower than before last week's maintenance

2010-07-13 Thread takeru sasaki
Geoffrey, Mike,

Thank you!






2010/7/13 Mike Wesner mike.wes...@webfilings.com:
 see 
 http://googleappengine.blogspot.com/2010/07/upcoming-datastore-downtime.html

 we'd like to inform developers that during the period between the
 two maintenance events listed above, we are expecting that Datastore
 performance will be impacted and applications will see higher read/
 write latencies.


 -mike
 On Jul 13, 6:45 am, takeru sasaki sasaki.tak...@gmail.com wrote:
 Hello,

 I feel Datastore is now slower than before last week's maintenance.
 Does anyone feel like same?

 In my dashboard, Milliseconds/Request is now 800+ms.
 But it was about 400ms before the maintenance.

 I want to back faster by this week's maintenance.
 But someone said it will not back, in Twitter timeline #appengine in 
 Japanese.

 What is happening now in datastore?

 takeru

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



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



[google-appengine] how to get the id of key of SelfReferenceProperty

2010-07-13 Thread saintthor
class x( db.Model ):
yy = db.ReferenceProperty( y )
Parent = db.SelfReferenceProperty()

use yy.key().id() is ok, but Parent.key().id() is invalid. tell me
SelfReferenceProperty have no attribute Key.

how to get the key id then?

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



[google-appengine] Re: how to view all keys in memcache?

2010-07-13 Thread saintthor
thank you.

i have solved this problem.

On 7月7日, 上午10时30分, Toomore toomore0...@gmail.com wrote:
 Appstats for 
 Pythonhttp://code.google.com/appengine/docs/python/tools/appstats.html

 On Jul 6, 3:01 pm,saintthorsaintt...@gmail.com wrote:

  what is appstat?

  give me a link please.

  On 7月6日, 下午2时44分, djidjadji djidja...@gmail.com wrote:

   If you look with Appstat to requests that use memcache you see that an
   RPC is made for every memcache call.

   If your assumption is correct then many other apps should have a major 
   bug.
   Instead of logging.debug() try using logging.info().

   Very likely that you have a problem in some other part of your code.
   Try to use Appstat to see what the local variables where at the
   different requests.
   Or log all relevant local variables.
   And log the path the code uses.

   2010/7/6saintthorsaintt...@gmail.com:

are you sure?

even in the cloud, should it show me defferent data in defferent get
with same key?

On 7月6日, 下午2时30分, djidjadji djidja...@gmail.com wrote:
The memcache is not stored on the same machine as your python
interpreters are running.
The interpreter interacts with the memcache server by RPC (network 
packages).
And it could be that the two python interpreters are running at
different machines in the cloud.

2010/7/6 Andi Albrecht albrecht.a...@googlemail.com:

 The actual instances are serialized when stored in memcache and
 deserialized when retrieved from the cache. What you're seeing is a
 different instance ID (as returned by id(myobj)) since a new object 
 is
 created. But the state of your Stock.IndexSet instance should be the
 same before storing in memcache and after fetching it from the cache
 again.

 You should compare the actual data and not the repr() of your 
 instances.

 Hope that helps :)

 Andi

 On Tue, Jul 6, 2010 at 7:42 AM,saintthorsaintt...@gmail.com wrote:
 it seems there are too entities with same key im my memcache.

 codes:

 self.szz = memcache.get( MemKey )
 if not self.szz:
logging.debug( no szz in memcache )
self.szz = IndexSet( data )
 logging.debug( dida szz =  + repr( self.szz ))
 memcache.set( MemKey, self.szz, 1 )

 log:

 07-05 10:04PM 41.838 dida szz = Stock.IndexSet object at
 0xac27dca7f5d540
 07-05 10:23PM 55.943 dida szz = Stock.IndexSet object at
 0xcd9724f54f1dbb30

 you see, the two szz is defferent, with no log of no szz in 
 memcache
 between them.

 so i think there may be too entities with same key im my memcache.

 --
 You received this message because you are subscribed to the Google 
 Groups Google App Engine group.
 To post to this group, send email to 
 google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group 
 athttp://groups.google.com/group/google-appengine?hl=en.

 --
 You received this message because you are subscribed to the Google 
 Groups Google App Engine group.
 To post to this group, send email to 
 google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group 
 athttp://groups.google.com/group/google-appengine?hl=en.

--
You received this message because you are subscribed to the Google 
Groups Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group 
athttp://groups.google.com/group/google-appengine?hl=en.

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



[google-appengine] How do i reload my app(google wave robot) in app engine

2010-07-13 Thread Alex
i have deploy a wave robot on to app engine.
it works as expected,

i then make some change to the code, deploy it on the same app engine
version
the change i made was not in effect.

according to
https://groups.google.com/group/google-appengine-java/browse_thread/thread/60ea6c16f1f0dab9/d1792c101518ed0f?lnk=gstq=restart#d1792c101518ed0f

i can restart it by disable it in the admin page and then re-enable it
but that does not work (it still use the old codes)

i also tried disable it w/o re-enabling back. the robot still work
without error and using the old code.

i hear some ppl mention about development mode tab, but i cant seem to
find it in eclipse. i dunt think it will work for wave robot since i
cant run the robot locally.

i have post a similar question on wave api group.
this is really a letdown for me who is starting to learn about wave
robot and app engine.

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



[google-appengine] Opening a JSP editor results in eclipse not responding

2010-07-13 Thread Alex
Hi,

I have run into some problems with eclipse and hope that someone here
can help me.

I created a GAE project and wanted to experiment with some basic JSP
stuff.
I run into the known problem that I have to install a JDK.
After doing so, problems got worse. When I now try to create or edit a
JSP page, eclipse freezes.

I've tried the 64bit version of Helios in combination with Java 6
Update 21 (64bit), as well as the 32bits version of Helios in
combination with the 32bit version of the JDK (after uninstalling the
64bit versions), both on the same 64bit Windows 7 computer.

When I force eclipse to close I get the error message:
-
Java was started but returned exit code= -805306369
C:\Windows\system32\javaw.exe
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-jar D:\Program
Files\eclipse\plugins/org.eclipse/equinox.launcher_1.1.0.v20100507.jar
-os win32
-ws win32
-arch x86_64
-showsplash
-launcher D:\Program Files\eclipse\eclipse.exe
-name Eclipse
--launcher.library D:\Program
Files\eclipse\plugins/
org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.0.v2010
0503\eclipse_1307.dll
-startup D:\Program
Files\eclipse\plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
-exitdata 7c0_58
-product org.eclipse.epp.package.jee.product
-vm C:\Windows\system32\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-jar D:\Program
Files\eclipse\plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
-

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



[google-appengine] Failed to Create App

2010-07-13 Thread Steegle
I have successfully made an app and tested it on my personal Google
Account, now I need to upload it using my work Google Account.

I have signed in to Google App Engine using my work Google Account and
successfully verified by SMS.  I have tried twice to create an app
(https://appengine.google.com/start/createapp): I check the URL is
available, which they were, I gave an appropriate title, I left it
open to all Google Accounts and used the Create Application button it
throws me back to https://appengine.google.com/start and does not let
me re-use the two URLs and I cannot fin any way to access them (rwp-
application-form and rwp-app-form - I've tried going to
https://appengine.google.com/dashboard?app_id=rwp-app-form and
https://appengine.google.com/dashboard?app_id=rwp-application-form
and both throw me back to https://appengine.google.com/start).

Please can someone help me get these created as I wanted to get them
online today.

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



[google-appengine] Loading Seed Data for Unit Testing

2010-07-13 Thread vhazrati
Hi,

We are using JPA for our Dao's to interact with the datastore. I was
wondering is there is a way to load seed data for unit testing. I can
insert the entities using JPA in the setup() method here

private final LocalServiceTestHelper helper = new
LocalServiceTestHelper(new LocalDatastoreServiceTestConfig());

@Before
public void setUp() {
helper.setUp();
}

but I was wondering if the LocalServiceTestHelper / anyother has a
convenience method for loading the seed data from an XML file. The
data would be present like this

?xml version='1.0' encoding='UTF-8'?
dataset
 USER_ROLE ROLE=ROLE_ADMIN NAME=Administrator/
  USER_ROLE ROLE=ROLE_CONSULTANT NAME=Consultant/
  USER_ROLE ROLE=ROLE_PROJECTMANAGER NAME=Project Manager/
  USER_ROLE ROLE=ROLE_REPORT NAME=Reporter/

  USER_TO_USERROLE ROLE=ROLE_CONSULTANT USER_ID=1/
  USER_TO_USERROLE ROLE=ROLE_PROJECTMANAGER USER_ID=1   /

/dataset

Regards | Vikas
www.inphina.com
thoughts.inphina.com

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



[google-appengine] Modeling Twitter Annotations

2010-07-13 Thread Josh
I am writing a micro blog and would like to add twitter like
annotations to each post.  What is the best way to model this using
the app engine?  Below is an json example of the type of structure I
am trying to achieve on GAE.

{
  message: App Engine Rocks,
  annotations:
[{geolocation:{lat:41.87, long:72.82}},
 {link:{url:http://code.google.com/appengine/}}
 {keyword:{key1:python, key2:google,key3:scale}}]
}

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



[google-appengine] Re: ~200 ms or 200 ms lags

2010-07-13 Thread Nick Joyce
On Jul 11, 11:01 pm, Broadsmile broadysm...@gmail.com wrote:
 Hi! I'm new to the GAE Engine, I found it will be a nice engine for my
 mmorpg game. For now I'm still investigating what Can I do with this
 technology, and what I can't. I want my game to be real-time based and
 am now testing the server to see how responsive it can be.

 One of first things I did was pinging the app-name.appspot.com to see
 the lags. It was, and still is ~50ms.
 However! Pinging may be faster then actually sending and receiving
 data. So I made a simple benchmark in flash + 
 python:http://lagstest.appspot.com/gra

 I get about 200 ms lag, and it's too bad for some really fast action
 in realtime (althought I even don't really want so fast action so I
 don't need small lag). Sometimes lag is spiking to even a second and
 that's alarming. Also something weird happened - I get ~50 ms lag on
 offline devserver - that means, that flash, server or pyAMF is a
 significant factor! :O

 I made the source code publichttp://lagstest.appspot.com/lagtest.zip
 (99% of the source code is by Aral Balkan - MIT licence - anyway).

 I live in Poland.

 So I have several questions:
 1. Should I expect smaller lag? How to achieve that with flash + GAE?
 2. Should I repost on Python GAE?
 3. Any tips for a begginer ?
 4. Any opensource projects to see, that have a good connection?
 5. Is my place of living a factor? What do You see on this benchmark?
 6. What's the sense of life?
 7. Is my code allright or Aral Balkans code is already outdated? (I
 didn't upgrade AMF to the up-to-date version yet)

 Thank You in Advance.

I took a brief look at the zip and noticed that you are using PyAMF
0.3.0b, which is ancient! :)

There has been a lot of effort to optimise PyAMF since that version
(x4-x8 speed up in d/encoding is not unusual). If speed is your king
then I would suggest you take a look at the soon to be released 0.6
[1] which is largely backwards compatible with all older versions.

Cheers,

Nick

[1] - http://github.com/hydralabs/pyamf

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



[google-appengine] Re: ~200 ms or 200 ms lags

2010-07-13 Thread Nick Joyce
On Jul 11, 11:01 pm, Broadsmile broadysm...@gmail.com wrote:
 Hi! I'm new to the GAE Engine, I found it will be a nice engine for my
 mmorpg game. For now I'm still investigating what Can I do with this
 technology, and what I can't. I want my game to be real-time based and
 am now testing the server to see how responsive it can be.

 One of first things I did was pinging the app-name.appspot.com to see
 the lags. It was, and still is ~50ms.
 However! Pinging may be faster then actually sending and receiving
 data. So I made a simple benchmark in flash + 
 python:http://lagstest.appspot.com/gra

 I get about 200 ms lag, and it's too bad for some really fast action
 in realtime (althought I even don't really want so fast action so I
 don't need small lag). Sometimes lag is spiking to even a second and
 that's alarming. Also something weird happened - I get ~50 ms lag on
 offline devserver - that means, that flash, server or pyAMF is a
 significant factor! :O

 I made the source code publichttp://lagstest.appspot.com/lagtest.zip
 (99% of the source code is by Aral Balkan - MIT licence - anyway).

 I live in Poland.

 So I have several questions:
 1. Should I expect smaller lag? How to achieve that with flash + GAE?
 2. Should I repost on Python GAE?
 3. Any tips for a begginer ?
 4. Any opensource projects to see, that have a good connection?
 5. Is my place of living a factor? What do You see on this benchmark?
 6. What's the sense of life?
 7. Is my code allright or Aral Balkans code is already outdated? (I
 didn't upgrade AMF to the up-to-date version yet)

 Thank You in Advance.

I took a look at the zip and noticed that you are using PyAMF 0.3.0b,
which is ancient! :)

A lot of work has gone into optimising the PyAMF (x4-x8 improvement of
d/encoding times is not unusual) as well as much improved integration
with the Datastore.

0.6 is about to be released and if you are looking for speed then you
probably want that version [1] (rather than the relatively old 0.5.1).
It should be largely backwards compatible with your current code.

Cheers,

Nick

[1] - http://github.com/hydralabs/pyamf

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



[google-appengine] Serializable Docservice on Appengine

2010-07-13 Thread adrian.migraso
hi, i downloaded the gdata-docs-trunk and made the DocService
serializable so i can store it on appengine sessions.

everything was ok when i test it locally, but this error appears on
the server.

i tried a no-arg constructor and set a default appname, but the result
is still the same.

i dont understand what's happening here, hope you can show me some
fix

thanks.



#javax.servlet.ServletException: java.lang.RuntimeException:
java.io.InvalidClassException:
com.google.gdata.client.docs.DocsService;
com.google.gdata.client.docs.DocsService; no valid constructor
at
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:
240)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
542)
at org.mortbay.jetty.HttpConnection
$RequestHandler.headerComplete(HttpConnection.java:923)
at
com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:
76)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:
135)
at
com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:
250)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:7115)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:7113)
at
com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:
24)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
398)
at com.google.net.rpc.impl.Server$2.run(Server.java:852)
at
com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:
56)
at
com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:
576)
at com.google.net.rpc.impl.Server.startRpc(Server.java:807)
at com.google.net.rpc.impl.Server.processRequest(Server.java:369)
at
com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:
442)
at
com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:
319)
at
com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:
290)
at com.google.net.async.Connection.handleReadEvent(Connection.java:
474)
at
com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:
831)
at
com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:
207)
at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:
103)
at
com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:
251)
at com.google.apphosting.runtime.JavaRuntime
$RpcRunnable.run(JavaRuntime.java:417)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.io.InvalidClassException:
com.google.gdata.client.docs.DocsService;
com.google.gdata.client.docs.DocsService; no valid constructor
at
com.google.apphosting.runtime.jetty.SessionManager.deserialize(SessionManager.java:
387)
at
com.google.apphosting.runtime.jetty.SessionManager.loadSession(SessionManager.java:
307)
at
com.google.apphosting.runtime.jetty.SessionManager.getSession(SessionManager.java:
282)
at
org.mortbay.jetty.servlet.AbstractSessionManager.getHttpSession(AbstractSessionManager.java:
237)
at
org.mortbay.jetty.servlet.SessionHandler.setRequestedId(SessionHandler.java:
246)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
136)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
418)
at
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:
238)
... 27 more
Caused by: java.io.InvalidClassException:
com.google.gdata.client.docs.DocsService;
com.google.gdata.client.docs.DocsService; no valid constructor
at java.io.ObjectStreamClass.checkDeserialize(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.util.HashMap.readObject(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 

[google-appengine] SEND APPLICATION

2010-07-13 Thread frankzeffi
I'm brazilians, I can't send my number mobile fone do send
applications. Alwais go back erros.

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



[google-appengine] users.get_current_user() returning None for https requests

2010-07-13 Thread john
I have a handler with the secure: optional setting in my app.yaml
file. When I make http requests to one of its url's, the data is
retrieved and returned no problem. When I make an https to the same
url, however, the handler's call to users.get_current_user() returns
None, so that the request cannot be processed (and my code returns
401).

Has anyone had this problem with https requests? I presume the user-
cookie-info isn't getting included in the appropriate request header,
but I have no idea why that might be or how to fix it. If anyone can
help with this, I would sure appreciate it.

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



Re: [google-appengine] users.get_current_user() returning None for https requests

2010-07-13 Thread Andi Albrecht
It's not clear from your message if you login again before accessing
your https URLs or if you just change the protocol part of the URL
from http to https (i.e. adding a s) or do you login again before
hitting your URL using https?

The cookie you'll receive for http isn't valid for your https URLs, so
you need to login again.

Andi

On Tue, Jul 13, 2010 at 7:18 PM, john john.tur...@gmail.com wrote:
 I have a handler with the secure: optional setting in my app.yaml
 file. When I make http requests to one of its url's, the data is
 retrieved and returned no problem. When I make an https to the same
 url, however, the handler's call to users.get_current_user() returns
 None, so that the request cannot be processed (and my code returns
 401).

 Has anyone had this problem with https requests? I presume the user-
 cookie-info isn't getting included in the appropriate request header,
 but I have no idea why that might be or how to fix it. If anyone can
 help with this, I would sure appreciate it.

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



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



[google-appengine] Re: ~200 ms or 200 ms lags

2010-07-13 Thread Broadsmile
Thanks for Your answer! Aral Balkan's example is very old and I'm
aware of that. You suprised me by the technological jump of pyAMF, but
unfortunately upgrading it has no effect in my case (probably because
I don't send/get a lot of data, so pyAMF can't show off it's
serialization/deserialization skills.

OLD: http://0.latest.lagstest.appspot.com/gra
NEW: http://1.latest.lagstest.appspot.com/gra

Probably 50 ms offline lag is a fault of flash. But still, without
these 50 ms lag server will have 150 ms, while it pings with 50. Maybe
there's some multi wrong techniques stacked one on eachother. I will
never know that until I see some better lag tester, that accomplishes
~50 ms (well, any under 150 ms will be nice) online lag.

So I repeat my questions and add more of them:
1. Does anyone have similar GAE lag tester? I don't care about
technology, I care if it shows different pings.
2. Ad 7: does anyone know if there's something more in Aral Balkan's
example that's ancient and wrong nowadays?
3. Does the God exist?
4. Is there any flash group I could ask it as well? (I'm kinda not a
group discussant type and I'm not oriented...)

Thanks for Your try, Nick! And I'm looking forward to next hints!

On 13 Lip, 08:52, Nick Joyce n...@boxdesign.co.uk wrote:
 On Jul 11, 11:01 pm, Broadsmile broadysm...@gmail.com wrote:





  Hi! I'm new to the GAE Engine, I found it will be a nice engine for my
  mmorpg game. For now I'm still investigating what Can I do with this
  technology, and what I can't. I want my game to be real-time based and
  am now testing the server to see how responsive it can be.

  One of first things I did was pinging the app-name.appspot.com to see
  the lags. It was, and still is ~50ms.
  However! Pinging may be faster then actually sending and receiving
  data. So I made a simple benchmark in flash + 
  python:http://lagstest.appspot.com/gra

  I get about 200 ms lag, and it's too bad for some really fast action
  in realtime (althought I even don't really want so fast action so I
  don't need small lag). Sometimes lag is spiking to even a second and
  that's alarming. Also something weird happened - I get ~50 ms lag on
  offline devserver - that means, that flash, server or pyAMF is a
  significant factor! :O

  I made the source code publichttp://lagstest.appspot.com/lagtest.zip
  (99% of the source code is by Aral Balkan - MIT licence - anyway).

  I live in Poland.

  So I have several questions:
  1. Should I expect smaller lag? How to achieve that with flash + GAE?
  2. Should I repost on Python GAE?
  3. Any tips for a begginer ?
  4. Any opensource projects to see, that have a good connection?
  5. Is my place of living a factor? What do You see on this benchmark?
  6. What's the sense of life?
  7. Is my code allright or Aral Balkans code is already outdated? (I
  didn't upgrade AMF to the up-to-date version yet)

  Thank You in Advance.

 I took a brief look at the zip and noticed that you are using PyAMF
 0.3.0b, which is ancient! :)

 There has been a lot of effort to optimise PyAMF since that version
 (x4-x8 speed up in d/encoding is not unusual). If speed is your king
 then I would suggest you take a look at the soon to be released 0.6
 [1] which is largely backwards compatible with all older versions.

 Cheers,

 Nick

 [1] -http://github.com/hydralabs/pyamf

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



[google-appengine] Re: TransientError adding to queue..

2010-07-13 Thread Darien Caldwell
I had my first TransientError last night, and now I'm wondering this
too. I would think this is probably a reasonable thing to do.

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



[google-appengine] Getting 500 internal server errors trying to deploy app or load dashboard

2010-07-13 Thread Danny Tuppeny
I made some minor changes to my app, and had to save one of my files
as UTF8 (it was previously Ascii, but my pound signs were showing as
another character).

When I tried to deploy, I now get a 500 internal server error page
returned in the python window. Get the same error when trying to
access the dashboard.

Not sure if this is related to me changing the encoding, or if it was
just bad timing.

Anyone else seeing problems? It's been happening for at least 20 mins,
as I've been trying various things (such as changing the encoding
again) in an attempt to fix it :-(

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



[google-appengine] Re: Getting 500 internal server errors trying to deploy app or load dashboard

2010-07-13 Thread Danny Tuppeny
Looks like I posted too soon. Less than 2 minutes later, everything
seems to be working as normal!

On Jul 13, 8:13 pm, Danny Tuppeny da...@tuppeny.com wrote:
 I made some minor changes to my app, and had to save one of my files
 as UTF8 (it was previously Ascii, but my pound signs were showing as
 another character).

 When I tried to deploy, I now get a 500 internal server error page
 returned in the python window. Get the same error when trying to
 access the dashboard.

 Not sure if this is related to me changing the encoding, or if it was
 just bad timing.

 Anyone else seeing problems? It's been happening for at least 20 mins,
 as I've been trying various things (such as changing the encoding
 again) in an attempt to fix it :-(

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



[google-appengine] Re: users.get_current_user() returning None for https requests

2010-07-13 Thread john
Well no, I haven't been logging in again before switching between the
http and https requests.

But that seems to imply that *every* request in an entire user session
has to be either http or https, and you cannot mix them. Is that
really how GAE works? I can't find anything in the docs about that.



On Jul 13, 2:17 pm, Andi Albrecht albrecht.a...@googlemail.com
wrote:
 It's not clear from your message if you login again before accessing
 your https URLs or if you just change the protocol part of the URL
 from http to https (i.e. adding a s) or do you login again before
 hitting your URL using https?

 The cookie you'll receive for http isn't valid for your https URLs, so
 you need to login again.

 Andi



 On Tue, Jul 13, 2010 at 7:18 PM, john john.tur...@gmail.com wrote:
  I have a handler with the secure: optional setting in my app.yaml
  file. When I make http requests to one of its url's, the data is
  retrieved and returned no problem. When I make an https to the same
  url, however, the handler's call to users.get_current_user() returns
  None, so that the request cannot be processed (and my code returns
  401).

  Has anyone had this problem with https requests? I presume the user-
  cookie-info isn't getting included in the appropriate request header,
  but I have no idea why that might be or how to fix it. If anyone can
  help with this, I would sure appreciate it.

  --
  You received this message because you are subscribed to the Google Groups 
  Google App Engine group.
  To post to this group, send email to google-appeng...@googlegroups.com.
  To unsubscribe from this group, send email to 
  google-appengine+unsubscr...@googlegroups.com.
  For more options, visit this group 
  athttp://groups.google.com/group/google-appengine?hl=en.

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



Re: [google-appengine] Offline processing

2010-07-13 Thread Robert Kluin
I think it is pretty standard practice, and it can be quite fast when
implemented correctly.

Check out Brett Slatkin's IO talk:
http://code.google.com/events/io/2010/sessions/high-throughput-data-pipelines-appengine.html

And the 'mapper' implementation:
http://code.google.com/p/appengine-mapreduce/


Robert




On Mon, Jul 12, 2010 at 8:13 PM, Phil McDonnell
phil.a.mcdonn...@gmail.com wrote:
 I see how this is possible, but it feels very clunky.  Is this standard
 practice?
 Thanks,
 Phil

 On Mon, Jul 12, 2010 at 7:09 PM, Pieter Coucke pieter.cou...@onthoo.com
 wrote:

 For a similar problem I use a task A which fetches 10 entities, creates
 subtasks B for them and then creates a new task A with the datastore cursor
 as a parameter so this task can continue creating subtasks.



 On Mon, Jul 12, 2010 at 1:31 AM, Phil McDonnell
 phil.a.mcdonn...@gmail.com wrote:

 I know there are a number of different frameworks and mechanisms to
 process data offline on GAE.  I need to have a daily job that scans one of
 my datastore tables and computes an updated profile for all my users.  What
 would be the best mechanism to do this?  Are task queues appropriate?
  Should I be using some sort of mapreduce?  If I should use some sort of
 mapreduce framework, how does that integrate with GAE?  My user base right
 now is small, but I intend to scale this.
 Thanks,
 Phil

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



 --
 Pieter Coucke
 Onthoo BVBA
 http://www.onthoo.com
 http://www.koopjeszoeker.be

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

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


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



Re: [google-appengine] Re: Custom path for the auth cookie (ACSID)

2010-07-13 Thread Robert Kluin
Yes, I meant OpenID.  :)

Robert



On Fri, Jul 9, 2010 at 2:33 PM, Vladimir Prudnikov pru...@gmail.com wrote:
 Are you talking about OpenID? OAuth is for different purposes.
 I think it's not possible with OpenID. It has the same API and works
 the same way.

 On Jul 9, 7:02 pm, Robert Kluin robert.kl...@gmail.com wrote:
 Yes, I understand your suggestion.  And I really wish it would be 
 implemented.

 I was just noting that at creation time they restrict the application
 to a specific 'type' of account.  That would need to be changed as
 well.

 I was thinking (wondering if), using OAuth, it would be possible to
 achieve this now.

 Robert

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



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



[google-appengine] Re: Opening a JSP editor results in eclipse not responding

2010-07-13 Thread TL
As a troubleshooting step I would suggest creating a java project that
is not a GAE project, and verifying that it works and you can edit
JSPs.

Alternatively you can uncheck in your existing project properties the
checkboxes Use Google App Engine and This project has a war
directory in the Google settings.

If it is a general Eclipse problem (not related to GAE), then other
java forums will be more helpful.

Also try a bare bones simple hello world size JSP. The JSP editors
in eclipse are slow and tend to break once in a while on big JSP files.

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



[google-appengine] Re: HTTPS on my own domain

2010-07-13 Thread TL
Thanks.
Do people have an estimate of the increased cost of using HTTPS over
HTTP (due to more CPU cycles)?

On Jul 2, 11:28 am, J j.si...@earlystageit.com wrote:

 We don't use any cookies until the user logs in and once they log in,
 we stay on https for all traffic. Hopefully we don't run into
 performance problems. While we consider the http channel and the https
 channel to be completely separate, the common elements are the App
 Engine (and the browser). We'd probably do the sharing in the
 application code on App Engine if we get backed into a corner for
 performance reasons.

 Perhaps someone else on this list has a suggestion?

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



Re: [google-appengine] Re: datastore keys security question

2010-07-13 Thread Robert Kluin
I use entity keys as parameters for some things.

If allowing someone to know the app-id of your app is a security risk
you may need to evaluate your security; besides if you want to use SSL
the app-id is public knowledge anyway.  (Sometimes) I also use the
key when I want to allow multiple an entity that may be of different
kinds to be requested.  The handler can decode the key and validate
that it is an acceptable kind very easily.  Besides, someone knowing
the kind is names 'Issue' should also not pose a major threat, the
user facing form is probably already titled 'Issue:'  :)


The documentation explains how to get a key's id or name on the Key class page:
http://code.google.com/appengine/docs/python/datastore/keyclass.html

You can read about how to get an entity's key here:
http://code.google.com/appengine/docs/python/datastore/modelclass.html


Deciding who is allowed to do an action depends on the structure of
your application.  For some of my apps on the user who created an
entity can edit/delete it.  So my test is simple, load the entity and
compare the 'user' field to the current user.  If they differ then I
raise an exception and return.

Robert






On Tue, Jul 13, 2010 at 10:20 AM, Felippe Bueno felippe.bu...@gmail.com wrote:
 datastore_types.Key.from_path(u'Issue', 31L, _app=u'epubpub2')

 How you did it ?
 You simply asked for db.Key(mykey)?
 Is it possible to get other informations for this entity, from another app-id 
 ?

 Jeff, I can't find the key's id using datastore view or in documentation.

 The idea is to have 4 commands
 /add/application, edit, remove and view.

 the 'view' command will be used to display content to my visitors
 (unauthenticated).

 add/edit/remove will verify if that key belongs to that user

 How you guys do something like that ?
 I mean, pass an identification parameter to your application, in a safe way ?

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



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



Re: [google-appengine] how to get the id of key of SelfReferenceProperty

2010-07-13 Thread Robert Kluin
SelfReferenceProperty should just return a db.Key.  So assuming the property is 
set, normal Key methods should work. 

I have two suggestions:
1) Unless you are intending to dereference (ie perform another db.get()) those 
entities, use the get_value_for_datastore method.
http://code.google.com/appengine/docs/python/datastore/propertyclass.html#Property_get_value_for_datastore

And,
2)  Avoid using Parent as a property name, parent is reserved. That is just 
asking for bugs caused due to a easy to make typo. 
http://code.google.com/appengine/docs/python/datastore/modelclass.html#Disallowed_Property_Names


Robert



On Jul 13, 2010, at 12:14, saintthor saintt...@gmail.com wrote:

 class x( db.Model ):
yy = db.ReferenceProperty( y )
Parent = db.SelfReferenceProperty()
 
 use yy.key().id() is ok, but Parent.key().id() is invalid. tell me
 SelfReferenceProperty have no attribute Key.
 
 how to get the key id then?
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/google-appengine?hl=en.
 

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