[appengine-java] Re: JDO Collection of Serializables

2010-07-07 Thread l.denardo
If you are using a serialized field you must add the serialized=true
clause to your annotation

@Persistent(serialized=true)
MySerializableObject serializable;

Also notice that JDO does not automatically detect if you update only
the inner fields of the object you save, so you must substitute it
with a copy to have it persisted.
See this post for a very good overview and an explanation of the fact
above:

http://groups.google.com/group/google-appengine-java/browse_thread/thread/747ceed8396c0ed8/b311227fbe4d9304?lnk=gstq=serialized+fields+snippets+work#b311227fbe4d9304

Regards
Lorenzo

On Jul 7, 1:33 am, laserjim laser...@gmail.com wrote:
 Hello,

 I'm still trying to persist a list of serializable objects. I would
 expect this to be a standard collection as described 
 here:http://code.google.com/appengine/docs/java/datastore/dataclasses.html...

 FooObject is serializable, but my attempt gave me an exception:
 FooObject is not a supported property type.

 Everything works as expected if I replace my serializable class
 (FooObject) with String.

 How can I persist my list of FooObjects using JDO?

 Thanks!

-- 
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 to get the BlobKey from a file which was uploaded

2010-07-07 Thread Alexander Orlov
I want to get the BlobKey from a file a user has uploaded to link the
BlobKey to other information.

First I retrieve a post URL to upload the blob:

val blobstoreService = BlobstoreServiceFactory.getBlobstoreService
return blobstoreService.createUploadUrl(/)

Than I do a simple doPost() to post the file to the retrieved post
URL. But doPost is a void method and don't provide any return value.

Is there a method which provides a return value (the BlobKey) for the
file that was uploaded?

-Alex

-- 
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: JDO Collection of Serializables

2010-07-07 Thread laserjim
Hello Lorenzo,

Thanks, but perhaps my question wasn't clear.  I'm trying to make a
list of serialized objects, NOT a serialized list of objects.

For instance, assuming FooObject implements Serializable...

@Element(serialized=true)
ListFooObject foos = new ArrayListFooObject();

Unfortunately, the list is always empty.  Not quite sure why.

Thanks!


On Jul 7, 2:59 am, l.denardo lorenzo.dena...@gmail.com wrote:
 If you are using a serialized field you must add the serialized=true
 clause to your annotation

 @Persistent(serialized=true)
 MySerializableObject serializable;

 Also notice that JDO does not automatically detect if you update only
 the inner fields of the object you save, so you must substitute it
 with a copy to have it persisted.
 See this post for a very good overview and an explanation of the fact
 above:

 http://groups.google.com/group/google-appengine-java/browse_thread/th...

 Regards
 Lorenzo

 On Jul 7, 1:33 am, laserjim laser...@gmail.com wrote:



  Hello,

  I'm still trying to persist a list of serializable objects. I would
  expect this to be a standard collection as described 
  here:http://code.google.com/appengine/docs/java/datastore/dataclasses.html...

  FooObject is serializable, but my attempt gave me an exception:
  FooObject is not a supported property type.

  Everything works as expected if I replace my serializable class
  (FooObject) with String.

  How can I persist my list of FooObjects using JDO?

  Thanks!

-- 
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: JDO Collection of Serializables

2010-07-07 Thread l.denardo
Hello,
I guess your problem is the behavior of serialized fields (including
collections of them, as far as I know), which is explained in Max
Ross's post.
Or something related to that.

Anyway, some property fields are marked as updated and hence saved
in the datastore only if you update the reference to the field, and
they're not updated if you just use modifiers to operate on them.
In practice, something like

 ArrayListFoo list = retrieve from datastore
list.add(Foo foo)
close persistence manager

Does not modify the list in the datastore, so if it's saved as an
empty list at creation it remains empty.
Doing

 ArrayListFoo list = retrieve from datastore
 ArrayList copy = new ArrayList(list);
 copy.add(Foo foo)
 list = copy;
close PM

Usually makes everything work, since the original list field is marked
as updated and persisted.
As far as I know this is true both for serialized fields and for many
collections.

Regards
Lorenzo

On Jul 7, 1:28 pm, laserjim laser...@gmail.com wrote:
 Hello Lorenzo,

 Thanks, but perhaps my question wasn't clear.  I'm trying to make a
 list of serialized objects, NOT a serialized list of objects.

 For instance, assuming FooObject implements Serializable...

 @Element(serialized=true)
 ListFooObject foos = new ArrayListFooObject();

 Unfortunately, the list is always empty.  Not quite sure why.

 Thanks!

 On Jul 7, 2:59 am, l.denardo lorenzo.dena...@gmail.com wrote:

  If you are using a serialized field you must add the serialized=true
  clause to your annotation

  @Persistent(serialized=true)
  MySerializableObject serializable;

  Also notice that JDO does not automatically detect if you update only
  the inner fields of the object you save, so you must substitute it
  with a copy to have it persisted.
  See this post for a very good overview and an explanation of the fact
  above:

 http://groups.google.com/group/google-appengine-java/browse_thread/th...

  Regards
  Lorenzo

  On Jul 7, 1:33 am, laserjim laser...@gmail.com wrote:

   Hello,

   I'm still trying to persist a list of serializable objects. I would
   expect this to be a standard collection as described 
   here:http://code.google.com/appengine/docs/java/datastore/dataclasses.html...

   FooObject is serializable, but my attempt gave me an exception:
   FooObject is not a supported property type.

   Everything works as expected if I replace my serializable class
   (FooObject) with String.

   How can I persist my list of FooObjects using JDO?

   Thanks!

-- 
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] Facing errors when installing the google plugin for eclipse.

2010-07-07 Thread Jason Parekh
This might be happening because of a flaky internet connection.  You can try
again (it's been 2 days since you originally posted) or download the
standalone zip file of the plugin which you unzip into your eclipse/dropins
directory.  See http://code.google.com/eclipse/docs/install-from-zip.html for
GPE 1.3.

jason

On Mon, Jul 5, 2010 at 12:34 PM, Siddharth Naik catchsiddha...@gmail.comwrote:

 Hi,

 I face an error regarding 'String index out of range 0'. I am using
 Eclipse Galileo and jdk 1.6.0_03 32 bit.

 Thanks.

 Below is the complete error log.

 --

 !SESSION 2010-07-04 19:47:36.550
 ---
 eclipse.buildId=M20100211-1343
 java.version=1.6.0_03
 java.vendor=Sun Microsystems Inc.
 BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
 Framework arguments:  XX:MaxPermSize=256M
 Command-line arguments:  -os win32 -ws win32 -arch x86
 XX:MaxPermSize=256M

 !ENTRY org.eclipse.ecf.provider.filetransfer 4 1001 2010-07-04
 19:58:46.294
 !MESSAGE Transfer Exception
 !STACK 0
 java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at

 org.apache.commons.httpclient.ContentLengthInputStream.read(ContentLengthInputStream.java:
 170)
at java.io.FilterInputStream.read(FilterInputStream.java:116)
at

 org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:
 108)
at java.io.FilterInputStream.read(FilterInputStream.java:90)
at

 org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:
 127)
at
 org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer
 $1.performFileTransfer(AbstractRetrieveFileTransfer.java:140)
at
 org.eclipse.ecf.filetransfer.FileTransferJob.run(FileTransferJob.java:
 73)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

 !ENTRY org.eclipse.equinox.p2.engine 4 4 2010-07-04 20:04:00.360
 !MESSAGE An error occurred while installing the items
 !SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2010-07-04 20:04:00.360
 !MESSAGE session context was:(profile=SDKProfile,
 phase=org.eclipse.equinox.internal.provisional.p2.engine.phases.Install,
 operand=null -- [R]com.google.appengine.eclipse.core
 1.3.3.v201006111302,

 action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction).
 !SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2010-07-04 20:04:00.360
 !MESSAGE String index out of range: 0
 !STACK 0
 java.lang.StringIndexOutOfBoundsException: String index out of range:
 0
at java.lang.String.charAt(String.java:687)
at

 org.eclipse.equinox.internal.frameworkadmin.equinox.ParserUtils.getValueForArgument(ParserUtils.java:
 124)
at

 org.eclipse.equinox.internal.frameworkadmin.equinox.EclipseLauncherParser.getStartup(EclipseLauncherParser.java:
 224)
at

 org.eclipse.equinox.internal.frameworkadmin.equinox.EclipseLauncherParser.read(EclipseLauncherParser.java:
 59)
at

 org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxManipulatorImpl.loadWithoutFwPersistentData(EquinoxManipulatorImpl.java:
 358)
at

 org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxManipulatorImpl.load(EquinoxManipulatorImpl.java:
 331)
at

 org.eclipse.equinox.internal.p2.touchpoint.eclipse.LazyManipulator.loadDelegate(LazyManipulator.java:
 50)
at

 org.eclipse.equinox.internal.p2.touchpoint.eclipse.LazyManipulator.getConfigData(LazyManipulator.java:
 108)
at

 org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction.installBundle(InstallBundleAction.java:
 76)
at

 org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction.execute(InstallBundleAction.java:
 29)
at

 org.eclipse.equinox.internal.p2.engine.ParameterizedProvisioningAction.execute(ParameterizedProvisioningAction.java:
 35)
at

 org.eclipse.equinox.internal.provisional.p2.engine.Phase.mainPerform(Phase.java:
 129)
at

 org.eclipse.equinox.internal.provisional.p2.engine.Phase.perform(Phase.java:
 72)
at

 org.eclipse.equinox.internal.provisional.p2.engine.PhaseSet.perform(PhaseSet.java:
 44)
at

 org.eclipse.equinox.internal.provisional.p2.engine.Engine.perform(Engine.java:
 54)
at

 org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil.performProvisioningPlan(ProvisioningUtil.java:
 389)
at

 org.eclipse.equinox.internal.provisional.p2.ui.operations.ProfileModificationOperation.doExecute(ProfileModificationOperation.java:
 61)
at

 

Re: [appengine-java] DataNucleus Enhancer failed to run

2010-07-07 Thread Jason Parekh
Hi Ravi,

You might try moving your workspace closer to the root directory, for
example from C:\Some\Long\Path\To\Your\Workspace to C:\Workspace.  We're
tracking this issue in
http://code.google.com/p/google-web-toolkit/issues/detail?id=4395 .

jason

On Sun, Jul 4, 2010 at 1:53 PM, Ravi ping2r...@gmail.com wrote:

 Hi,
 I was working happily, changed few lines of java code(didnt touch any
 eclipse setting or installed any thing new or added extar jar in
 classpth) and then started getting follwoing error. Please help spent
 half a day and not able to understand how this error emerged. Googled
 this error an dpeople are saying that if classpth goes long then this
 error comes but i have not changed classpth since few days, just
 writing new java files.

 DataNucleus Enhancer has encountered a problem

 Error
 Sun Jul 04 18:45:14 BST 2010
 Cannot run program C:\Program Files (x86)\Java\jdk1.6.0_17\bin
 \javaw.exe (in directory Y:\projects\New-Eclipse-Workspace
 \TestGwt): CreateProcess error=87, The parameter is incorrect


 eclipse.buildId=
 java.version=1.6.0_20
 java.vendor=Sun Microsystems Inc.
 BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_GB
 Framework arguments:  -product org.eclipse.epp.package.jee.product
 Command-line arguments:  -os win32 -ws win32 -arch x86 -product
 org.eclipse.epp.package.jee.product -clean



 java.io.IOException: Cannot run program C:\Program Files (x86)\Java
 \jdk1.6.0_17\bin\javaw.exe (in directory Y:\projects\New-Eclipse-
 Workspace\TestGwt): CreateProcess error=87, The parameter is
 incorrect
 at java.lang.ProcessBuilder.start(Unknown Source)
 at

 com.google.gdt.eclipse.core.ProcessUtilities.launchProcessAndActivateOnError(ProcessUtilities.java:
 195)
 at

 com.google.appengine.eclipse.core.orm.enhancement.EnhancerJob.runInWorkspace(EnhancerJob.java:
 78)
 at

 org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:
 38)
 at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
 Caused by: java.io.IOException: CreateProcess error=87, The parameter
 is incorrect
 at java.lang.ProcessImpl.create(Native Method)
 at java.lang.ProcessImpl.init(Unknown Source)
 at java.lang.ProcessImpl.start(Unknown Source)
 ... 5 more

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



Re: [appengine-java] Desarrollo de Aplicaciones con Eclipse

2010-07-07 Thread Guillermo Schwarz
Edixon,


¿Lo quieres hacer en Google Application Engine?

Saludos,
Guillermo.

2010/7/6 Edixon Polanco edixon...@gmail.com

 Buenas Tardes.

 Como puedo empezar a desarrollar una aplicación que funcione como una
 biblioteca en la cual pueda subir mis archivos o libros y poder buscar
 dentro de ellos

 Nota: Espero me puedan dar alguna idea

 Gracias.

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




-- 
Saludos cordiales,

Guillermo Schwarz
Sun Certified Enterprise Architect

-- 
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: Confused by jdo relationships

2010-07-07 Thread poe
I've got a question regarding this.

Isn't it kind of nicer regarding the design to not store relational
Attributes in a core table/class. In the given example I would
implement this like this:


@PersistenceCapable
public class Categories
{
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long Id;

No owned or unowner object here
...
}

@PersistenceCapable
public class CategoryGroups
{
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long Id;
...
}

@PersistenceCapable
public class CategoryGroupRelation {


   @PrimaryKey
   @Persistent(mappedBy=category)
   private Long categoryId;

   @Persistent(mappedBy=categorygroups
   private Long categoryGroupId;

}

Isn't it better to design the tables this way? I don't like relational
attributes in a core database class. What do you think?

Greets
Poe


On 7 Jul., 01:25, AC acol...@gmail.com wrote:
 Thanks.  That answers my question.

 On Jul 6, 3:18 pm, Ravi Sharma ping2r...@gmail.com wrote:



  You need to understand the concept of Entity group here, and need to
  understand the owned relation and unowned relation.
  Think of owned and unowned relation like this
  You(your house) and your TV has owned relationship, your house has TV, no ne
  can see it from outside, and if your friend want the same tv he need to buy
  the same TV and own it. And at one point if you ask who all watching my TV
  then it will be just you not your friend as he has his own TV(although same
  kind of TV).

  But You and your favourite movie theatre has unowned relationship, you dont
  own it, anyone who knows the address of theatre can go and watch movie. and
  at one moment 1000s of people might be watching the same movie/theatre

  Back to your question.

  Categories(3)/CategoryGroups(4)     is an example for owned relation.
  CategoryGroup(4) will be available to Category(3) only and if you create
  another category Cateory(10) with same category group it will just create
  another version of categoryGroup CategoryGroup(11) in that category. But you
  may see that CategoryGroup 11 and CategoryGroup 4 both are Entertainment.

  In your case many categories can have same categoryGroup.So instead of using
  owned relationship, you should use unowned relationship.

  Instead of this
  @Persistent
     private CategoryGroups Group;

  define this
  @Persistent
     private Key categoryGroupId;

  and save key of CategoryGroup rather then full object. (Dont buy a TV for
  every other rmovie you want to watch, just buy a movie theatre ticket go
  there and use that :) )

  I hope u get the idea,  you can learn more from here

 http://code.google.com/appengine/docs/java/datastore/relationships.html

  spare me if you dont like my example... :)

  Ravi.

  On Tue, Jul 6, 2010 at 5:47 PM, AC acol...@gmail.com wrote:
   I just started fooling around w/ GAE this weekend.

   I have a Categories class and a CategoryGroup class.  The idea is that
   every category must be grouped.  For example the CategoryGroup
   Entertainment can be assigned to many Categories, such as movies,
   music and television.

   Here are my classes.

   @PersistenceCapable
   public class Categories
   {
     �...@primarykey
     �...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
          private Key Id;

     �...@persistent
      private CategoryGroups Group;

         �...@persistent
          private boolean IsDeleted;

         �...@persistent
          private String Name;

         �...@persistent
          private Date CreateDate;

         �...@persistent
         �...@column(allowsNull=true)
      private Date ModifiedDate;
   }

   @PersistenceCapable
   public class CategoryGroups
   {
         �...@primarykey
     �...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
          private Key Id;

         �...@persistent
      boolean IsDeleted;

         �...@persistent
      String Name;

         �...@persistent
      Date CreateDate;

         �...@persistent
         �...@column(allowsNull=true)
      Date ModifiedDate;
   }

   First I add a record to CategoryGroups.  When I query all, the reult
   is :

   CategoryGroups(2)

   Next, I add a record to Categories.  When I query all CategoryGroups,
   the result is :

   Categories(3)/CategoryGroups(4)
   CategoryGroups(2)

   I do not doubt that this works as it was designed to, however, coming
   from a RDBMS background, this is very confusing to me.  The screen I
   created to manage Categories now has Entertainment listed twice in
   the CategoryGroups select box.  Is there a better approach to achieve
   my goal?

   Any advice is much appreciated.

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

[appengine-java] How to write to log file

2010-07-07 Thread MANISH DHIMAN
Hi All
I want to write to a log file , please give me some details about it.

-- 
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] How to write to log file

2010-07-07 Thread Pieter Coucke
You can not log to a file, but App Engine has a log console.

See
http://code.google.com/intl/nl-BE/appengine/docs/java/runtime.html#Logging


On Wed, Jul 7, 2010 at 4:37 PM, MANISH DHIMAN manisd...@gmail.com wrote:

 Hi All
 I want to write to a log file , please give me some details about it.

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




-- 
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 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: Confused by jdo relationships

2010-07-07 Thread Ravi Sharma
Hi Poe,
You have just implemented relational many to many relation. 

But this design is perfectly fine but just think if you need one to many 
relation only then in your case you will be writing 2 entities while u could 
just write one by saving catehoryGroup id in category it self.
And when u want to read category and catehorygroup, u need to read three 
entities while u could read just two.

So for one to many relations I will use unowned relation and save some write 
and read :).

GAE doesn't say u can't think relational :).

Thanks
Ravi

Sent from my iPhone

On 7 Jul 2010, at 15:18, poe stefan.poe...@googlemail.com wrote:

 I've got a question regarding this.
 
 Isn't it kind of nicer regarding the design to not store relational
 Attributes in a core table/class. In the given example I would
 implement this like this:
 
 
 @PersistenceCapable
 public class Categories
 {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long Id;
 
No owned or unowner object here
...
 }
 
 @PersistenceCapable
 public class CategoryGroups
 {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long Id;
...
 }
 
 @PersistenceCapable
 public class CategoryGroupRelation {
 
 
   @PrimaryKey
   @Persistent(mappedBy=category)
   private Long categoryId;
 
   @Persistent(mappedBy=categorygroups
   private Long categoryGroupId;
 
 }
 
 Isn't it better to design the tables this way? I don't like relational
 attributes in a core database class. What do you think?
 
 Greets
 Poe
 
 
 On 7 Jul., 01:25, AC acol...@gmail.com wrote:
 Thanks.  That answers my question.
 
 On Jul 6, 3:18 pm, Ravi Sharma ping2r...@gmail.com wrote:
 
 
 
 You need to understand the concept of Entity group here, and need to
 understand the owned relation and unowned relation.
 Think of owned and unowned relation like this
 You(your house) and your TV has owned relationship, your house has TV, no ne
 can see it from outside, and if your friend want the same tv he need to buy
 the same TV and own it. And at one point if you ask who all watching my TV
 then it will be just you not your friend as he has his own TV(although same
 kind of TV).
 
 But You and your favourite movie theatre has unowned relationship, you dont
 own it, anyone who knows the address of theatre can go and watch movie. and
 at one moment 1000s of people might be watching the same movie/theatre
 
 Back to your question.
 
 Categories(3)/CategoryGroups(4) is an example for owned relation.
 CategoryGroup(4) will be available to Category(3) only and if you create
 another category Cateory(10) with same category group it will just create
 another version of categoryGroup CategoryGroup(11) in that category. But you
 may see that CategoryGroup 11 and CategoryGroup 4 both are Entertainment.
 
 In your case many categories can have same categoryGroup.So instead of using
 owned relationship, you should use unowned relationship.
 
 Instead of this
 @Persistent
private CategoryGroups Group;
 
 define this
 @Persistent
private Key categoryGroupId;
 
 and save key of CategoryGroup rather then full object. (Dont buy a TV for
 every other rmovie you want to watch, just buy a movie theatre ticket go
 there and use that :) )
 
 I hope u get the idea,  you can learn more from here
 
 http://code.google.com/appengine/docs/java/datastore/relationships.html
 
 spare me if you dont like my example... :)
 
 Ravi.
 
 On Tue, Jul 6, 2010 at 5:47 PM, AC acol...@gmail.com wrote:
 I just started fooling around w/ GAE this weekend.
 
 I have a Categories class and a CategoryGroup class.  The idea is that
 every category must be grouped.  For example the CategoryGroup
 Entertainment can be assigned to many Categories, such as movies,
 music and television.
 
 Here are my classes.
 
 @PersistenceCapable
 public class Categories
 {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key Id;
 
@Persistent
private CategoryGroups Group;
 
@Persistent
private boolean IsDeleted;
 
@Persistent
private String Name;
 
@Persistent
private Date CreateDate;
 
@Persistent
@Column(allowsNull=true)
private Date ModifiedDate;
 }
 
 @PersistenceCapable
 public class CategoryGroups
 {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key Id;
 
@Persistent
boolean IsDeleted;
 
@Persistent
String Name;
 
@Persistent
Date CreateDate;
 
@Persistent
@Column(allowsNull=true)
Date ModifiedDate;
 }
 
 First I add a record to CategoryGroups.  When I query all, the reult
 is :
 
 CategoryGroups(2)
 
 Next, I add a record to Categories.  When I query all CategoryGroups,
 the result is :
 
 Categories(3)/CategoryGroups(4)
 CategoryGroups(2)
 
 I do not doubt that this works as it was designed to, however, coming

[appengine-java] Re: Confused by jdo relationships

2010-07-07 Thread poe
Hi Ravi,

the relation is still a one to one relation because the
categoryGroupRelation holds a categoryId as a primary Key, so the
relation only holds one or zero categoryId for ever Category and
thereby every Category has only one CategoryGroup.

But my question is more about design principles. Isn't it better to
separate the data from relations? Lets say you create a User class on
the first Version of you App. You store thinks like eMail, names,
birthdays and so on in this class. In a second version of you App you
want to extend the database schema with user groups. By then you only
need to add two new classes Groups and UserGroupsRelations to
accomplish this and don't need to extends or alter the original User
class (Think about altering all the old User objects that are still in
the datastore, what are the inital values for this new attribute?).

There is another advantage: If you implement the userGroups relation
in the UserClass you only get all Users from one Group by making a
query over all Users insted of just checking the relations. You could
simply get allUsersFromAGroup and allGroupsFromAUser over this class.

Tell me how you would implement this and what are your experiences?

Thanks and greetings
Poe

On 7 Jul., 16:46, Ravi Sharma ping2r...@gmail.com wrote:
 Hi Poe,
 You have just implemented relational many to many relation.

 But this design is perfectly fine but just think if you need one to many 
 relation only then in your case you will be writing 2 entities while u could 
 just write one by saving catehoryGroup id in category it self.
 And when u want to read category and catehorygroup, u need to read three 
 entities while u could read just two.

 So for one to many relations I will use unowned relation and save some write 
 and read :).

 GAE doesn't say u can't think relational :).

 Thanks
 Ravi

 Sent from my iPhone

 On 7 Jul 2010, at 15:18, poe stefan.poe...@googlemail.com wrote:



  I've got a question regarding this.

  Isn't it kind of nicer regarding the design to not store relational
  Attributes in a core table/class. In the given example I would
  implement this like this:

  @PersistenceCapable
  public class Categories
  {
    �...@primarykey
    �...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
         private Long Id;

     No owned or unowner object here
     ...
  }

  @PersistenceCapable
  public class CategoryGroups
  {
        �...@primarykey
    �...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
         private Long Id;
     ...
  }

  @PersistenceCapable
  public class CategoryGroupRelation {

    @PrimaryKey
    @Persistent(mappedBy=category)
    private Long categoryId;

    @Persistent(mappedBy=categorygroups
    private Long categoryGroupId;

  }

  Isn't it better to design the tables this way? I don't like relational
  attributes in a core database class. What do you think?

  Greets
  Poe

  On 7 Jul., 01:25, AC acol...@gmail.com wrote:
  Thanks.  That answers my question.

  On Jul 6, 3:18 pm, Ravi Sharma ping2r...@gmail.com wrote:

  You need to understand the concept of Entity group here, and need to
  understand the owned relation and unowned relation.
  Think of owned and unowned relation like this
  You(your house) and your TV has owned relationship, your house has TV, no 
  ne
  can see it from outside, and if your friend want the same tv he need to 
  buy
  the same TV and own it. And at one point if you ask who all watching my TV
  then it will be just you not your friend as he has his own TV(although 
  same
  kind of TV).

  But You and your favourite movie theatre has unowned relationship, you 
  dont
  own it, anyone who knows the address of theatre can go and watch movie. 
  and
  at one moment 1000s of people might be watching the same movie/theatre

  Back to your question.

  Categories(3)/CategoryGroups(4)     is an example for owned relation.
  CategoryGroup(4) will be available to Category(3) only and if you create
  another category Cateory(10) with same category group it will just create
  another version of categoryGroup CategoryGroup(11) in that category. But 
  you
  may see that CategoryGroup 11 and CategoryGroup 4 both are Entertainment.

  In your case many categories can have same categoryGroup.So instead of 
  using
  owned relationship, you should use unowned relationship.

  Instead of this
  @Persistent
     private CategoryGroups Group;

  define this
  @Persistent
     private Key categoryGroupId;

  and save key of CategoryGroup rather then full object. (Dont buy a TV for
  every other rmovie you want to watch, just buy a movie theatre ticket go
  there and use that :) )

  I hope u get the idea,  you can learn more from here

 http://code.google.com/appengine/docs/java/datastore/relationships.html

  spare me if you dont like my example... :)

  Ravi.

  On Tue, Jul 6, 2010 at 5:47 PM, AC acol...@gmail.com wrote:
  I just started fooling around w/ GAE this weekend.

  I have a 

[appengine-java] Frustrations with Performance

2010-07-07 Thread praseed
Folks,

I hope I have the right audience.

I am an Independent Software Vendor (read: small software business)
and I have developed a GWT/GAE product.

Things were good during development (plugin et al). I was able to get
features developed quickly.

However, the application performance these days has been dicey to say
the least.

A simple click of a button tends to get 5 to 6 seconds to respond at
times. Dont have any concurrent users right now. The Appspot dashboard
does not show any issues and I am well below the quota.

I have upgraded to the latest GAE engine.

The App is absolutely horrendous to use due to this. As an ISV, I
cannot demo this to my prospective customers and I cant market the
cloud availability, Google performance etc.., -- coz that seems to be
the downfall of my app.

The App performs way better on my laptop. The moment it is deployed,
it is bloody slow.

I am aware of the current datastore issues at Google. Is that the sole
reason for this , almost pervasive issue?

Google AppEngine for Business has been announced. Any time tables?
Will it address these issues?

Can someone address this? How about other developers? Can anyone chime
in here...

Cheers
Strawman

-- 
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: JDO Collection of Serializables

2010-07-07 Thread laserjim
Hey,

I agree that your comments above are true for serialized fields, but I
can't find any documentation indicating such a behavior for
collections (I assume supported collections here, as described in
dataclasses#Collections).  My understanding is that a collection
should behave correctly (inserts, deletes, etc) unless the list its
self is serialized.  Can you provide a counter-example?

With regards to the article Max Ross wrote (very good article by the
way), the trick he used (where he made a copy in order to change the
reference) was intended to dirty the state when a member is
modified.  My FooObjects are immutable, so I don't think this applies
to me.  Max Ross' article is completely consistent with my
understanding of the documentation, but it's entirely possible I
missed something, so let me know if this doesn't sound right to you.

I BELIEVE the issue I'm running into is rooted in the exception I get
when trying to persist a populated instance of the list: FooObject is
not a supported property type.  I'm just not understanding why it
isn't supported.  I would have expected that any serializable object
would be permitted, especially if the @Element(serialized=true)
annotation is specified.

Basically, I'm looking for a code fragment that demonstrates the
persistence of a collection of (more than one) non-standard
serializable objects.

Any ideas?

Thanks!


On Jul 7, 5:05 am, l.denardo lorenzo.dena...@gmail.com wrote:
 Hello,
 I guess your problem is the behavior of serialized fields (including
 collections of them, as far as I know), which is explained in Max
 Ross's post.
 Or something related to that.

 Anyway, some property fields are marked as updated and hence saved
 in the datastore only if you update the reference to the field, and
 they're not updated if you just use modifiers to operate on them.
 In practice, something like

  ArrayListFoo list = retrieve from datastore
 list.add(Foo foo)
 close persistence manager

 Does not modify the list in the datastore, so if it's saved as an
 empty list at creation it remains empty.
 Doing

  ArrayListFoo list = retrieve from datastore
  ArrayList copy = new ArrayList(list);
  copy.add(Foo foo)
  list = copy;
 close PM

 Usually makes everything work, since the original list field is marked
 as updated and persisted.
 As far as I know this is true both for serialized fields and for many
 collections.

 Regards
 Lorenzo

 On Jul 7, 1:28 pm, laserjim laser...@gmail.com wrote:



  Hello Lorenzo,

  Thanks, but perhaps my question wasn't clear.  I'm trying to make a
  list of serialized objects, NOT a serialized list of objects.

  For instance, assuming FooObject implements Serializable...

  @Element(serialized=true)
  ListFooObject foos = new ArrayListFooObject();

  Unfortunately, the list is always empty.  Not quite sure why.

  Thanks!

  On Jul 7, 2:59 am, l.denardo lorenzo.dena...@gmail.com wrote:

   If you are using a serialized field you must add the serialized=true
   clause to your annotation

   @Persistent(serialized=true)
   MySerializableObject serializable;

   Also notice that JDO does not automatically detect if you update only
   the inner fields of the object you save, so you must substitute it
   with a copy to have it persisted.
   See this post for a very good overview and an explanation of the fact
   above:

  http://groups.google.com/group/google-appengine-java/browse_thread/th...

   Regards
   Lorenzo

   On Jul 7, 1:33 am, laserjim laser...@gmail.com wrote:

Hello,

I'm still trying to persist a list of serializable objects. I would
expect this to be a standard collection as described 
here:http://code.google.com/appengine/docs/java/datastore/dataclasses.html...

FooObject is serializable, but my attempt gave me an exception:
FooObject is not a supported property type.

Everything works as expected if I replace my serializable class
(FooObject) with String.

How can I persist my list of FooObjects using JDO?

Thanks!

-- 
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] Turning on GWT in the project causes class not found excepction in my appengine code.

2010-07-07 Thread emurmur
I have an Java App Engine project using SDK 1.3.5 and the latest
Restlet GAE 2.0rc4 to implement some restful services.  Everything
worked well (this has been in product for 6 months) until I added GWT
to the project.  As soon as I check GWT on in the control panel
(without even adding a module) my services start to fail in the
development server with the following class not found exception:

Couldn't write the XML representation: Provider
org.apache.xalan.processor.TransformerFactoryImpl not found

Any clues why simply turning GWT on would cause this?  Any solutions
that you know of?  Thanks much.

-- 
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 to use the data in local datastore uploaded by bulk loader?

2010-07-07 Thread Fox W
Hi,every one!
I uploaded some data into local datastore, but I found Python and Java
are using different files to store data.
I want to debug my program in local, is there any solution?
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.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Spring Security + GAE

2010-07-07 Thread oserra
And could you please provide us an example of your dispacher-
servlet.xml (or whatever spring file you use to configure spring-
security)?
I don't use GWT.

Thank you very much.


On 12 jun, 15:26, Sudhir Ramanandi sramana...@gmail.com wrote:
 I have Spring security running properly on GAE...  But I don't use GWT..
 What help are you looking for...

 On Fri, Jun 11, 2010 at 11:39 PM, Cleber Dantas Silva 
 cle...@dxs.com.brwrote:





  Hi!

  I need help to integrate Spring Security 3.0.2 with GWT RPC Methods.

  Do you have any sample project or configuration to help me?

  Thanks!
  Cleber

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

 --
 Sudhir Ramanandihttp://www.ramanandi.org

-- 
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] Cannot see 'New Web Application' in New menu

2010-07-07 Thread John
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.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Context Denpency Injection

2010-07-07 Thread [Sh4d]
Will CDI (J2EE 6) play in App Engine?

-- 
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: SQL Like operator with %

2010-07-07 Thread Julian!
Hi There

searchWords is a List of User entity that contains All tokens?

the filter in de JDOQL  WHERE searchWords == \+tag.toUpperCase()+.
find some token in all elements on the List property ???


Thanks !!


On 2 jul, 06:49, RAVINDER MAAN rsmaan...@gmail.com wrote:
 we can set it in following way

   public class User {

 @Persistent(defaultFetchGroup=true)
 private SetString searchWords;

 public static void getCombination(String word,Set searchWords){
 word = word.trim().toUpperCase();
 if(word == null || .equals(word))
 return ;
 int wordLength = word.length();
 while(true){
 for(int i=0;iwordLength - 2;i++){
 searchWords.add(word.substring(i, wordLength));}

 for(int i=wordLength-1;i  1;i--){
 searchWords.add(word.substring(0, i));}

 word = word.substring(1,wordLength-1);
 wordLength = word.length();
 if(wordLength = 2)
 break;
 else
 searchWords.add(word);}
 return ;
 }

 public ListUser search(String tag){
 PersistenceManager pm = PMF.getPM();
 Transaction tx=pm.currentTransaction();
 try
 {
  tx.begin();

     Query q = pm.newQuery(javax.jdo.query.JDOQL,SELECT FROM
 +User.class.getName()+ WHERE searchWords == \+tag.toUpperCase()+\);
     q.setRange(0,10);
     ListUser c = (ListUser)q.execute();
     tx.commit();
     return c;}

 finally
 {
     if (tx.isActive())
     {
         tx.rollback();
     }

     pm.close();}

  }

 }

 You can modify getCombination the way you want.

 --

 Regards,
 Ravinder Singh Maan

-- 
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] Deployment failed (Client Error 400)

2010-07-07 Thread myownwaste...@googlemail.com
I constantly get these errors when deploying to appengine. Although
the development mode works:


java.io.IOException: Error posting to URL:
https://appengine.google.com/api/appversion/deploy?app_id=errai-demoversion=1;
400 Bad Request

Client Error (400)
The request is invalid for an unspecified reason.

-- 
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: SQL Like operator with %

2010-07-07 Thread RAVINDER MAAN
searchWords is list of strings.

On Wed, Jul 7, 2010 at 4:38 AM, Julian! julia...@gmail.com wrote:

 Hi There

 searchWords is a List of User entity that contains All tokens?

 the filter in de JDOQL  WHERE searchWords == \+tag.toUpperCase()+.
 find some token in all elements on the List property ???


 Thanks !!


 On 2 jul, 06:49, RAVINDER MAAN rsmaan...@gmail.com wrote:
  we can set it in following way
 
public class User {
 
  @Persistent(defaultFetchGroup=true)
  private SetString searchWords;
 
  public static void getCombination(String word,Set searchWords){
  word = word.trim().toUpperCase();
  if(word == null || .equals(word))
  return ;
  int wordLength = word.length();
  while(true){
  for(int i=0;iwordLength - 2;i++){
  searchWords.add(word.substring(i, wordLength));}
 
  for(int i=wordLength-1;i  1;i--){
  searchWords.add(word.substring(0, i));}
 
  word = word.substring(1,wordLength-1);
  wordLength = word.length();
  if(wordLength = 2)
  break;
  else
  searchWords.add(word);}
  return ;
  }
 
  public ListUser search(String tag){
  PersistenceManager pm = PMF.getPM();
  Transaction tx=pm.currentTransaction();
  try
  {
   tx.begin();
 
  Query q = pm.newQuery(javax.jdo.query.JDOQL,SELECT FROM
  +User.class.getName()+ WHERE searchWords ==
 \+tag.toUpperCase()+\);
  q.setRange(0,10);
  ListUser c = (ListUser)q.execute();
  tx.commit();
  return c;}
 
  finally
  {
  if (tx.isActive())
  {
  tx.rollback();
  }
 
  pm.close();}
 
   }
 
  }
 
  You can modify getCombination the way you want.
 
  --
 
  Regards,
  Ravinder Singh Maan

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




-- 
Regards,
Ravinder Singh Maan

-- 
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: JDO Collection of Serializables

2010-07-07 Thread laserjim
Hey,

I've attached some example code for reference:

public class FooObject implements Serializable
{
private final String name;
public FooObject(String name)
{
this.name = name;
}
public String toString()
{
return name;
}
}


@PersistenceCapable
public class Entity
{
@Element(serialized=true)
ListFooObject foos = new ArrayListFooObject();

public void addFoo(FooObject foo)
{
foos.add(foo);
}
public ListFooObject getFoos()
{
return foos;
}
}


Please let me know if you see the problem.

Thanks!


On Jul 7, 10:30 am, laserjim laser...@gmail.com wrote:
 Hey,

 I agree that your comments above are true for serialized fields, but I
 can't find any documentation indicating such a behavior for
 collections (I assume supported collections here, as described in
 dataclasses#Collections).  My understanding is that a collection
 should behave correctly (inserts, deletes, etc) unless the list its
 self is serialized.  Can you provide a counter-example?

 With regards to the article Max Ross wrote (very good article by the
 way), the trick he used (where he made a copy in order to change the
 reference) was intended to dirty the state when a member is
 modified.  My FooObjects are immutable, so I don't think this applies
 to me.  Max Ross' article is completely consistent with my
 understanding of the documentation, but it's entirely possible I
 missed something, so let me know if this doesn't sound right to you.

 I BELIEVE the issue I'm running into is rooted in the exception I get
 when trying to persist a populated instance of the list: FooObject is
 not a supported property type.  I'm just not understanding why it
 isn't supported.  I would have expected that any serializable object
 would be permitted, especially if the @Element(serialized=true)
 annotation is specified.

 Basically, I'm looking for a code fragment that demonstrates the
 persistence of a collection of (more than one) non-standard
 serializable objects.

 Any ideas?

 Thanks!

 On Jul 7, 5:05 am, l.denardo lorenzo.dena...@gmail.com wrote:



  Hello,
  I guess your problem is the behavior of serialized fields (including
  collections of them, as far as I know), which is explained in Max
  Ross's post.
  Or something related to that.

  Anyway, some property fields are marked as updated and hence saved
  in the datastore only if you update the reference to the field, and
  they're not updated if you just use modifiers to operate on them.
  In practice, something like

   ArrayListFoo list = retrieve from datastore
  list.add(Foo foo)
  close persistence manager

  Does not modify the list in the datastore, so if it's saved as an
  empty list at creation it remains empty.
  Doing

   ArrayListFoo list = retrieve from datastore
   ArrayList copy = new ArrayList(list);
   copy.add(Foo foo)
   list = copy;
  close PM

  Usually makes everything work, since the original list field is marked
  as updated and persisted.
  As far as I know this is true both for serialized fields and for many
  collections.

  Regards
  Lorenzo

  On Jul 7, 1:28 pm, laserjim laser...@gmail.com wrote:

   Hello Lorenzo,

   Thanks, but perhaps my question wasn't clear.  I'm trying to make a
   list of serialized objects, NOT a serialized list of objects.

   For instance, assuming FooObject implements Serializable...

   @Element(serialized=true)
   ListFooObject foos = new ArrayListFooObject();

   Unfortunately, the list is always empty.  Not quite sure why.

   Thanks!

   On Jul 7, 2:59 am, l.denardo lorenzo.dena...@gmail.com wrote:

If you are using a serialized field you must add the serialized=true
clause to your annotation

@Persistent(serialized=true)
MySerializableObject serializable;

Also notice that JDO does not automatically detect if you update only
the inner fields of the object you save, so you must substitute it
with a copy to have it persisted.
See this post for a very good overview and an explanation of the fact
above:

   http://groups.google.com/group/google-appengine-java/browse_thread/th...

Regards
Lorenzo

On Jul 7, 1:33 am, laserjim laser...@gmail.com wrote:

 Hello,

 I'm still trying to persist a list of serializable objects. I would
 expect this to be a standard collection as described 
 here:http://code.google.com/appengine/docs/java/datastore/dataclasses.html...

 FooObject is serializable, but my attempt gave me an exception:
 FooObject is not a supported property type.

 Everything works as expected if I replace my serializable class
 (FooObject) with String.

 How can I persist my list of FooObjects using JDO?

 Thanks!

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

Re: [appengine-java] can't figure out how to use JSTL to escape xml (guestbook tutorial)

2010-07-07 Thread Ikai L (Google)
If you already have EL enabled with this tag at the top of your page:

%@ page isELIgnored=false %

Can't you just use this?

blockquote${g.content}/blockquote

On Mon, Jul 5, 2010 at 9:44 PM, decitrig rws...@gmail.com wrote:

 In the tutorial, I've added the following to the guestbook.jsp file:

 %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %

 and made changed this:

 pb%= g.getAuthor().getNickname() %/b wrote:/p
 %
}
 %
 blockquotec:out value=${g.content} //blockquote
 %
}
}
pm.close();
 %

 I get no output from the c:out tag. I've tried a bunch of different
 variations and nothing seems to work: I can get a medley of my
 favorite exceptions, or no output, or the the literal text of the
 expression I was hoping to evaluate. I have searched around, and I can
 confirm the following:

 I have isELIgnored=false, I do not have any JSLT jar in my WEB-INF/
 lib directory. I also tried a jsp:useBean id=g
 class=guestbook.Greeting / tag, but I got an error about the value
 for the class attribute being invalid. Please help? I'm happy to
 provide additional code or debugging output, if someone can point me
 in the right direction.

 PS. Might I respectfully submit that this would be a good thing to
 include in the tutorial?

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




-- 
Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine

-- 
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] Turning on GWT in the project causes class not found excepction in my appengine code.

2010-07-07 Thread Ronmell Fuentes
Hi emurmur

Try to copy all .jar files used by your application to the following
directory.

workspace/yourApp/war/WEB-INF/lib

then, just restart your IDE, refresh the project and run it.

It should work.

Rgds.

Ronmell

2010/7/6 emurmur emur...@conceptuamath.com

 I have an Java App Engine project using SDK 1.3.5 and the latest
 Restlet GAE 2.0rc4 to implement some restful services.  Everything
 worked well (this has been in product for 6 months) until I added GWT
 to the project.  As soon as I check GWT on in the control panel
 (without even adding a module) my services start to fail in the
 development server with the following class not found exception:

 Couldn't write the XML representation: Provider
 org.apache.xalan.processor.TransformerFactoryImpl not found

 Any clues why simply turning GWT on would cause this?  Any solutions
 that you know of?  Thanks much.

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




-- 
ausencia de evidencia  ≠  evidencia de ausencia
http://culturainteractiva.blogspot.com/

-- 
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: Frustrations with Performance

2010-07-07 Thread Jake
Hey,

Are you getting frequent instance restarts?  Check the log for loading
requests.  This has been known to happen on sites with little-to-no
traffic.

Solution?  None, but if this issue is affecting you, star this:
http://code.google.com/p/googleappengine/issues/detail?id=2931

Jake

On Jul 7, 11:54 am, praseed prase...@gmail.com wrote:
 Folks,

 I hope I have the right audience.

 I am an Independent Software Vendor (read: small software business)
 and I have developed a GWT/GAE product.

 Things were good during development (plugin et al). I was able to get
 features developed quickly.

 However, the application performance these days has been dicey to say
 the least.

 A simple click of a button tends to get 5 to 6 seconds to respond at
 times. Dont have any concurrent users right now. The Appspot dashboard
 does not show any issues and I am well below the quota.

 I have upgraded to the latest GAE engine.

 The App is absolutely horrendous to use due to this. As an ISV, I
 cannot demo this to my prospective customers and I cant market the
 cloud availability, Google performance etc.., -- coz that seems to be
 the downfall of my app.

 The App performs way better on my laptop. The moment it is deployed,
 it is bloody slow.

 I am aware of the current datastore issues at Google. Is that the sole
 reason for this , almost pervasive issue?

 Google AppEngine for Business has been announced. Any time tables?
 Will it address these issues?

 Can someone address this? How about other developers? Can anyone chime
 in here...

 Cheers
 Strawman

-- 
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] Error: The API package 'urlfetch' or call 'Fetch()' was not found.

2010-07-07 Thread John Patterson
This RemoteDatastore  code does what you are after to allow you to  
upload and download data from the datastore from a normal JAva  
application.  You can copy the Environment stuff from there:


http://code.google.com/p/remote-datastore/source/browse/src/main/java/com/vercer/engine/proxy/RemoteDatastore.java#29

Line 29 sets the dummy environment

On 7 Jul 2010, at 20:33, [jake] wrote:


I'm using jetty outside of the dev_appserver.sh environment.

When I try to use com.google.appengine.api.urlfetch package, I get the
following error:

The API package 'urlfetch' or call 'Fetch()' was not found.
 [Thrown class com.google.apphosting.api.ApiProxy
$CallNotFoundException]

I don't get any errors trying to import
com.google.appengine.api.urlfetch so I think the problem lies in how I
set up an ApiProxy Environment.  I'm probably missing the relevant
entries to enable urlfetch.

Any tips on how to make this service available outside of the
dev_appserver.sh environment?

[jake]

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



[google-appengine] Re: Trouble Setting App Engine ID

2010-07-07 Thread cwaldbieser
This does not appear to work for me.
I have logged into the App Engine admin console using my gmail
account.
I try to create an app ID with the same name.  The program refuses.

Thanks,
Carl

On Jul 6, 3:17 pm, Matthew Blain matthew.bl...@google.com wrote:
 You should be able to create an application ID which matches an
 existing gmail account, but only when logged in to the current user.

 For example, if you have exam...@gmail.com and want to create
 example.appspot.com, you must log in to the App Engine admin console
 as 'exam...@gmail.com' and then create the 'example' application. You
 can then add additional developers to the application.

 --Matthew

 On Jul 5, 12:16 am, l.denardo lorenzo.dena...@gmail.com wrote:



  I think there's no way to do it.
  Gmail names seem to be locked for anyone, including the owner of the
  account. This happened to me too, and seems to be a frequent request
  from many of us.

  Regards
  Lorenzo

  On Jul 2, 9:03 pm, cwaldbieser cwaldbie...@gmail.com wrote:

   I read that if you have a GMail account, no one else can take that
   name for an App Engine ID.
   I created a GMail account with the name I wanted, but when I tried to
   create an app with that account, I was told by the page the name is
   taken!  It was not taken prior to me creating the new GMail account.
   Am I blocking the name of the app ID I want?  How do I correct this?

   Thanks,
   Carl

-- 
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 provide different custom domain name to different version of same application

2010-07-07 Thread Ganesh
I would request to someone (may be from app engine team) to comment on
this. Even if it is not possible, kindly let me know the same so that
I can look for some alternate.

Thanks
Ganesh Bansal.

On Jul 5, 11:38 am, Ganesh ganesh.ban...@gmail.com wrote:
 Hi

 We are also having same problem. Actually in my case, we ourself also
 use our application  gives it to our clients also. Whenever we
 release a beta version, we first give it to our internal team  when
 they feel it can be given to other clients, we give it to all our
 clients one by one over a period of time (it is same as gmail provides
 it's new feature to users over a period of time). So I can't separate
 my beta application  production environment as both need to use same
 datastore  as per my knowledge, 2 different applications can't use
 same datastore.

 So how I can setup version wise sub domains of my application. Any
 help/suggestion in this regard will be highly appreciable.

 Thanks
 Ganesh Bansal.

 On Jul 4, 4:03 pm, Claude Vedovini cla...@vedovini.net wrote:



  As far as I know this is not possible. To have a beta or test version
  of your app it is better to create a new application.
  It's especially a good practice since otherwise your production and
  your beta versions are going to share the same datastore which is not
  a good thing.
  Depending on changes you made to your beta they will apply to the
  prod's data which might not be able to handle them.
  Plus if you do testing with your beta you'll need test datasets and
  you don't want to mess with your prod

  HTH

  On Jul 3, 4:02 pm, Gaurav testmail.testu...@gmail.com wrote:

   Hello,

   I am developing my application on GoogleAppEngine  I want to know
   that how can I provide different domain names to different version of
   an application.

   Suppost my application is  app1  having two versions 1 (Default)
   and beta.Now these version can be accessible as :

   version 1  of app1 at :  http://app1.appspot.com
   version beta  of app1 at :  http://beta.latest.app1.appspot.com

   I want to associate these with my custom domain mydomain.com, such
   that :
               version 1  of app1 at :  http://mydomain.com
               version beta  of app1 at :  http://beta.mydomain.com

   I am able to make first association i.ehttp://mydomain.comfor
   version 1 but don't know how to associate http://beta.mydomain.com;
   with beta version...

   So please tell me how can I associate different subdomain with
   different versions of same application and Even is it possible or
   not...??

   I will be very great full for any guidance as I have already googled a
   lot but not found any relevant detail so far and stucked at this
   point...

   Thanks.

-- 
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] 5 transactional tasks

2010-07-07 Thread hawkett
Hi,

   This page - 
http://code.google.com/appengine/docs/python/datastore/transactions.html
- says that we cannot raise more than 5 transactional tasks in a
single transaction, and I wanted to check if this was a limit that you
were hoping to raise, or if this is likely to be a long term
restriction?  Does this restriction limit API calls to the task queue
or actual number of tasks -  e.g. could I raise more than 5 by doing
them in batch with a single call to the task queue API? Cheers,

Colin

-- 
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: Issue with admin access

2010-07-07 Thread Saxon Druce
My u...@myotherdomain.com account disappeared by itself from my app's
permissions list overnight. I re-added it, and then it worked fine
this time. If that was due to something which someone at Google did,
thanks!

Saxon

On Jul 2, 12:26 am, Saxon Druce saxondr...@gmail.com wrote:
 Hi,

 I am trying to set up the following:

 1. My app running atwww.mydomain.com
 2. Users can log in atwww.mydomain.com, using google accounts (not
 google apps)
 3. I can log in atwww.mydomain.com/admin, as an admin for my app

 To do this I have tried the following:

 a. Create a google apps account for mydomain.com
 b. Sign in towww.appspot.com/a/mydomain.com
 c. Create myapp, with google accounts authentication
 d. Add mydomain.com as a domain
 e. Add an alternative url ofwww.mydomain.com
 f. At this stage both points 1 and 2 above work
 g. In my app.yaml, add a handler for /admin with login: admin
 h. As expected I can't log in to /admin as my google apps account
 (because I chose google accounts authentication)
 i. So I create a google account (not google apps) for
 u...@myotherdomain.com
 j. While logged in towww.appspot.com/a/mydomain.com, invite
 u...@myotherdomain.com as an admin
 k. Log in to google as u...@myotherdomain.com
 l. Click the link in the invitation email, and accept
 m. If I log back in towww.appspot.com/a/mydomain.com, then
 u...@myotherdomain.com shows up as a user
 n. BUT if I log out and log in towww.appspot.comas
 u...@myotherdomain.com, then myapp is not listed
 o. AND if I go towww.mydomain.com/admin(or myapp.appspot.com/admin)
 and log in as u...@myotherdomain.com, then I get Error: Forbidden
 Your client does not have permission to get URL /admin from this
 server.

 Have I done something wrong?

 Is there a better way to achieve what I want? Maybe I should have
 created myapp under u...@myotherdomain.com, and then just done steps
 a, d and e?

 Thanks,
 Saxon

-- 
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 Started hangup with Eclipse

2010-07-07 Thread Blue Shoes
I am just now getting back to trying to use the GAE plug-in for
Eclipse. Here's a pertinent piece of information that relates to a
problem I will decribe below: I also have the Adobe Flash Builder plug-
in installed in Eclipse

The three GAE buttons appear in the tool bar as you described. But I
still do not have any GAE perspectives available, only perspectives
for Adobe Flash Builder, Java, CVS Repository, etc. If I open one of
those perspectives--say, Adobe Flash Builder--click on the GAE New
Web Application Project button in the toolbar, supply a project name,
etc., it creates a project, but the perspective is still the one for
Adobe Flash Builder and the context menus on the Explorer panel have
only menu items relating to Adobe Flash Builder.

What am I missing?



On Jul 2, 12:27 pm, Jaroslav Záruba jaroslav.zar...@gmail.com wrote:
 I don't think there will be need to pay anything. :) People are very helpful
 here.

 The plug-in does not install new perspective. You should see new item in
 Window - Preferences. And to some perspectives (Java, Debug,...) it adds
 three buttons.

 On Fri, Jul 2, 2010 at 2:48 AM, Blue Shoes anderson.ala...@gmail.comwrote:



  I am starting from scratch and have attempted to follow the directions
  at Getting Started. I got so far as downloading and installing the
  GAE plug-in for Eclipse, but I do not see it as an available Eclipse
  perspective. I am admittedly not expert on Eclipse, but what might be
  my problem? For what it is worth, I have GoToMeeting with which a can
  connect remotely to somebody and show them my screen and give them
  control of my keyboard and mouse. I would be willing to pay a
  reasonable fee for help in overcoming these Getting Started snags.

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



  Google Eclipse plug-in.png
 40KViewDownload- Hide quoted text -

 - Show quoted text -

-- 
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 Started hangup with Eclipse

2010-07-07 Thread Blue Shoes
How does one invoke the New wizard? If I choose File | New, it
displays a submenu (not a wizard) that had only Adobe Flex stuff on
it.





On Jul 2, 12:31 pm, Jaroslav Záruba jaroslav.zar...@gmail.com wrote:
 Oh, and obviously you should see couple of new options under the New wizard,
 see attachment.

 2010/7/2 Jaroslav Záruba jaroslav.zar...@gmail.com



  I don't think there will be need to pay anything. :) People are very
  helpful here.

  The plug-in does not install new perspective. You should see new item in
  Window - Preferences. And to some perspectives (Java, Debug,...) it adds
  three buttons.

  On Fri, Jul 2, 2010 at 2:48 AM, Blue Shoes anderson.ala...@gmail.comwrote:

  I am starting from scratch and have attempted to follow the directions
  at Getting Started. I got so far as downloading and installing the
  GAE plug-in for Eclipse, but I do not see it as an available Eclipse
  perspective. I am admittedly not expert on Eclipse, but what might be
  my problem? For what it is worth, I have GoToMeeting with which a can
  connect remotely to somebody and show them my screen and give them
  control of my keyboard and mouse. I would be willing to pay a
  reasonable fee for help in overcoming these Getting Started snags.

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



  Google Eclipse plug-in (2).png
 38KViewDownload- Hide quoted text -

 - Show quoted text -

-- 
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: Getting Started hangup with Eclipse

2010-07-07 Thread Jaroslav Záruba
Again, there's no GWT/GAE perspective. :)

On Wed, Jul 7, 2010 at 3:33 PM, Blue Shoes anderson.ala...@gmail.comwrote:

 How does one invoke the New wizard? If I choose File | New, it
 displays a submenu (not a wizard) that had only Adobe Flex stuff on
 it.


But this is really weird. Is it possible you have it hidden under the File
- New - Other...?

I would try to rename your current Eclipse installation folder and download
one without the Flex stuff. According to my experience this is safe.
Unfortunately Google seem to recommend clear install with every update the
plugin gets, so you will play like that anyways. (But it is more of an
annoyance then a pain. Last time I had to re-install Ecilpse it preserved
all my settings. Even those I had to export/import manually in the past.)


 



 On Jul 2, 12:31 pm, Jaroslav Záruba jaroslav.zar...@gmail.com wrote:
  Oh, and obviously you should see couple of new options under the New
 wizard,
  see attachment.
 
  2010/7/2 Jaroslav Záruba jaroslav.zar...@gmail.com
 
 
 
   I don't think there will be need to pay anything. :) People are very
   helpful here.
 
   The plug-in does not install new perspective. You should see new item
 in
   Window - Preferences. And to some perspectives (Java, Debug,...) it
 adds
   three buttons.
 
   On Fri, Jul 2, 2010 at 2:48 AM, Blue Shoes anderson.ala...@gmail.com
 wrote:
 
   I am starting from scratch and have attempted to follow the directions
   at Getting Started. I got so far as downloading and installing the
   GAE plug-in for Eclipse, but I do not see it as an available Eclipse
   perspective. I am admittedly not expert on Eclipse, but what might be
   my problem? For what it is worth, I have GoToMeeting with which a can
   connect remotely to somebody and show them my screen and give them
   control of my keyboard and mouse. I would be willing to pay a
   reasonable fee for help in overcoming these Getting Started snags.
 
   --
   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
 google-appengine%2bunsubscrib...@googlegroups.com
   .
   For more options, visit this group at
  http://groups.google.com/group/google-appengine?hl=en.
 
 
 
   Google Eclipse plug-in (2).png
  38KViewDownload- Hide quoted text -
 
  - Show quoted text -

 --
 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.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Getting Started hangup with Eclipse

2010-07-07 Thread Jaroslav Záruba
2010/7/7 Jaroslav Záruba jaroslav.zar...@gmail.com

 Unfortunately Google seem to recommend clear install with every update the
 plugin gets,


Oh, looks like I was kinda wrong here. :)

On Wed, Jul 7, 2010 at 3:34 PM, Jason Parekh jasonpar...@gmail.com wrote:

 Yes, the clean installation is recommended *for milestones only* -- mainly
 because the code may have a few issues due to its milestone status, so we
 wouldn't want your existing stable Eclipse environment to become unusable.


-- 
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] NeedIndexError: The index for this query is not ready to serve.

2010-07-07 Thread adamea
Why is my index taking so long to build? I have 39 rows in my database
and it's been going for a considerable amount of time!

-- 
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: Getting Started hangup with Eclipse

2010-07-07 Thread Alon Carmel
You didnt specify if you want to develop for GAE in python or java. if your
going to use java your good to go with the GAE plugin, but if you want
pyhton you need to install PyDev which installs a perspective and some GAE
new project wizards.

haul if you need help.
-
Cheers,
public static function AlonCarmel() {
//Contact me
var email = 'a...@aloncarmel.me';
var twitter = '@aloncarmel';
var web = 'http://aloncarmel.me';
var phone = '+972-54-4860380';
}

* If you received an unsolicited email from by mistake that wasn't of your
matter please delete immediately. All E-mail sent from Alon Carmel is
copyrighted to Alon Carmel 2008. Any details revealed in e-mails sent by
Alon Carmel are owned by the Author only. Any attempt to duplicate or
imitate any of the Content is prohibited under copyright law 2008.



2010/7/7 Jaroslav Záruba jaroslav.zar...@gmail.com

 2010/7/7 Jaroslav Záruba jaroslav.zar...@gmail.com

 Unfortunately Google seem to recommend clear install with every update the
 plugin gets,


 Oh, looks like I was kinda wrong here. :)

 On Wed, Jul 7, 2010 at 3:34 PM, Jason Parekh jasonpar...@gmail.com
  wrote:

 Yes, the clean installation is recommended *for milestones only* --
 mainly because the code may have a few issues due to its milestone status,
 so we wouldn't want your existing stable Eclipse environment to become
 unusable.

  --
 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.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Getting Started hangup with Eclipse

2010-07-07 Thread Jeff Schwartz
I'd just add that there is also value in Aptana's plugins for html, css and
javascript support but it is not absolutely necessary. Also note that their
current release has a bug when installed in Helios (Eclispe 3.6). This bug
is not present when installed in older versions of Eclipse. Supposedly they
are working on a fix for Helios but I just tried their nightly build and
that failed to install.

On Wed, Jul 7, 2010 at 10:37 AM, Alon Carmel a...@aloncarmel.me wrote:

 You didnt specify if you want to develop for GAE in python or java. if your
 going to use java your good to go with the GAE plugin, but if you want
 pyhton you need to install PyDev which installs a perspective and some GAE
 new project wizards.

 haul if you need help.
 -
 Cheers,
 public static function AlonCarmel() {
 //Contact me
 var email = 'a...@aloncarmel.me';
 var twitter = '@aloncarmel';
 var web = 'http://aloncarmel.me';
 var phone = '+972-54-4860380';
 }

 * If you received an unsolicited email from by mistake that wasn't of your
 matter please delete immediately. All E-mail sent from Alon Carmel is
 copyrighted to Alon Carmel 2008. Any details revealed in e-mails sent by
 Alon Carmel are owned by the Author only. Any attempt to duplicate or
 imitate any of the Content is prohibited under copyright law 2008.




 2010/7/7 Jaroslav Záruba jaroslav.zar...@gmail.com

 2010/7/7 Jaroslav Záruba jaroslav.zar...@gmail.com

 Unfortunately Google seem to recommend clear install with every update the
 plugin gets,


 Oh, looks like I was kinda wrong here. :)

 On Wed, Jul 7, 2010 at 3:34 PM, Jason Parekh jasonpar...@gmail.com
  wrote:

 Yes, the clean installation is recommended *for milestones only* --
 mainly because the code may have a few issues due to its milestone status,
 so we wouldn't want your existing stable Eclipse environment to become
 unusable.

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




-- 
--
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] NeedIndexError: The index for this query is not ready to serve.

2010-07-07 Thread Jeff Schwartz
Google announced that appengine would be undergoing maintenance today so
that might be the reason.

On Wed, Jul 7, 2010 at 10:05 AM, adamea adam.earns...@gmail.com wrote:

 Why is my index taking so long to build? I have 39 rows in my database
 and it's been going for a considerable amount of time!

 --
 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] 5 transactional tasks

2010-07-07 Thread Nate Bauernfeind
I have noticed that batch datastore calls run within a single transaction.
The maximum number of entities that can be added or deleted (and probably
modified, though I have not tried) was 500. I'm betting you could probably
wrap them around a single transaction. Though, from my experience, I
wouldn't really recommend doing this (since trying to commit two batches of
500 to the datastore within the same call tended to time out for me).

Also, don't confuse transactional tasks with the task queue. Transactional
tasks are the those that will all happen simultaneously or will graciously
fail without any partial commits. Due to the implementation details you
probably want to avoid intentionally doing lots of transaction updates on
the same few objects, since it is possible (if you are kicking lots of
simultaneous jobs off with the task queue) to shoot yourself in the foot and
have a very small success rate.

Transactions work with the task queue in such a way that the task will only
be added to the queue if no other piece of your commits fail. For example,
you wouldn't really want your app to run the new user code if you couldn't
create the new user account for that user because someone else registered
that user name at the same time. I.E. Things on the task queue do not
continue running within the same transaction if they were created within
one.

On Wed, Jul 7, 2010 at 4:22 AM, hawkett hawk...@gmail.com wrote:

 Hi,

   This page -
 http://code.google.com/appengine/docs/python/datastore/transactions.html
 - says that we cannot raise more than 5 transactional tasks in a
 single transaction, and I wanted to check if this was a limit that you
 were hoping to raise, or if this is likely to be a long term
 restriction?  Does this restriction limit API calls to the task queue
 or actual number of tasks -  e.g. could I raise more than 5 by doing
 them in batch with a single call to the task queue API? Cheers,

 Colin

 --
 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.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] 5 transactional tasks

2010-07-07 Thread Robert Kluin
We use a simple technique to effectively add more than 5
_transactional_ tasks.  In our datastore transaction we add one
transactional fanout task.  The fanout task creates all of the other
tasks, and each task is given a name.  Naming the task prevents adding
the same task more than once, but at the same time we get 'eventual
consistency' because the other tasks will eventually get created.


Robert






On Wed, Jul 7, 2010 at 10:46 AM, Nate Bauernfeind
nate.bauernfe...@gmail.com wrote:
 I have noticed that batch datastore calls run within a single transaction.
 The maximum number of entities that can be added or deleted (and probably
 modified, though I have not tried) was 500. I'm betting you could probably
 wrap them around a single transaction. Though, from my experience, I
 wouldn't really recommend doing this (since trying to commit two batches of
 500 to the datastore within the same call tended to time out for me).
 Also, don't confuse transactional tasks with the task queue. Transactional
 tasks are the those that will all happen simultaneously or will graciously
 fail without any partial commits. Due to the implementation details you
 probably want to avoid intentionally doing lots of transaction updates on
 the same few objects, since it is possible (if you are kicking lots of
 simultaneous jobs off with the task queue) to shoot yourself in the foot and
 have a very small success rate.
 Transactions work with the task queue in such a way that the task will only
 be added to the queue if no other piece of your commits fail. For example,
 you wouldn't really want your app to run the new user code if you couldn't
 create the new user account for that user because someone else registered
 that user name at the same time. I.E. Things on the task queue do not
 continue running within the same transaction if they were created within
 one.

 On Wed, Jul 7, 2010 at 4:22 AM, hawkett hawk...@gmail.com wrote:

 Hi,

   This page -
 http://code.google.com/appengine/docs/python/datastore/transactions.html
 - says that we cannot raise more than 5 transactional tasks in a
 single transaction, and I wanted to check if this was a limit that you
 were hoping to raise, or if this is likely to be a long term
 restriction?  Does this restriction limit API calls to the task queue
 or actual number of tasks -  e.g. could I raise more than 5 by doing
 them in batch with a single call to the task queue API? Cheers,

 Colin

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



[google-appengine] list-property, many to many, 5000 indexes...HELP!

2010-07-07 Thread stefoid
Hi I think I have a fair handle on how Datastore works, but I need to
check, and I need some help with a design

lets say I have:
a very large list of BOOKS
the BOOKS are tagged- adventure+romance,   historical+drama,
animation+sci-fi+comedy, etc...
and I have a very large list of USERS.
USERS can read a very large number of BOOKS
And I, as a USER, can have a very large number of USERS who are my
friend.

What I want , in english, is
;  Return a list of all the BOOKS tagged with sci-fi and romance
that have been read by USERS who are my friend, sorted by Most
Frequently Read.

Now, I know I can model tags with a ListProperty, so that filtering is
easy = WHERE tag AND tag AND tag...
And I know that I can sort Books by Most Frequently Read  quite easily

But due to the large number of BOOKS that could be read by  a USER,
and the large number of USERS who could be my friend, I cant
practically model  BOOKS READ BY USERS and  USERS WHO ARE MY FRIEND as
ListProperties...

...Because I would blow the 5000 index limit per entity, because each
value of ListPropery generates its own index entry.  Is that correct?

I cant find a way to handle this without resorting to filtering in
memory.  Am I dumb, or is that just the way it is?

My solution is:

BOOK:
numerOfReads
TagList
otherStuff


Then I look up a relationship entity to find out everyone who is a
FRIEND of mine.
FRIENDS:
userKey
friendKey

Then I look up a relationship entity to find out which BOOKS that
USERS have read
BOOKSREAD:
userKey
bookKey
TagList
numberOfReads

So first I pull into memory the list of my particular friendKeys from
the FRIENDS table.

Then I churn through the table of BOOKSREAD, using the duplicated
properties TagList and numberOfReads to filter on tags and sort
according to number of reads.

I then filter this list of BOOKS *in memory* by the friendKeys I
have.  Ill need some sort of algorithm to keep pulling chunks of BOOKS
from the database until I have a nice page of books  my friends have
read (20 books displayed per page) to pass to the GUI.



-- 
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] Can not delete entity using Data Viewer and a GQL query.

2010-07-07 Thread test . siloka


--
Mobile message from Corporate Email powered by Remoba Inc.


Original Content Appended

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

---BeginMessage---
Date: Tue, 06 Jul 2010 07:52:04 -0700 (PDT)
Content-Type: text/plain


this error occur while trying to delete a row found through a search,
if you look for it on a paged table and you delete it, this won't
happen again

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

---End Message---


[google-appengine] Re: NeedIndexError: The index for this query is not ready to serve.

2010-07-07 Thread tjwebb
I'm getting this as well

On Jul 7, 11:02 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
 Google announced that appengine would be undergoing maintenance today so
 that might be the reason.

 On Wed, Jul 7, 2010 at 10:05 AM, adamea adam.earns...@gmail.com wrote:
  Why is my index taking so long to build? I have 39 rows in my database
  and it's been going for a considerable amount of time!

  --
  You received this message because you are subscribed to the Google Groups
  Google App Engine group. To post to this group, send email 
  togoogle-appeng...@googlegroups.com.
  To unsubscribe from this group, send email 
  togoogle-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] Re: how to view all keys in memcache?

2010-07-07 Thread Toomore
Appstats for Python
http://code.google.com/appengine/docs/python/tools/appstats.html

On Jul 6, 3:01 pm, saintthor saintt...@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/6 saintthor saintt...@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, saintthor saintt...@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] High proportion of Request was aborted messages

2010-07-07 Thread tjwebb
Hello,

I'm working to deploy an application, but I'm noticing an extremely
high proportion (75%+) of requests being pre-empted by the app engine,
giving me the following message in my logs:

Request was aborted after waiting too long to attempt to service your
request. This may happen sporadically when the App Engine serving
cluster is under unexpectedly high or uneven load. If you see this
message frequently, please contact the App Engine team.

For a single request, often it is retried 5-10 times before it is able
to run. This is especially common in taskqueue tasks, where each task
has to be re-tried 5-10 times before it can run; since it takes 10
seconds before it fails and gets re-tried, this wastes a lot of time
on simple tasks. I'll include my logs if it helps diagnose the
problem. My app id is bustrackerfeed. Thanks.

-- 
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] missing ) in parenthetical

2010-07-07 Thread René
Hello,

my problem is that my website runs locally without an error, but when
I deploy it to the appengine I become this error in the firefox
errorlog:

missing ) in parenthetical

why? here the link to my site http://renes-test.appspot.com/

I wrote the site with java and uses the gwt.

please help me and sorry for my bad English :D

-- 
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] I need help with my project

2010-07-07 Thread Hayx Hay
I currently have made a javascript, that constantly needs to refresh a
certain website  so that it can catch a change in the websites coding.
However I am not sure how to use the proxy server in google app
engine. Is it automatic? So as soon as I upload my javascript
application, the refreshes are automatically done on google servers?
So if I have a user who arrives at the site, and the page refreshes
the other website while he is on, will it use his IP or will it act as
a proxy? thanks

-- 
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] App Engine + Google Maps: templates to generate JS, AJAX to POST back? Really?

2010-07-07 Thread Webb S.
I am trying to write an app that displays a bunch of points, allows
the user to move them around, and then submit the changes back to the
server.

The only way I see to do this is to templates to generate JavaScript
making the map, then use JQuery to POST the results (new coordinates
queried from each marker) back to the application via POSTing to a
URL.

Is this really a decent way to go about things?  Should I really be
using templates to make the original map happen (I guess I could make
a URL to generate a KML feed)?  Is there a better way to make
coordinates complete the round trip back to the datastore?

This might be better posted on a maps group, but I will start here

(I guess I will be learning a lot of JavaScript here shortly...)

-- 
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] Throttle_code=4

2010-07-07 Thread David Laing
I'm running some load tests use JMeter to get an idea of how my
application performs under load on GAE (Java).

When I hit around 100 virtual users my response time starts dropping,
and I notice throttle_code=4 appearing in the log files (see below).

Does anyone know what this means?  Is the fact that I'm making
multiple requests from the same IP hitting some kind of automatic DDOS
protection?

Thanks

David



 request withthrottle_code=4; when connecting from JMeter
07-05 05:11AM 58.917 /market/1234/history?pricebars=240 200 3651ms
19cpu_ms 35kb Java/1.5.0_16,gzip(gfe)
75.101.226.4 - - [05/Jul/2010:05:12:02 -0700] GET /market/1234/
history?pricebars=240 HTTP/1.1 200 35566 - Java/1.5.0_16,gzip(gfe)
ci-pricehistory.appspot.com ms=3652 cpu_ms=19 api_cpu_ms=0
cpm_usd=0.004527 pending_ms=3570 throttle_code=4
I 07-05 05:12AM 02.532
uk.co.cityindex.CandleServlet fetch: Loading 240 bars from cache...
I 07-05 05:12AM 02.558
uk.co.cityindex.CandleServlet fetch: time:47

 request without throttle log; when connecting from browser
07-05 06:28AM 10.993 /market/1234/history?pricebars=240 200 69ms
19cpu_ms 7kb Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/
533.4,gzip(gfe)
80.169.172.178 - - [05/Jul/2010:06:28:11 -0700] GET /market/1234/
history?pricebars=240 HTTP/1.1 200 7572 - Mozilla/5.0 (Windows; U;
Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/
5.0.375.99 Safari/533.4,gzip(gfe) ci-pricehistory.appspot.com ms=69
cpu_ms=19 api_cpu_ms=0 cpm_usd=0.001423
I 07-05 06:28AM 11.031
uk.co.cityindex.CandleServlet fetch: Loading 240 bars from cache...
I 07-05 06:28AM 11.055
uk.co.cityindex.CandleServlet fetch: time:45

-- 
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: 5 transactional tasks

2010-07-07 Thread hawkett
Thanks for the detail - pretty comfortable with the ins and outs of
the task queue - any ideas about the 5 task limit?

 Also, don't confuse transactional tasks with the task queue. Transactional
 tasks are the those that will all happen simultaneously or will graciously
 fail without any partial commits. Due to the implementation details you
 probably want to avoid intentionally doing lots of transaction updates on
 the same few objects, since it is possible (if you are kicking lots of
 simultaneous jobs off with the task queue) to shoot yourself in the foot and
 have a very small success rate.

I wasn't confused until I read this paragraph :) Transactional tasks
do not need to operate on the same entity group as the transaction in
which they are raised - this is one of their greatest strengths. They
are fast to raise, so you can actually include quite a lot of work in
a 'transaction' of this sort, all done in parallel.  Generally if I
want to do something in the same entity group as the originating
transaction, I would do it right there in the transaction and not
raise a task.  So at least for me (and I expect for many others),
transactional tasks are almost exclusively *not* operating on the same
entity group as the transaction in which they are raised, unless
perhaps they are being used in a continuation style bulk update, in
which case they are likely to be in series and not cause contention.

Anyway, question still there :) Is the 5 task limit a restriction that
is expected to remain indefinitely? Can I get around the restriction
by raising more in a single batch API call - i.e. is it a restriction
on API calls or actual tasks? Cheers,

Colin

On Jul 7, 4:46 pm, Nate Bauernfeind nate.bauernfe...@gmail.com
wrote:
 I have noticed that batch datastore calls run within a single transaction.
 The maximum number of entities that can be added or deleted (and probably
 modified, though I have not tried) was 500. I'm betting you could probably
 wrap them around a single transaction. Though, from my experience, I
 wouldn't really recommend doing this (since trying to commit two batches of
 500 to the datastore within the same call tended to time out for me).

 Also, don't confuse transactional tasks with the task queue. Transactional
 tasks are the those that will all happen simultaneously or will graciously
 fail without any partial commits. Due to the implementation details you
 probably want to avoid intentionally doing lots of transaction updates on
 the same few objects, since it is possible (if you are kicking lots of
 simultaneous jobs off with the task queue) to shoot yourself in the foot and
 have a very small success rate.

 Transactions work with the task queue in such a way that the task will only
 be added to the queue if no other piece of your commits fail. For example,
 you wouldn't really want your app to run the new user code if you couldn't
 create the new user account for that user because someone else registered
 that user name at the same time. I.E. Things on the task queue do not
 continue running within the same transaction if they were created within
 one.



 On Wed, Jul 7, 2010 at 4:22 AM, hawkett hawk...@gmail.com wrote:
  Hi,

    This page -
 http://code.google.com/appengine/docs/python/datastore/transactions.html
  - says that we cannot raise more than 5 transactional tasks in a
  single transaction, and I wanted to check if this was a limit that you
  were hoping to raise, or if this is likely to be a long term
  restriction?  Does this restriction limit API calls to the task queue
  or actual number of tasks -  e.g. could I raise more than 5 by doing
  them in batch with a single call to the task queue API? Cheers,

  Colin

  --
  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%2Bunsubscrib 
  e...@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] list-property, many to many, 5000 indexes...HELP!

2010-07-07 Thread Jeff Schwartz
I wouldn't put the list attribute in your book class due to serialization
issues and exploding indexes. I'd put the list in a sub class of book and
query the subclass to return a list of entity keys on a match. As child keys
contain parent keys as well, I'd use the list of keys returned to grab the
actual book entities. You can refine this as much as you like.

Jeff

On Wed, Jul 7, 2010 at 1:58 AM, stefoid stevenmath...@yahoo.com wrote:

 Hi I think I have a fair handle on how Datastore works, but I need to
 check, and I need some help with a design

 lets say I have:
 a very large list of BOOKS
 the BOOKS are tagged- adventure+romance,   historical+drama,
 animation+sci-fi+comedy, etc...
 and I have a very large list of USERS.
 USERS can read a very large number of BOOKS
 And I, as a USER, can have a very large number of USERS who are my
 friend.

 What I want , in english, is
 ;  Return a list of all the BOOKS tagged with sci-fi and romance
 that have been read by USERS who are my friend, sorted by Most
 Frequently Read.

 Now, I know I can model tags with a ListProperty, so that filtering is
 easy = WHERE tag AND tag AND tag...
 And I know that I can sort Books by Most Frequently Read  quite easily

 But due to the large number of BOOKS that could be read by  a USER,
 and the large number of USERS who could be my friend, I cant
 practically model  BOOKS READ BY USERS and  USERS WHO ARE MY FRIEND as
 ListProperties...

 ...Because I would blow the 5000 index limit per entity, because each
 value of ListPropery generates its own index entry.  Is that correct?

 I cant find a way to handle this without resorting to filtering in
 memory.  Am I dumb, or is that just the way it is?

 My solution is:

 BOOK:
 numerOfReads
 TagList
 otherStuff


 Then I look up a relationship entity to find out everyone who is a
 FRIEND of mine.
 FRIENDS:
 userKey
 friendKey

 Then I look up a relationship entity to find out which BOOKS that
 USERS have read
 BOOKSREAD:
 userKey
 bookKey
 TagList
 numberOfReads

 So first I pull into memory the list of my particular friendKeys from
 the FRIENDS table.

 Then I churn through the table of BOOKSREAD, using the duplicated
 properties TagList and numberOfReads to filter on tags and sort
 according to number of reads.

 I then filter this list of BOOKS *in memory* by the friendKeys I
 have.  Ill need some sort of algorithm to keep pulling chunks of BOOKS
 from the database until I have a nice page of books  my friends have
 read (20 books displayed per page) to pass to the GUI.

 

 --
 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] Re: 5 transactional tasks

2010-07-07 Thread Robert Kluin
Just raise one transactional task that in turn spawns a series of
(non-transactional) _named_ sub-tasks.  Just remember to pass on a
TaskAlreadyExists error.

See Brett Slatkin's 2010 IO talk on pipelines for additional discussion.

Robert






On Wed, Jul 7, 2010 at 12:49 PM, hawkett hawk...@gmail.com wrote:
 Thanks for the detail - pretty comfortable with the ins and outs of
 the task queue - any ideas about the 5 task limit?

 Also, don't confuse transactional tasks with the task queue. Transactional
 tasks are the those that will all happen simultaneously or will graciously
 fail without any partial commits. Due to the implementation details you
 probably want to avoid intentionally doing lots of transaction updates on
 the same few objects, since it is possible (if you are kicking lots of
 simultaneous jobs off with the task queue) to shoot yourself in the foot and
 have a very small success rate.

 I wasn't confused until I read this paragraph :) Transactional tasks
 do not need to operate on the same entity group as the transaction in
 which they are raised - this is one of their greatest strengths. They
 are fast to raise, so you can actually include quite a lot of work in
 a 'transaction' of this sort, all done in parallel.  Generally if I
 want to do something in the same entity group as the originating
 transaction, I would do it right there in the transaction and not
 raise a task.  So at least for me (and I expect for many others),
 transactional tasks are almost exclusively *not* operating on the same
 entity group as the transaction in which they are raised, unless
 perhaps they are being used in a continuation style bulk update, in
 which case they are likely to be in series and not cause contention.

 Anyway, question still there :) Is the 5 task limit a restriction that
 is expected to remain indefinitely? Can I get around the restriction
 by raising more in a single batch API call - i.e. is it a restriction
 on API calls or actual tasks? Cheers,

 Colin

 On Jul 7, 4:46 pm, Nate Bauernfeind nate.bauernfe...@gmail.com
 wrote:
 I have noticed that batch datastore calls run within a single transaction.
 The maximum number of entities that can be added or deleted (and probably
 modified, though I have not tried) was 500. I'm betting you could probably
 wrap them around a single transaction. Though, from my experience, I
 wouldn't really recommend doing this (since trying to commit two batches of
 500 to the datastore within the same call tended to time out for me).

 Also, don't confuse transactional tasks with the task queue. Transactional
 tasks are the those that will all happen simultaneously or will graciously
 fail without any partial commits. Due to the implementation details you
 probably want to avoid intentionally doing lots of transaction updates on
 the same few objects, since it is possible (if you are kicking lots of
 simultaneous jobs off with the task queue) to shoot yourself in the foot and
 have a very small success rate.

 Transactions work with the task queue in such a way that the task will only
 be added to the queue if no other piece of your commits fail. For example,
 you wouldn't really want your app to run the new user code if you couldn't
 create the new user account for that user because someone else registered
 that user name at the same time. I.E. Things on the task queue do not
 continue running within the same transaction if they were created within
 one.



 On Wed, Jul 7, 2010 at 4:22 AM, hawkett hawk...@gmail.com wrote:
  Hi,

    This page -
 http://code.google.com/appengine/docs/python/datastore/transactions.html
  - says that we cannot raise more than 5 transactional tasks in a
  single transaction, and I wanted to check if this was a limit that you
  were hoping to raise, or if this is likely to be a long term
  restriction?  Does this restriction limit API calls to the task queue
  or actual number of tasks -  e.g. could I raise more than 5 by doing
  them in batch with a single call to the task queue API? Cheers,

  Colin

  --
  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%2Bunsubscrib
   e...@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 

[google-appengine] Re: Trouble Setting App Engine ID

2010-07-07 Thread Matthew Blain
I just tried this and it worked for me. You can send me the details of
the exact user name and error message you get privately and I'll try
to take a look.

On Jul 6, 11:24 pm, cwaldbieser cwaldbie...@gmail.com wrote:
 This does not appear to work for me.
 I have logged into the App Engine admin console using my gmail
 account.
 I try to create an app ID with the same name.  The program refuses.

 Thanks,
 Carl

 On Jul 6, 3:17 pm, Matthew Blain matthew.bl...@google.com wrote:



  You should be able to create an application ID which matches an
  existing gmail account, but only when logged in to the current user.

  For example, if you have exam...@gmail.com and want to create
  example.appspot.com, you must log in to the App Engine admin console
  as 'exam...@gmail.com' and then create the 'example' application. You
  can then add additional developers to the application.

  --Matthew

  On Jul 5, 12:16 am, l.denardo lorenzo.dena...@gmail.com wrote:

   I think there's no way to do it.
   Gmail names seem to be locked for anyone, including the owner of the
   account. This happened to me too, and seems to be a frequent request
   from many of us.

   Regards
   Lorenzo

   On Jul 2, 9:03 pm, cwaldbieser cwaldbie...@gmail.com wrote:

I read that if you have a GMail account, no one else can take that
name for an App Engine ID.
I created a GMail account with the name I wanted, but when I tried to
create an app with that account, I was told by the page the name is
taken!  It was not taken prior to me creating the new GMail account.
Am I blocking the name of the app ID I want?  How do I correct this?

Thanks,
Carl

-- 
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: Tasks Queues still manual in 1.3.4?

2010-07-07 Thread Ryan Weber
Yes, this is still an issue for me in 1.3.5. Very frustrating.

On Wed, Jul 7, 2010 at 1:16 AM, Ryan W rwilli...@gmail.com wrote:

 I just noticed this problem on the 1.3.5 version of the Mac OS
 Launcher.  I also run on Windows and it runs tasks automatically fine.



 On Jun 15, 6:36 am, hawkett hawk...@gmail.com wrote:
  I'm seeing this issue now in the dev environment.  It looks to me
 liketasksraised in batch are ignored - only individualtasksfire
  automatically.  Perhaps I've done something wrong though - can anyone
  else confirm this behaviour? Cheers,
 
  Colin
 
  On Jun 2, 1:05 am, hawkett hawk...@gmail.com wrote:
 
   The 'mac only' theory on the app engine launcher was a tad out of
   date :) I was looking at the SDK download page (which only lists it
   explicitly for mac)... sorry about that.
 
   On Jun 1, 8:28 pm, Greg Tracy gtr...@gmail.com wrote:
 
I'm using the App Engine Launcher on XP and it works for me.
 
On May 31, 7:24 pm, hawkett hawk...@gmail.com wrote:
 
 Slight possibility - looks like both Ryan and Nick are using the
 app
 engine launcher, which is a mac only application that contains a
 copy
 of the SDK. Are any of the people reporting it working using the
 app
 engine launcher? I'm on mac, but is has been a while since I
 actually
 ran my apps with the launcher - choosing instead to download to
 download the linux SDK.  You guys could try that and see if you
 notice
 any improvement.  Perhaps the SDK inside the launcher isn't quite
 right. Unlikely, but something to test out.  Cheers,
 
 Colin
 
 On May 29, 6:49 am, Nick npd...@gmail.com wrote:
 
  I'm in California (7-8 hours behind UTC) and also have Ryan's
 problem.
 Tasksdon't run automatically on the dev server, which is very
  frustrating and as Ryan reported Istillsee the message Taskswill
  not run automatically in the SDK console.
 
  I'm using Python and the GoogleAppEngineLauncher 1.3.4.794, SDK
  version: release: 1.3.4, timestamp: 1272392128, api_versions:
 ['1'].
 
  Any thoughts on why some of us aren't seeing this new feature?
 
  Thanks,
  Nick
 
  On May 28, 8:50 am, Tim Hoffman zutes...@gmail.com wrote:
 
   So am I (8 hours) and autotaskrunning works fine,
 
   Rgds
 
   T
 
   On May 28, 10:32 pm, djidjadji djidja...@gmail.com wrote:
 
I'm ahead a few hours of UTC and for me
 theautomatictaskqueueworks.
I have not modified the1.3.4SDK code.
 
2010/5/27 Kenneth goo...@kmacleod.ie:
 
 The problem with thetasknot running automatically is
 because of this
 bug:
 

 http://code.google.com/p/googleappengine/issues/detail?id=2508
 
 Basically it works fine in Mountain View, California, but
 not for
 anyone who is ahead of UTC since the eta will be in the
 future.
 
 Solution as described in the bug report is replace line 414
 in
 taskqueue.py:
 
 def __determine_eta(eta=None, countdown=None,
 now=datetime.datetime.now)
 with
 def __determine_eta(eta=None, countdown=None,
 now=datetime.datetime.utcnow)
 
 Hope that helps.
 
 On May 22, 9:10 pm, andy stevko andy.ste...@gmail.com
 wrote:
 I see auto runtasksall the time in my dev environment. I
 thought the docs
 just were not up to date. I'm using the latest eclipse
 plugin.
 
 On May 22, 2010 12:42 PM, Ryan Weber 
 ryan.we...@gmail.com wrote:
 
 Strange, because that's not what is happening for me. I
 have tostill
 manually run them. Can anyone think of any reason why mine
 wouldstillbe
manual? When I saw all the features of the1.3.4release, I
 was most looking
 forward to the auto-run oftasks, so I wouldn't have to
 click run every
 time, but alas, no luck yet...

 --
 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.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: App Engine + Google Maps: templates to generate JS, AJAX to POST back? Really?

2010-07-07 Thread Darien Caldwell
The method you describe is basically the route I took. And I have to
say it works well.

You can take a peek at an early proof-of-concept I did, and maybe the
code will give you somewhere to start from. this version doesn't have
JQuery integrated for AJAX yet, but that's precisely what I ended up
using.

http://home.comcast.net/~volfin/drag/demo.html

-- 
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: MapReduce - less than half of the shards have items

2010-07-07 Thread Ben Nevile
I have a job with 8 shards but only one of the shards is processing
any entities. Think this is related?

mapreduce_id=159013376839436

Ben




On Jun 16, 8:28 am, Nick Johnson (Google) nick.john...@google.com
wrote:
 Hi Jason,

 It's possible to do that right now. You simply need to define your own
 InputReader - see the existing ones for examples 
 how:http://code.google.com/p/appengine-mapreduce/source/browse/trunk/pyth...

 The best option is probably to extend the existing DatastoreInputReader, and
 override the split_input method.

 -Nick Johnson





 On Wed, Jun 16, 2010 at 4:17 PM, Jason C jason.a.coll...@gmail.com wrote:
  Nick,

  It would be a great feature to allow us (developers) to define a
  custom partitioning function for the shards - unless you guys have
  some better magic in mind.

  It is very normal for us to see very poor distribution across our
  shards in practise - in fact, we've only seen poor distributions.

  j

  On Jun 15, 8:04 am, Nick Johnson (Google) nick.john...@google.com
  wrote:
   Hi Jason,

   The current implementation of the datastore mapper uses lexicographical
   sharding over keys to assign datastore shards. Unfortunately, this can
  lead
   to very inconsistent shard sizes, as you observe.

   -Nick Johnson

   On Fri, Jun 11, 2010 at 4:17 PM, Jason C jason.a.coll...@gmail.com
  wrote:
We've been using MapReduce for App Engine for a couple of different
jobs.

Typically, we use 8 shards (the default), but it seems that only 3,
sometime 4, of the shards have any items in them? E.g., we're
currently running one job and three of the shards have 218,000 items
processed, but the other 5 shards appear to have zero.

I can understand that a particular key distribution would have
different amounts in each shard, but with so many at zero, I suspect
there is something else happening?

BTW, we have applied the mapreduce-recommended __key__ DESC index, but
we still see this strange shard distribution.

Is anyone else seeing this?

j

--
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-appengine@googlegroups.com
  .
To unsubscribe from this group, send email to
google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2Bunsubscrib
 e...@googlegroups.comgoogle-appengine%2Bunsubscrib
  e...@googlegroups.com
.
For more options, visit this group at
   http://groups.google.com/group/google-appengine?hl=en.

   --
   Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd.
  ::
   Registered in Dublin, Ireland, Registration Number: 368047
   Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration
  Number:
   368047

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

 --
 Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. ::
 Registered in Dublin, Ireland, Registration Number: 368047
 Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
 368047

-- 
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: MapReduce - less than half of the shards have items

2010-07-07 Thread Ben Nevile
Just found the thread that talks about needing the descending index
for __key__ --- definitely seems like something that should be added
to the documentation!

Ben


On Jul 7, 12:56 pm, Ben Nevile ben.nev...@gmail.com wrote:
 I have a job with 8 shards but only one of the shards is processing
 any entities. Think this is related?

 mapreduce_id=159013376839436

 Ben

 On Jun 16, 8:28 am, Nick Johnson (Google) nick.john...@google.com
 wrote:



  Hi Jason,

  It's possible to do that right now. You simply need to define your own
  InputReader - see the existing ones for examples 
  how:http://code.google.com/p/appengine-mapreduce/source/browse/trunk/pyth...

  The best option is probably to extend the existing DatastoreInputReader, and
  override the split_input method.

  -Nick Johnson

  On Wed, Jun 16, 2010 at 4:17 PM, Jason C jason.a.coll...@gmail.com wrote:
   Nick,

   It would be a great feature to allow us (developers) to define a
   custom partitioning function for the shards - unless you guys have
   some better magic in mind.

   It is very normal for us to see very poor distribution across our
   shards in practise - in fact, we've only seen poor distributions.

   j

   On Jun 15, 8:04 am, Nick Johnson (Google) nick.john...@google.com
   wrote:
Hi Jason,

The current implementation of the datastore mapper uses lexicographical
sharding over keys to assign datastore shards. Unfortunately, this can
   lead
to very inconsistent shard sizes, as you observe.

-Nick Johnson

On Fri, Jun 11, 2010 at 4:17 PM, Jason C jason.a.coll...@gmail.com
   wrote:
 We've been usingMapReducefor App Engine for a couple of different
 jobs.

 Typically, we use 8 shards (the default), but it seems that only 3,
 sometime 4, of the shards have any items in them? E.g., we're
 currently running one job and three of the shards have 218,000 items
 processed, but the other 5 shards appear to have zero.

 I can understand that a particular key distribution would have
 different amounts in each shard, but with so many at zero, I suspect
 there is something else happening?

 BTW, we have applied themapreduce-recommended __key__ DESC index, but
 we still see this strange shard distribution.

 Is anyone else seeing this?

 j

 --
 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-appengine@googlegroups.com
   .
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2Bunsubscrib
  e...@googlegroups.comgoogle-appengine%2Bunsubscrib
   e...@googlegroups.com
 .
 For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.

--
Nick Johnson, Developer Programs Engineer, App Engine Google Ireland 
Ltd.
   ::
Registered in Dublin, Ireland, Registration Number: 368047
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration
   Number:
368047

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

  --
  Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. ::
  Registered in Dublin, Ireland, Registration Number: 368047
  Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
  368047

-- 
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] Throttle_code=4

2010-07-07 Thread Ikai L (Google)
It looks like your request is taking 3500ms. We autoscale up the number of
instances servicing your requests as long as you maintain average
milliseconds/request of 1000ms or under (we recommend 800ms, sub 400ms is
optimal). If you run lots of long running requests, we will not spin up new
instances for you and you will hit a scaling ceiling.

On Mon, Jul 5, 2010 at 6:30 AM, David Laing mrdavidla...@gmail.com wrote:

 I'm running some load tests use JMeter to get an idea of how my
 application performs under load on GAE (Java).

 When I hit around 100 virtual users my response time starts dropping,
 and I notice throttle_code=4 appearing in the log files (see below).

 Does anyone know what this means?  Is the fact that I'm making
 multiple requests from the same IP hitting some kind of automatic DDOS
 protection?

 Thanks

 David



  request withthrottle_code=4; when connecting from JMeter
 07-05 05:11AM 58.917 /market/1234/history?pricebars=240 200 3651ms
 19cpu_ms 35kb Java/1.5.0_16,gzip(gfe)
 75.101.226.4 - - [05/Jul/2010:05:12:02 -0700] GET /market/1234/
 history?pricebars=240 HTTP/1.1 200 35566 - Java/1.5.0_16,gzip(gfe)
 ci-pricehistory.appspot.com ms=3652 cpu_ms=19 api_cpu_ms=0
 cpm_usd=0.004527 pending_ms=3570 throttle_code=4
 I 07-05 05:12AM 02.532
 uk.co.cityindex.CandleServlet fetch: Loading 240 bars from cache...
 I 07-05 05:12AM 02.558
 uk.co.cityindex.CandleServlet fetch: time:47

  request without throttle log; when connecting from browser
 07-05 06:28AM 10.993 /market/1234/history?pricebars=240 200 69ms
 19cpu_ms 7kb Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
 AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/
 533.4,gzip(gfe)
 80.169.172.178 - - [05/Jul/2010:06:28:11 -0700] GET /market/1234/
 history?pricebars=240 HTTP/1.1 200 7572 - Mozilla/5.0 (Windows; U;
 Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/
 5.0.375.99 Safari/533.4,gzip(gfe) ci-pricehistory.appspot.com ms=69
 cpu_ms=19 api_cpu_ms=0 cpm_usd=0.001423
 I 07-05 06:28AM 11.031
 uk.co.cityindex.CandleServlet fetch: Loading 240 bars from cache...
 I 07-05 06:28AM 11.055
 uk.co.cityindex.CandleServlet fetch: time:45

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




-- 
Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine

-- 
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: MapReduce - less than half of the shards have items

2010-07-07 Thread Ben Nevile
I reduced the number of shards to 1, and it uses an ascending index,
but still only 44399 out of 500k+ entities are processed. Confused!

Ben


On Jul 7, 1:02 pm, Ben Nevile ben.nev...@gmail.com wrote:
 Just found the thread that talks about needing the descending index
 for __key__ --- definitely seems like something that should be added
 to the documentation!

 Ben

 On Jul 7, 12:56 pm, Ben Nevile ben.nev...@gmail.com wrote:



  I have a job with 8 shards but only one of the shards is processing
  any entities. Think this is related?

  mapreduce_id=159013376839436

  Ben

  On Jun 16, 8:28 am, Nick Johnson (Google) nick.john...@google.com
  wrote:

   Hi Jason,

   It's possible to do that right now. You simply need to define your own
   InputReader - see the existing ones for examples 
   how:http://code.google.com/p/appengine-mapreduce/source/browse/trunk/pyth...

   The best option is probably to extend the existing DatastoreInputReader, 
   and
   override the split_input method.

   -Nick Johnson

   On Wed, Jun 16, 2010 at 4:17 PM, Jason C jason.a.coll...@gmail.com 
   wrote:
Nick,

It would be a great feature to allow us (developers) to define a
custom partitioning function for the shards - unless you guys have
some better magic in mind.

It is very normal for us to see very poor distribution across our
shards in practise - in fact, we've only seen poor distributions.

j

On Jun 15, 8:04 am, Nick Johnson (Google) nick.john...@google.com
wrote:
 Hi Jason,

 The current implementation of the datastore mapper uses 
 lexicographical
 sharding over keys to assign datastore shards. Unfortunately, this can
lead
 to very inconsistent shard sizes, as you observe.

 -Nick Johnson

 On Fri, Jun 11, 2010 at 4:17 PM, Jason C jason.a.coll...@gmail.com
wrote:
  We've been usingMapReducefor App Engine for a couple of different
  jobs.

  Typically, we use 8 shards (the default), but it seems that only 3,
  sometime 4, of the shards have any items in them? E.g., we're
  currently running one job and three of the shards have 218,000 
  items
  processed, but the other 5 shards appear to have zero.

  I can understand that a particular key distribution would have
  different amounts in each shard, but with so many at zero, I suspect
  there is something else happening?

  BTW, we have applied themapreduce-recommended __key__ DESC index, 
  but
  we still see this strange shard distribution.

  Is anyone else seeing this?

  j

  --
  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-appengine@googlegroups.com
.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2Bunsubscrib
   e...@googlegroups.comgoogle-appengine%2Bunsubscrib
e...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.

 --
 Nick Johnson, Developer Programs Engineer, App Engine Google Ireland 
 Ltd.
::
 Registered in Dublin, Ireland, Registration Number: 368047
 Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration
Number:
 368047

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

   --
   Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. 
   ::
   Registered in Dublin, Ireland, Registration Number: 368047
   Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
   368047

-- 
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] 500 error when I try to deploy to app engine

2010-07-07 Thread tjwebb
I get this when I run 'ant update':

INFO: Unable to access
https://appengine.google.com/api/updatecheck?runtime=javarelease=1.3.5timestamp=1277158890api_versions=['1.0']
 [java] java.io.IOException: Server returned HTTP response code:
500 for URL: 
https://appengine.google.com/api/updatecheck?runtime=javarelease=1.3.5timestamp=1277158890api_versions=['1.0']

Just started happening around 5:30pm EDT

-- 
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: 5 transactional tasks

2010-07-07 Thread hawkett
That's definitely an option - in my app it is common to reach the
transaction edge with a unpredictable number of tasks ready to be
raised transactionally - not heaps, but potentially more than 5. It
would be nice to be able to just put them on the queue.  I guess
serialising them into another task's payload which then raises them
isn't such a bad option - more complex though, and I wonder what the
difference in resource usage would be compared to just raising them in
a single batch API call - probably marginal, but being a common
pattern its worth trying to avoid complexity and/or overhead.  Anyway,
that was the main reason for the question - understanding the
restriction to try and make a choice of architecture. Cheers,

Colin

On Jul 7, 7:04 pm, Robert Kluin robert.kl...@gmail.com wrote:
 Just raise one transactional task that in turn spawns a series of
 (non-transactional) _named_ sub-tasks.  Just remember to pass on a
 TaskAlreadyExists error.

 See Brett Slatkin's 2010 IO talk on pipelines for additional discussion.

 Robert



 On Wed, Jul 7, 2010 at 12:49 PM, hawkett hawk...@gmail.com wrote:
  Thanks for the detail - pretty comfortable with the ins and outs of
  the task queue - any ideas about the 5 task limit?

  Also, don't confuse transactional tasks with the task queue. Transactional
  tasks are the those that will all happen simultaneously or will graciously
  fail without any partial commits. Due to the implementation details you
  probably want to avoid intentionally doing lots of transaction updates on
  the same few objects, since it is possible (if you are kicking lots of
  simultaneous jobs off with the task queue) to shoot yourself in the foot 
  and
  have a very small success rate.

  I wasn't confused until I read this paragraph :) Transactional tasks
  do not need to operate on the same entity group as the transaction in
  which they are raised - this is one of their greatest strengths. They
  are fast to raise, so you can actually include quite a lot of work in
  a 'transaction' of this sort, all done in parallel.  Generally if I
  want to do something in the same entity group as the originating
  transaction, I would do it right there in the transaction and not
  raise a task.  So at least for me (and I expect for many others),
  transactional tasks are almost exclusively *not* operating on the same
  entity group as the transaction in which they are raised, unless
  perhaps they are being used in a continuation style bulk update, in
  which case they are likely to be in series and not cause contention.

  Anyway, question still there :) Is the 5 task limit a restriction that
  is expected to remain indefinitely? Can I get around the restriction
  by raising more in a single batch API call - i.e. is it a restriction
  on API calls or actual tasks? Cheers,

  Colin

  On Jul 7, 4:46 pm, Nate Bauernfeind nate.bauernfe...@gmail.com
  wrote:
  I have noticed that batch datastore calls run within a single transaction.
  The maximum number of entities that can be added or deleted (and probably
  modified, though I have not tried) was 500. I'm betting you could probably
  wrap them around a single transaction. Though, from my experience, I
  wouldn't really recommend doing this (since trying to commit two batches of
  500 to the datastore within the same call tended to time out for me).

  Also, don't confuse transactional tasks with the task queue. Transactional
  tasks are the those that will all happen simultaneously or will graciously
  fail without any partial commits. Due to the implementation details you
  probably want to avoid intentionally doing lots of transaction updates on
  the same few objects, since it is possible (if you are kicking lots of
  simultaneous jobs off with the task queue) to shoot yourself in the foot 
  and
  have a very small success rate.

  Transactions work with the task queue in such a way that the task will only
  be added to the queue if no other piece of your commits fail. For example,
  you wouldn't really want your app to run the new user code if you 
  couldn't
  create the new user account for that user because someone else registered
  that user name at the same time. I.E. Things on the task queue do not
  continue running within the same transaction if they were created within
  one.

  On Wed, Jul 7, 2010 at 4:22 AM, hawkett hawk...@gmail.com wrote:
   Hi,

     This page -
  http://code.google.com/appengine/docs/python/datastore/transactions.html
   - says that we cannot raise more than 5 transactional tasks in a
   single transaction, and I wanted to check if this was a limit that you
   were hoping to raise, or if this is likely to be a long term
   restriction?  Does this restriction limit API calls to the task queue
   or actual number of tasks -  e.g. could I raise more than 5 by doing
   them in batch with a single call to the task queue API? Cheers,

   Colin

   --
   You received this message because you are subscribed to the 

[google-appengine] Re: Help With BlobStore Upload Handler Redirect on Live

2010-07-07 Thread hawkett
In firebug or chrome dev tools can you see the redirect response from
the image upload?

On Jul 6, 8:18 pm, tim.romanowski tim.romanow...@gmail.com wrote:
 I have followed the examples for uploading images using the
 blobstore.  I am able to upload images to the development server
 fine.  However when I deploy my code to the live servers the redirect
 after upload does not work.

 Here are some details:

 -- everything works fine on the development server ( version 1.3.5 )
 -- example url = /imgupload
 -- I use blobstore.create_upload_url(/imgupload)
 -- I can see the image in the blob viewer through the dashboard so the
 file upload works
 -- after the upload finishes I see my upload url the address bar /
 imgupload  but there is no source for the page
 -- there are not any logs created

 With the lack of logs / error messages / source I am having trouble
 debugging what is happening on the app engine server.

 Has anyone seen this before?

 Thanks for the help

 Tim

-- 
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: list-property, many to many, 5000 indexes...HELP!

2010-07-07 Thread stefoid
Ah, well tagList is just the list of tags for that book, so its only
going to hold between 0-4 tags.   Having that listProperty with book
at least makes filtering books by tag easy.

like 'gimmie all the books that are tagged 'sci-fi' and 'adventure'  ,
sorted by 'number of reads'.  That bit is a single query.

On Jul 8, 3:56 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
 I wouldn't put the list attribute in your book class due to serialization
 issues and exploding indexes. I'd put the list in a sub class of book and
 query the subclass to return a list of entity keys on a match. As child keys
 contain parent keys as well, I'd use the list of keys returned to grab the
 actual book entities. You can refine this as much as you like.

 Jeff



 On Wed, Jul 7, 2010 at 1:58 AM, stefoid stevenmath...@yahoo.com wrote:
  Hi I think I have a fair handle on how Datastore works, but I need to
  check, and I need some help with a design

  lets say I have:
  a very large list of BOOKS
  the BOOKS are tagged- adventure+romance,   historical+drama,
  animation+sci-fi+comedy, etc...
  and I have a very large list of USERS.
  USERS can read a very large number of BOOKS
  And I, as a USER, can have a very large number of USERS who are my
  friend.

  What I want , in english, is
  ;  Return a list of all the BOOKS tagged with sci-fi and romance
  that have been read by USERS who are my friend, sorted by Most
  Frequently Read.

  Now, I know I can model tags with a ListProperty, so that filtering is
  easy = WHERE tag AND tag AND tag...
  And I know that I can sort Books by Most Frequently Read  quite easily

  But due to the large number of BOOKS that could be read by  a USER,
  and the large number of USERS who could be my friend, I cant
  practically model  BOOKS READ BY USERS and  USERS WHO ARE MY FRIEND as
  ListProperties...

  ...Because I would blow the 5000 index limit per entity, because each
  value of ListPropery generates its own index entry.  Is that correct?

  I cant find a way to handle this without resorting to filtering in
  memory.  Am I dumb, or is that just the way it is?

  My solution is:

  BOOK:
  numerOfReads
  TagList
  otherStuff

  Then I look up a relationship entity to find out everyone who is a
  FRIEND of mine.
  FRIENDS:
  userKey
  friendKey

  Then I look up a relationship entity to find out which BOOKS that
  USERS have read
  BOOKSREAD:
  userKey
  bookKey
  TagList
  numberOfReads

  So first I pull into memory the list of my particular friendKeys from
  the FRIENDS table.

  Then I churn through the table of BOOKSREAD, using the duplicated
  properties TagList and numberOfReads to filter on tags and sort
  according to number of reads.

  I then filter this list of BOOKS *in memory* by the friendKeys I
  have.  Ill need some sort of algorithm to keep pulling chunks of BOOKS
  from the database until I have a nice page of books  my friends have
  read (20 books displayed per page) to pass to the GUI.

  

  --
  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] Re: list-property, many to many, 5000 indexes...HELP!

2010-07-07 Thread stefoid
Hi, yeah I have watched that video numerous times, and I never quite
got where he says 'this will solve the million fan out problem' and
then goes on to say that you cant have more than 5000 values in a
listproperty.  but i get what you are saying, just somehow manage
multiple 'relationship entities' per user entity.  But is that going
to solve my particular example query?

If I do this (below) Im still stumped on how to answer my question
without pulling a potentially large number of keys into memory and
filtering them in memory.

USER
ListOfBooksIveReadLists
ListOfMyFriendsLists

BOOKSIVEREAD:  (child of User)
booksList

MYFRIENDS:   (child of user)
friendList

On Jul 8, 5:31 am, Darien Caldwell darien.caldw...@gmail.com wrote:
 On Jul 6, 10:58 pm, stefoid stevenmath...@yahoo.com wrote:

  But due to the large number of BOOKS that could be read by  a USER,
  and the large number of USERS who could be my friend, I cant
  practically model  BOOKS READ BY USERS and  USERS WHO ARE MY FRIEND as
  ListProperties...

  ...Because I would blow the 5000 index limit per entity, because each
  value of ListPropery generates its own index entry.  Is that correct?

 you can have multiple ListProperty Entities per User, all in the same
 entity group. When you query, it will return a key if, say, the BOOK
 is in any of the associated lists.  This is how I handle it. If one
 list approaches 5000 entries, I just spawn a new related list and
 start filling it instead.

 I really recommend you watch this I/O presentation closely. It
 basically spells out how to do this (better than I could hope to
 explain)http://sites.google.com/site/io/building-scalable-web-applications-wi...

-- 
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] App Engine scheduled downtime NOW

2010-07-07 Thread Wesley C (Google)
App Engine is in its read-only period NOW for scheduled maintenance.
Subscribe to the downtime notify group (link below) to be alerted of
these system activities.

Reading: http://bit.ly/cqMhGr
Subscribe: http://bit.ly/9xO5AJ

-- Wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Core Python Programming, Prentice Hall, (c)2007,2001
Python Fundamentals, Prentice Hall, (c)2009
   http://corepython.com

wesley.chun : wesc+api at google.com : @wescpy
developer relations :: google app engine
@app_engine :: googleappengine.blogspot.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] Re: App Engine scheduled downtime NOW

2010-07-07 Thread Mike
Hi Wesley

Just some feedback - it isn't great when the downtime happens 30
minutes after the scheduled downtime.

For our website www.shoesofprey.com, we display a banner for 1.5 hours
after the scheduled downtime. Posting that message 30 minutes prior
makes us seem foolish, and it also means if the maintenance goes over,
then we don't have the proper banner up.

A solution would be to introduce a new API call: something like
appengine.in_maintenance_window()

That way we could just call that on every request, and display a
window alerting users that the website is offline - or even redirect
to a we're offline for a little while placeholder. That call should
be extremely fast - so calling it on every request should have no
overhead.

That's a much better solution than having to wait for a write to fail,
from a customer expectations point of view...

Thanks guys.

Mike



On Jul 8, 10:24 am, Wesley C (Google) wesc+...@google.com wrote:
 App Engine is in its read-only period NOW for scheduled maintenance.
 Subscribe to the downtime notify group (link below) to be alerted of
 these system activities.

 Reading:http://bit.ly/cqMhGr
 Subscribe:http://bit.ly/9xO5AJ

 -- Wesley
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Core Python Programming, Prentice Hall, (c)2007,2001
 Python Fundamentals, Prentice Hall, (c)2009
   http://corepython.com

 wesley.chun : wesc+api at google.com : @wescpy
 developer relations :: google app engine
 @app_engine :: googleappengine.blogspot.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.



Re: [google-appengine] Re: App Engine scheduled downtime NOW

2010-07-07 Thread Wesley C (Google)
App Engine's scheduled downtime completed earlier than expected today.
The system went back to full read/write as of 5:53p PDT/1253 GMT/UTC.

Please stay tuned to this same channel for next week's scheduled downtime.

-- 
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] list-property, many to many, 5000 indexes...HELP!

2010-07-07 Thread Martin Webb
The way to do it is if you think of books and friends as streams.

This way they are both the same model and you only need one model/api to handle 
both

A book i have read is a stream
and a friend is a stream.

All you now do is subscribe users to friends streams
and users to book streams or book tag streams. you can also map streams to 
streams which then allows tags to include other tags - if you really want to 
get 
nifty.

So the tag - Horror is like a stream and n number of users can subscribe to its 
stream. the stream can then have a path stream/books/horror which then can 
return the activity of that stream and the same for a user use a path as the 
stream name stream/user/martin - which of course would now be my activity 
stream.


This is basically done using the model that you have been give so far.
#parent
class stream(db.Model):
#key_name=path
Count=db.IntegerProperty(default=0) #how many lists we have used - n
 #child
class stream_index(db.Model):
subscribers = db.StringListProperty()  - dont use your user name use a 
stream path - like stream/user/martin


all you now do is create your stream and append your subscribers to it in the 
list property

BUT this brings a whole new contention issue. As the solution above allows 
streams to have millions of subscribers.If they all subscribe or unsubscribe 
you 
may have update issues on the same property - which is why we use sharded 
counters for counts. To work around this you use a pipeline. 2010 IO did a 
whole 
1.5hr chat on this and its good stuff. If you watch it a few times its simple 
to 
grasp and Brets solution can be used for this proposal.

basically rather than append your users to your steam as you would normally

subscribers.append(user.name)

You append them to a work-line - basically a pipe line of work that is picked 
off by a task queue and then batched for updation in your streams. the work is 
then removed from the work line.


class work_line(db.Model):
   
work_index=db.StringProperty() - the work index is a key that depicts the 
task that is fired and what stream that task is for
subscriber=db.StringProperty() #+martin or -martin

The above is a simple work line that simply stores the user name to be 
subscribed  + or unsubscribe -

This sounds all very complex and possibly it is - the good news as i am 
building 
a stream subscription service using a pipeline

view the latest 2010 IO PIPELINES and 2009 building scalable web apps - the 
links are posted all over this group.


Regards
 
 
Martin Webb
The information contained in this email is confidential and may contain 
proprietary information. It is meant solely for the intended recipient. Access 
to this email by anyone else is unauthorised. If you are not the intended 
recipient, any disclosure, copying, distribution or any action taken or omitted 
in reliance on this, is prohibited and may be unlawful. No liability or 
responsibility is accepted if information or data is, for whatever reason 
corrupted or does not reach its intended recipient. No warranty is given that 
this email is free of viruses. The views expressed in this email are, unless 
otherwise stated, those of the author 

 
 





From: Jeff Schwartz jefftschwa...@gmail.com
To: google-appengine@googlegroups.com
Sent: Wed, 7 July, 2010 18:56:10
Subject: Re: [google-appengine] list-property, many to many, 5000  
indexes...HELP!

I wouldn't put the list attribute in your book class due to serialization 
issues 
and exploding indexes. I'd put the list in a sub class of book and query the 
subclass to return a list of entity keys on a match. As child keys contain 
parent keys as well, I'd use the list of keys returned to grab the actual book 
entities. You can refine this as much as you like.

Jeff


On Wed, Jul 7, 2010 at 1:58 AM, stefoid stevenmath...@yahoo.com wrote:

Hi I think I have a fair handle on how Datastore works, but I need to
check, and I need some help with a design

lets say I have:
a very large list of BOOKS
the BOOKS are tagged- adventure+romance,   historical+drama,
animation+sci-fi+comedy, etc...
and I have a very large list of USERS.
USERS can read a very large number of BOOKS
And I, as a USER, can have a very large number of USERS who are my
friend.

What I want , in english, is
;  Return a list of all the BOOKS tagged with sci-fi and romance
that have been read by USERS who are my friend, sorted by Most
Frequently Read.

Now, I know I can model tags with a ListProperty, so that filtering is
easy = WHERE tag AND tag AND tag...
And I know that I can sort Books by Most Frequently Read  quite easily

But due to the large number of BOOKS that could be read by  a USER,
and the large number of USERS who could be my friend, I cant
practically model  BOOKS READ BY USERS and  USERS WHO ARE MY FRIEND as
ListProperties...

...Because I would blow the 5000 index limit per entity, because each
value of ListPropery generates its own index entry.  Is 

Re: [google-appengine] Re: App Engine scheduled downtime NOW

2010-07-07 Thread Wesley C (Google)
mike,

we have this feature already... see the section entitled App Engine
Maintenance Behavior on our early warning post last week:

http://groups.google.com/group/google-appengine-downtime-notify/browse_thread/thread/a8131355d266b37f

related post:
http://groups.google.com/group/google-appengine-python/browse_thread/thread/2a74e6fdc79f5704

related docs:
http://code.google.com/appengine/docs/python/howto/maintenance.html
http://code.google.com/appengine/docs/java/howto/maintenance.html

related preso:
http://www.slideshare.net/jasonacooper/strategies-for-maintaining-app-engine-availability-during-read-only-periods

yes, it isn't documented well nor fully-featured yet, but it's a
start, and we hope to make improvements to it moving forward!

hope this helps!
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Core Python Programming, Prentice Hall, (c)2007,2001
Python Fundamentals, Prentice Hall, (c)2009
   http://corepython.com

wesley.j.chun :: wesc+api-at-google.com :: @wescpy
developer relations :: google app engine
@app_engine :: googleappengine.blogspot.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] Re: App Engine scheduled downtime NOW

2010-07-07 Thread Mike
Oh, that's perfect! Thanks Wesley. Sorry, I missed that.  I was just
looking at this page: 
http://code.google.com/appengine/docs/python/howto/maintenance.html

Thanks! I appreciate too that this maintenance was very short.

Given we rely on AppEngine for our livelihood, we appreciate short
maintenance windows! :-)

Cheers
Mike


On Jul 8, 12:06 pm, Wesley C (Google) wesc+...@google.com wrote:
 mike,

 we have this feature already... see the section entitled App Engine
 Maintenance Behavior on our early warning post last week:

 http://groups.google.com/group/google-appengine-downtime-notify/brows...

 related 
 post:http://groups.google.com/group/google-appengine-python/browse_thread/...

 related 
 docs:http://code.google.com/appengine/docs/python/howto/maintenance.htmlhttp://code.google.com/appengine/docs/java/howto/maintenance.html

 related 
 preso:http://www.slideshare.net/jasonacooper/strategies-for-maintaining-app...

 yes, it isn't documented well nor fully-featured yet, but it's a
 start, and we hope to make improvements to it moving forward!

 hope this helps!
 -- wesley
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Core Python Programming, Prentice Hall, (c)2007,2001
 Python Fundamentals, Prentice Hall, (c)2009
   http://corepython.com

 wesley.j.chun :: wesc+api-at-google.com :: @wescpy
 developer relations :: google app engine
 @app_engine :: googleappengine.blogspot.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.



Re: [google-appengine] Re: App Engine scheduled downtime NOW

2010-07-07 Thread Wesley C (Google)
yes, like i said, it's not documented well. jason's presentation is
probably the best doc we have at the moment! we'll try and get
something official in the docs soon.

no one likes downtimes. i hope that one day we can get rid of them altogether!

cheers,
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Core Python Programming, Prentice Hall, (c)2007,2001
Python Fundamentals, Prentice Hall, (c)2009
   http://corepython.com

wesley.chun : wesc+api at google.com : @wescpy
developer relations :: google app engine
@app_engine :: googleappengine.blogspot.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] Re: list-property, many to many, 5000 indexes...HELP!

2010-07-07 Thread stefoid
Youre right, it does sound complex.  Im not really sure what you're
talking about, but I have yet to view the IO pipeline video, so Ill do
that first.



On Jul 8, 11:22 am, Martin Webb spydre...@yahoo.co.uk wrote:
 The way to do it is if you think of books and friends as streams.

 This way they are both the same model and you only need one model/api to 
 handle
 both

 A book i have read is a stream
 and a friend is a stream.

 All you now do is subscribe users to friends streams
 and users to book streams or book tag streams. you can also map streams to
 streams which then allows tags to include other tags - if you really want to 
 get
 nifty.

 So the tag - Horror is like a stream and n number of users can subscribe to 
 its
 stream. the stream can then have a path stream/books/horror which then can
 return the activity of that stream and the same for a user use a path as the
 stream name stream/user/martin - which of course would now be my activity
 stream.

 This is basically done using the model that you have been give so far.
 #parent
 class stream(db.Model):
     #key_name=path
     Count=db.IntegerProperty(default=0) #how many lists we have used - n
  #child
 class stream_index(db.Model):
     subscribers = db.StringListProperty()  - dont use your user name use a
 stream path - like stream/user/martin

 all you now do is create your stream and append your subscribers to it in the
 list property

 BUT this brings a whole new contention issue. As the solution above allows
 streams to have millions of subscribers.If they all subscribe or unsubscribe 
 you
 may have update issues on the same property - which is why we use sharded
 counters for counts. To work around this you use a pipeline. 2010 IO did a 
 whole
 1.5hr chat on this and its good stuff. If you watch it a few times its simple 
 to
 grasp and Brets solution can be used for this proposal.

 basically rather than append your users to your steam as you would normally

 subscribers.append(user.name)

 You append them to a work-line - basically a pipe line of work that is picked
 off by a task queue and then batched for updation in your streams. the work is
 then removed from the work line.

 class work_line(db.Model):

     work_index=db.StringProperty() - the work index is a key that depicts the
 task that is fired and what stream that task is for
     subscriber=db.StringProperty() #+martin or -martin

 The above is a simple work line that simply stores the user name to be
 subscribed  + or unsubscribe -

 This sounds all very complex and possibly it is - the good news as i am 
 building
 a stream subscription service using a pipeline

 view the latest 2010 IO PIPELINES and 2009 building scalable web apps - the
 links are posted all over this group.

 Regards

 Martin Webb
 The information contained in this email is confidential and may contain
 proprietary information. It is meant solely for the intended recipient. Access
 to this email by anyone else is unauthorised. If you are not the intended
 recipient, any disclosure, copying, distribution or any action taken or 
 omitted
 in reliance on this, is prohibited and may be unlawful. No liability or
 responsibility is accepted if information or data is, for whatever reason
 corrupted or does not reach its intended recipient. No warranty is given that
 this email is free of viruses. The views expressed in this email are, unless
 otherwise stated, those of the author

 
 From: Jeff Schwartz jefftschwa...@gmail.com
 To: google-appengine@googlegroups.com
 Sent: Wed, 7 July, 2010 18:56:10
 Subject: Re: [google-appengine] list-property, many to many, 5000  
 indexes...HELP!

 I wouldn't put the list attribute in your book class due to serialization 
 issues
 and exploding indexes. I'd put the list in a sub class of book and query the
 subclass to return a list of entity keys on a match. As child keys contain
 parent keys as well, I'd use the list of keys returned to grab the actual book
 entities. You can refine this as much as you like.

 Jeff

 On Wed, Jul 7, 2010 at 1:58 AM, stefoid stevenmath...@yahoo.com wrote:

 Hi I think I have a fair handle on how Datastore works, but I need to



 check, and I need some help with a design

 lets say I have:
 a very large list of BOOKS
 the BOOKS are tagged- adventure+romance,   historical+drama,
 animation+sci-fi+comedy, etc...
 and I have a very large list of USERS.
 USERS can read a very large number of BOOKS
 And I, as a USER, can have a very large number of USERS who are my
 friend.

 What I want , in english, is
 ;  Return a list of all the BOOKS tagged with sci-fi and romance
 that have been read by USERS who are my friend, sorted by Most
 Frequently Read.

 Now, I know I can model tags with a ListProperty, so that filtering is
 easy = WHERE tag AND tag AND tag...
 And I know that I can sort Books by Most Frequently Read  quite easily

 But due to the large number of BOOKS that could be read by  a USER,
 and the 

[google-appengine] Re: list-property, many to many, 5000 indexes...HELP!

2010-07-07 Thread stefoid
oh, wait.  If I replace your word 'stream' with 'follower' like a
twitter follower, then I think it immediately makes a lot more sense.

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