[appengine-java] Re: Problem accessing a file on file system

2010-01-06 Thread Steph
Got it. Thanks!

On Jan 5, 12:46 am, m seleron seler...@gmail.com wrote:
 Hi,

 Though it doesn't confirm so much.

 I put the file in /WEB-INF directly.
 I think if you can access this form.
 WEB-INF/myfile.dat

 Please Try
 Thanks.

 On 1月5日, 午後4:57, Steph steph@gmail.com wrote:



  I am using a RandomAccessFile, which is whitelisted on Google App
  Engine.

  My simple code looks like:

    RandomAccessFile file = new RandomAccessFile(/WEB-INF/classes/
  myfile.dat, r);

  which gets a

  java.security.AccessControlException: access denied
  (java.io.FilePermission \WEB-INF\classes\myfile.dat read)
          at java.security.AccessControlContext.checkPermission
  (AccessControlContext.java:323)
          at java.security.AccessController.checkPermission
  (AccessController.java:546)
          at java.lang.SecurityManager.checkPermission(SecurityManager.java:
  532)

  Same thing if I put the file in /WEB-INF directly.

  Am I missing something? Thanks for your help.
-- 
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: Incoming mail handler runs slow

2010-01-06 Thread jd
To avoid these long loading requests you can either make your app
faster to load or keep it warm by pinging a page with a cron job, say
every minute.  Cron jobs will only work on the default (live) version
so I wrote a PingTaskServlet that simply places another task in the
queue and finishes.

On Dec 30 2009, 2:13 pm, Derek Battams de...@battams.ca wrote:
 I've written an incoming mail handler and it works, that is, it does
 what I want it to do, but it runs slow, very slow.  However, I'm not
 sure why it's so slow because I'm using theQuotaServiceto time how
 long the doPost() method of my email handler servlet is running and
 it's returning 0.00 CPU seconds and 0.04 API seconds, yet the logs
 routinely report the requests taking over 1ms.

 I notice that if I fire two emails in rapid succession at my app then
 usually the first one reports as taking 1+ ms to run then the
 second one will run in under 150ms, which is confusing me even more.
 It's almost like the app is having to spin up on every email it
 receives, but 10+ seconds for the spin up seems way too long.  Is
 there something I should be watching out for when writing incoming
 email handlers?
-- 
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: custom vs. generated keys / storage?

2010-01-06 Thread phraktle
Hi,

I'm using the low-level DS API, thus short names for kinds, etc, and
my keys are already quite compact. The encoded version is in fact
significantly longer than my own key. So it would optimal, if DS did
not try to second-guess and bloat my PKs. How do you know that DS
doesn't actually store both versions? Do you know how to decode the DS
key?

Regards,
  Viktor


On Jan 5, 5:54 am, jd jdpatter...@gmail.com wrote:
 The encoded Entity Key is a representation that includes your key
 name, entity kind, ancestors and app id - encoded into a form that is
 safe to use in urls etc.  Keeping your keys small and kinds small
 (i.e. using short class names) will reduce storage space of keys in
 the DS.  In Twig (i.e. not JDO) you can keep the names of your classes
 as you like and then override typetoKind(Type) to return abbreviated
 names.  I found that this saves a significant amount of space in my
 app that has many relations between entities.

 http://code.google.com/p/twig-persist/

 On Jan 4, 5:01 pm, phraktle phrak...@gmail.com wrote:



  Hi,

  I'm generating my own entity keys, with new Entity(Foo, myId). I
  noticed that in the DataStore viewer, these entities still seem to
  have a default key:

  Decoded entity key: Foo: name=myId
  Entity key:
  ahFzY2FyYWJyZWNvbW1lbmRlcnJACxIVUHJvZHVjdFJlY29tbWVuZGF0aW9uIiU1OTg1MEMzMzM 
  wOUZGRjV8MjAxMDAxMDQwMTAzNTN8cHJvZF8wDA

  So the Entity key here still seems to be generated by GAE. Why is
  this needed? I do have a primary key already. So does it get stored as
  simply another indexed column? Does this impact storage space too? I
  don't need the GAE entity key at all, and would prefer not having to
  pay for its storage either :)

  Thanks,
    Viktor
-- 
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: Datanucleus initialization performance

2010-01-06 Thread Todd Lindner
@Don - yes

@Toby - yes on the dev appserver the first request also takes about 6
seconds.  Watching the info log I see it finishes initialization of my
servlet after 1.5 seconds and then starts up the datanucleus
initialization, which takes about 4-5 seconds.   Attaching a profiler
is a good idea and I will do it tonight but I'm 99% sure the hotspots
will be in org.datanucleus packages, which is why I was posting here
to hopefully find the ear of Max Ross or the like...


On Jan 5, 12:56 pm, Toby Reyelts to...@google.com wrote:
 Also, can you duplicate the slowness in the dev_appserver? If so, you can
 hook up a profiling tool yourself and see if there are any obvious hotspots.



 On Tue, Jan 5, 2010 at 12:44 PM, Don Schwarz schwa...@google.com wrote:
  Have you tried enabling offline precompilation?

  On Tue, Jan 5, 2010 at 8:52 AM, Todd Lindner todd.lind...@gmail.comwrote:

  Since Google App Engine will power down the app if there aren't any
  requests for ~10 minutes, it has to re-initialize your application
  often.  Not a problem  I was able to trim my app init down to
  about 1.5 seconds, so its reasonable, but datanucleus itself takes
  about 5 seconds on top of that (and I only have 5 persistent
  entities!).  This is a real drag on my app and I almost want to keep
  it awake with a pinger...

  Any way to speed up initialization?  I'm using JPA.

  Thanks
  -Todd

  --

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

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




[appengine-java] child class be part of two higher classes - how?

2010-01-06 Thread aswath satrasala
I have the following 3 classes.  How can I make the Party as part of both
Tenant and GlAccountOrganization classes.

public class Party {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
@Extension(vendorName=datanucleus, key=gae.encoded-pk, value=true)
private String id;
..
}

public class Tenant {
...
private String name;
private ListParty partyList;
}

public class GlAccountOrganization {

private Party party;
...
}


I do the following in the JDOTestCase
public void testGlAccountOrganization() {

beginTxn();
Tenant tenant = new Tenant();
tenant.setName(vs);
Party party = new Party();
tenant.add(party);
pm.makePersistent(tenant);
commitTxn();

beginTxn();
GlAccountOrganization gl = new GlAccountOrganization();
gl.setOrganizationParty(party);
pm.makePersistent(gl);
commitTxn();
}
Detected attempt to establish GlAccountOrganization(2) as the parent of
Tenant(vs)/Party(1) but the entity identified by Tenant(vs)/Party(1) is
already a child of Tenant(vs).  A parent cannot be established or changed
once an object has been persisted.
org.datanucleus.store.appengine.FatalNucleusUserException: Detected attempt
to establish GlAccountOrganization(2) as the parent of Tenant(vs)/Party(1)
but the entity identified by Tenant(vs)/Party(1) is already a child of
Tenant(vs).  A parent cannot be established or changed once an object has
been persisted.

thanks
-Aswath
-- 

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] Bulkloader Issue

2010-01-06 Thread Miroslav Genov

Hello,
I'm trying to import an existing database into a testing application, 
but I'm encountering the following problem. Here are the commands which 
I'm using:


mat...@mgenov-laptop:~/temp/backup/100106-145759$ 
~/development/google_appengine/bulkloader.py --app_id=mgenovtestapp 
--url=http://mgenovtestapp.appspot.com/remote_api --kind=AddressEntity 
--restore --filename=AddressEntity.sqlite --debug
/home/matrix/development/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py:64: 
DeprecationWarning: the sha module is deprecated; use the hashlib module 
instead

 import sha
[INFO] Logging to bulkloader-log-20100106.161013
[INFO] Throttling transfers:
[INFO] Bandwidth: 25 bytes/second
[INFO] HTTP connections: 8/second
[INFO] Entities inserted/fetched/modified: 20/second
[INFO] Opening database: bulkloader-progress-20100106.161013.sql3
[DEBUG   ] [Thread-1] RestoreThread: started
[DEBUG   ] [Thread-1] RestoreThread: exiting
[DEBUG   ] [Thread-2] RestoreThread: started
[DEBUG   ] [Thread-2] RestoreThread: exiting
[DEBUG   ] [WorkerThread-0] WorkerThread: started
[DEBUG   ] [WorkerThread-1] WorkerThread: started
[DEBUG   ] [WorkerThread-2] WorkerThread: started
[DEBUG   ] [WorkerThread-3] WorkerThread: started
[DEBUG   ] [WorkerThread-4] WorkerThread: started
[DEBUG   ] [WorkerThread-5] WorkerThread: started
[DEBUG   ] [WorkerThread-6] WorkerThread: started
[DEBUG   ] [WorkerThread-7] WorkerThread: started
[DEBUG   ] [WorkerThread-8] WorkerThread: started
[DEBUG   ] [WorkerThread-9] WorkerThread: started
[DEBUG   ] Configuring remote_api. url_path = /remote_api, servername = 
mgenovtestapp.appspot.com

[DEBUG   ] Bulkloader using app_id: mgenovtestapp
[INFO] Connecting to mgenovtestapp.appspot.com/remote_api
Traceback (most recent call last):
 File /home/matrix/development/google_appengine/bulkloader.py, line 
67, in module

   run_file(__file__, globals())
 File /home/matrix/development/google_appengine/bulkloader.py, line 
63, in run_file

   execfile(script_path, globals_)
 File 
/home/matrix/development/google_appengine/google/appengine/tools/bulkloader.py, 
line 3960, in module

   sys.exit(main(sys.argv))
 File 
/home/matrix/development/google_appengine/google/appengine/tools/bulkloader.py, 
line 3956, in main

   return _PerformBulkload(arg_dict)
 File 
/home/matrix/development/google_appengine/google/appengine/tools/bulkloader.py, 
line 3814, in _PerformBulkload

   return_code = app.Run()
 File 
/home/matrix/development/google_appengine/google/appengine/tools/bulkloader.py, 
line 3125, in Run

   self.RunPostAuthentication()
 File 
/home/matrix/development/google_appengine/google/appengine/tools/bulkloader.py, 
line 3230, in RunPostAuthentication

   self.request_manager.IncrementId(list(ancestor_path), kind, high_id)
 File 
/home/matrix/development/google_appengine/google/appengine/tools/bulkloader.py, 
line 1200, in IncrementId

   assert end = high_id
AssertionError
mat...@mgenov-laptop:~/temp/backup/100106-145759$

Note that the size of the AddressEntity.sqlite is around 500kbytes (not 
too much I think).


With the same command I was able to import some other entities which 
where with lower size but this entity is causing a problem.


Any idea what I'm doing wrong or maybe there is some issue with the 
appengine ?


Note that the RemoteApiServlet is mapped as follow:
servlet
   servlet-nameremoteapi/servlet-name
   
servlet-classcom.google.apphosting.utils.remoteapi.RemoteApiServlet/servlet-class

 /servlet
 servlet-mapping
   servlet-nameremoteapi/servlet-name
   url-pattern/remote_api/url-pattern
 /servlet-mapping
 security-constraint
   web-resource-collection
 web-resource-nameremoteapi/web-resource-name
 url-pattern/remote_api/url-pattern
   /web-resource-collection
   auth-constraint
 role-nameadmin/role-name
   /auth-constraint
 /security-constraint


Regards,
 Miroslav



-- 
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] Html to image in java

2010-01-06 Thread tal
Hi,
In my app I need to capture Html into image.
All solutions, code, third party etc. require either windows platform,
or Java AWT library, which is not supported by GAE.
The ImagesService by Google, is designed to manipulate images once you
have the source image.
Any suggestions?
-- 
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: why my app on GAE first access is so slow

2010-01-06 Thread Jorge
It´s been a lot of discussion about this topic lately. See for
instance Tragedy of the Commons, and Cold Starts.

I own dedicated servers with other hosts and what I´ve been doing is
automatically generating http request to my GAE app every 40 seconds.
I started with 60 seconds and that became insufficient. Nevertheless,
the Tragedy of the Commons seams to be real, because now 40 seconds is
not enough to keep the app warm.

My hope is Google will come up with a satisfactory solution soon.
Maybe a fee to keep your application warm. I agree the cold startup
time is absolutely unacceptable.

Jorge Gonzalez


On Nov 12 2009, 6:56 am, DrMorten morten.dalgaard.niel...@gmail.com
wrote:
 1 minute works for me, I used a commercial service that tracks uptime
 to check it.
 Trouble is that the commercial service checks randomly from different
 locations all over the world.
 meaning that the application loads out of memory because its hosted in
 different locations, effectivly killing my CPU qouta.

 On Nov 12, 3:36 am, zhiw...@gmail.com zhiw...@gmail.com wrote:

  i only test it in my country, i don't know whether it is still
  effective for request that from a foreign country. but to me it is
  enough

  On Nov 12, 10:30 am, zhiw...@gmail.com zhiw...@gmail.com wrote:

   i turn it to 1min, the cron job access a servlet that do nothing just
   for active the app. every 24h it only used 1% of the free cpu-time .
   now at least when i access my app, it was not slow like before. but
   sometime the app still be inactive, although the cron job active the
   app, when i access sush as mainpage, it still took sometime
   to load the servlet. gae doc wrote: load-on-start doesn't work , the
   servlet will be load on first accessed.  i think use cron job to
   access mainpage is better. now i have not try ths.

   On Nov 12, 5:04 am, James H james.hollier...@gmail.com wrote:

So, 1-3 minute intervals seem to do the trick?  Is this technique
still working for you?

On Nov 10, 8:24 pm, zhiw...@gmail.com zhiw...@gmail.com wrote:

 i think the gae cloud envrionment does not have the region concept.
 every app run on a virtual server , the cron job is used to make the
 virtual server active.  if the virtual server is active, when access
 the app, there is no need to reinit such as spring listener etc, so
 delay time is short, that is so simple  i think.

 On Nov 10, 7:30 am, James H james.hollier...@gmail.com wrote:

  How would a single cron task really help in an environment where
  multitudes of app servers are involved based on demand, geography,
  etc?  So, how will the task that just ran help someone in U.S. and
  simultaneously help someone in Russia on the same app?  I assume 
  they
  are potentially running on different app servers.

  On Nov 10, 1:51 am, m seleron seler...@gmail.com wrote:

   Thank you for useful information.

   Though various situations are thought
   I think that a detailed analysis might be necessary to decrease 
   the CPU TIME.

   thunks

   2009/11/10 zhiw...@gmail.com zhiw...@gmail.com:

now i set the schedule time to 3min, it seems work, every time i
access my app, i can hardly feel slow. my cron job access a 
servlet
that do nothing and just for active my app. set the schedule 
time to
1min is better i think,although it will take some cpu time.

On Nov 9, 11:31 pm, m seleron seler...@gmail.com wrote:
I'm sorry very much.

It examined.
ServletContextListener#contextDestoryed was not called.
It was necessary to examine it accurately.

Nichole.
Thank you for advice.

Does not the page access speed become early?

When you access that I think access speed is open in since the 
second
times always
because by the thing that keeps being accessed with cron

If the display speed is still slow, the cause might be 
different.

thanks,

On Nov 9, 11:30 pm, zhiw...@gmail.com zhiw...@gmail.com 
wrote:

 i set the time to 5min , but i can still find the 
 contextInitialized
 info, seems gae's time-out is very short, now i test set it 
 to 3min

 On Nov 9, 10:18 pm, Joseph Stano joseph.st...@gmail.com 
 wrote:

  have you noticed if that solves the timeout issue?

  On Mon, Nov 9, 2009 at 5:04 AM, zhiw...@gmail.com 
  zhiw...@gmail.com wrote:

   it seems only contextInitialized method can be executed, 
   and
   contextDestroyed never be executed. so i can not get the 
   time my app
   alive after it was actived.  i have use cron job to 
   access a servlet
   in my app every 10min to avoid app be inactive, if 
   necessary i will
   turn the time to 5min or less

   On Nov 9, 11:40 am, 

[appengine-java] QuotaService

2010-01-06 Thread jd
Hi, Should the QuotaService be working?  I always get 0 for
getCpuTimeInMegaCycles()
-- 
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] Html to image in java

2010-01-06 Thread Don Schwarz
That sounds like an interesting feature request.  Feel free to file it in
our issue tracker:

http://code.google.com/p/googleappengine/issues/list

On Wed, Jan 6, 2010 at 8:18 AM, tal tal.j@gmail.com wrote:

 Hi,
 In my app I need to capture Html into image.
 All solutions, code, third party etc. require either windows platform,
 or Java AWT library, which is not supported by GAE.
 The ImagesService by Google, is designed to manipulate images once you
 have the source image.
 Any suggestions?

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




-- 

You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group.

To post to this group, send email to google-appengine-j...@googlegroups.com.

To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com.

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



[appengine-java] Re: Datanucleus initialization performance

2010-01-06 Thread Todd Lindner
Only 5 :)

But your first point could explain things...  I probably have a few
too many 3rd party jars in my war.  Will look for unnecessary ones.

But to be even more pro-active, is there a way we can tell it what
bundles to load?  So it can skip all the jar searching?  Especially
since it does enhancement before hand, it should write out a manifest
of exactly which classes need to have metadata constructed.  _or_
(haha) the metadata could be pre-built as well.


On Jan 6, 1:02 pm, Max Ross (Google) maxr+appeng...@google.com
wrote:
 DataNucleus has an internal plugin mechanism that spins through all the jars
 on the classpath looking for bundles to load.  This can certainly take some
 time.  Construction of metadata is also pretty involved, but the amount of
 time that takes should be proportional to the number of enhanced classes you
 have.  How many do you have?



 On Wed, Jan 6, 2010 at 4:36 AM, Todd Lindner todd.lind...@gmail.com wrote:
  @Don - yes

  @Toby - yes on the dev appserver the first request also takes about 6
  seconds.  Watching the info log I see it finishes initialization of my
  servlet after 1.5 seconds and then starts up the datanucleus
  initialization, which takes about 4-5 seconds.   Attaching a profiler
  is a good idea and I will do it tonight but I'm 99% sure the hotspots
  will be in org.datanucleus packages, which is why I was posting here
  to hopefully find the ear of Max Ross or the like...

  On Jan 5, 12:56 pm, Toby Reyelts to...@google.com wrote:
   Also, can you duplicate the slowness in the dev_appserver? If so, you can
   hook up a profiling tool yourself and see if there are any obvious
  hotspots.

   On Tue, Jan 5, 2010 at 12:44 PM, Don Schwarz schwa...@google.com
  wrote:
Have you tried enabling offline precompilation?

On Tue, Jan 5, 2010 at 8:52 AM, Todd Lindner todd.lind...@gmail.com
  wrote:

Since Google App Engine will power down the app if there aren't any
requests for ~10 minutes, it has to re-initialize your application
often.  Not a problem  I was able to trim my app init down to
about 1.5 seconds, so its reasonable, but datanucleus itself takes
about 5 seconds on top of that (and I only have 5 persistent
entities!).  This is a real drag on my app and I almost want to keep
it awake with a pinger...

Any way to speed up initialization?  I'm using JPA.

Thanks
-Todd

--

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

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

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




[appengine-java] Re: why my app on GAE first access is so slow

2010-01-06 Thread jd
I use a task to ping itself every minute... no need to use external
servers.  I find that one minute seems enough but that occasionally
there are still loading requests as Google serves my request from a
different server - maybe to rebalance load?  The app is much more
responsive now but I assume that the only real solution is to speed up
the start up time.  Unfortunately, I chose to use Wicket and Guice -
both of which take too much time up front to initialize.

On Jan 6, 9:33 pm, Jorge athenas...@gmail.com wrote:
 It´s been a lot of discussion about this topic lately. See for
 instance Tragedy of the Commons, and Cold Starts.

 I own dedicated servers with other hosts and what I´ve been doing is
 automatically generating http request to my GAE app every 40 seconds.
 I started with 60 seconds and that became insufficient. Nevertheless,
 the Tragedy of the Commons seams to be real, because now 40 seconds is
 not enough to keep the app warm.

 My hope is Google will come up with a satisfactory solution soon.
 Maybe a fee to keep your application warm. I agree the cold startup
 time is absolutely unacceptable.

 Jorge Gonzalez

 On Nov 12 2009, 6:56 am, DrMorten morten.dalgaard.niel...@gmail.com
 wrote:



  1 minute works for me, I used a commercial service that tracks uptime
  to check it.
  Trouble is that the commercial service checks randomly from different
  locations all over the world.
  meaning that the application loads out of memory because its hosted in
  different locations, effectivly killing my CPU qouta.

  On Nov 12, 3:36 am, zhiw...@gmail.com zhiw...@gmail.com wrote:

   i only test it in my country, i don't know whether it is still
   effective for request that from a foreign country. but to me it is
   enough

   On Nov 12, 10:30 am, zhiw...@gmail.com zhiw...@gmail.com wrote:

i turn it to 1min, the cron job access a servlet that do nothing just
for active the app. every 24h it only used 1% of the free cpu-time .
now at least when i access my app, it was not slow like before. but
sometime the app still be inactive, although the cron job active the
app, when i access sush as mainpage, it still took sometime
to load the servlet. gae doc wrote: load-on-start doesn't work , the
servlet will be load on first accessed.  i think use cron job to
access mainpage is better. now i have not try ths.

On Nov 12, 5:04 am, James H james.hollier...@gmail.com wrote:

 So, 1-3 minute intervals seem to do the trick?  Is this technique
 still working for you?

 On Nov 10, 8:24 pm, zhiw...@gmail.com zhiw...@gmail.com wrote:

  i think the gae cloud envrionment does not have the region concept.
  every app run on a virtual server , the cron job is used to make the
  virtual server active.  if the virtual server is active, when access
  the app, there is no need to reinit such as spring listener etc, so
  delay time is short, that is so simple  i think.

  On Nov 10, 7:30 am, James H james.hollier...@gmail.com wrote:

   How would a single cron task really help in an environment where
   multitudes of app servers are involved based on demand, geography,
   etc?  So, how will the task that just ran help someone in U.S. and
   simultaneously help someone in Russia on the same app?  I assume 
   they
   are potentially running on different app servers.

   On Nov 10, 1:51 am, m seleron seler...@gmail.com wrote:

Thank you for useful information.

Though various situations are thought
I think that a detailed analysis might be necessary to decrease 
the CPU TIME.

thunks

2009/11/10 zhiw...@gmail.com zhiw...@gmail.com:

 now i set the schedule time to 3min, it seems work, every 
 time i
 access my app, i can hardly feel slow. my cron job access a 
 servlet
 that do nothing and just for active my app. set the schedule 
 time to
 1min is better i think,although it will take some cpu time.

 On Nov 9, 11:31 pm, m seleron seler...@gmail.com wrote:
 I'm sorry very much.

 It examined.
 ServletContextListener#contextDestoryed was not called.
 It was necessary to examine it accurately.

 Nichole.
 Thank you for advice.

 Does not the page access speed become early?

 When you access that I think access speed is open in since 
 the second
 times always
 because by the thing that keeps being accessed with cron

 If the display speed is still slow, the cause might be 
 different.

 thanks,

 On Nov 9, 11:30 pm, zhiw...@gmail.com zhiw...@gmail.com 
 wrote:

  i set the time to 5min , but i can still find the 
  contextInitialized
  info, seems gae's time-out is very short, now i test set 
  it to 3min

  On Nov 9, 10:18 pm, Joseph Stano 

[appengine-java] Re: Datanucleus initialization performance

2010-01-06 Thread datanucleus
 But to be even more pro-active, is there a way we can tell it what
 bundles to load?  So it can skip all the jar searching?  Especially
 since it does enhancement before hand, it should write out a manifest
 of exactly which classes need to have metadata constructed.  _or_
 (haha) the metadata could be pre-built as well.

The plugin registry is for registering *plugins* (for DataNucleus - of
which GAE/J provides one - as per an OSGi plugin mechanism), not for
what classes are being persisted. There is (currently) no way of
defining which jars are scanned - classpath getResource() calls.
In traditional systems nobody in their right mind would want to
restart an app continually.

But rather than even think about such things, why not demonstrate it
with facts. The log tells you timings, for plugin loading, and then
for loading metadata, and other things.
-- 
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] SQL to Datastore Query object

2010-01-06 Thread keyurva
This is likely a common scenario and I'm wondering if someone has
already written some code to do this that I can steal.

I'm using the low-level datastore API. In my app, users will be
entering a SQL where clause. For instance:

category = Java and rating  5

This translates to the com.google.appengine.api.datastore.Query object
as such:

Query q = new Query(a kind);
q.addFilter(category, Query.FilterOperator.EQUAL, Java);
q.addFilter(rating, Query.FilterOperator.GREATER_THAN, 5);

Has anyone written a generic library that does this translation?

Thanks,
Keyur
-- 
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] SQL to Datastore Query object

2010-01-06 Thread Vince Bonfanti
I've written such a translater that implements a subset of JDOQL:

 https://code.google.com/p/lowlevelquery/

https://code.google.com/p/lowlevelquery/There's really no documentation
other than the source code, which is a single class:


https://code.google.com/p/lowlevelquery/source/browse/trunk/src/com/newatlanta/appengine/datastore/LowLevelQuery.java

https://code.google.com/p/lowlevelquery/source/browse/trunk/src/com/newatlanta/appengine/datastore/LowLevelQuery.javaThe
LowLevelQuery class contains a number of static methods that let you execute
a JDOQL-like query string directly; for example:

ListEntity results = LowLevelQuery.asList( select from myKind where
category = 'Java' and rating  5 );

LowLevelQuery also implements the PreparedQuery interface; you can create a
LowLevelQuery instance from a query string and then use it just like you
would a PreparedQuery; for example:

PreparedQuery myQuery = new LowLevelQuery( select from myKind where
category = 'Java' and rating  5 );
ListEntity results = myQuery.asList();

Let me know what you think.

Vince

On Wed, Jan 6, 2010 at 3:06 PM, keyurva keyu...@gmail.com wrote:

 This is likely a common scenario and I'm wondering if someone has
 already written some code to do this that I can steal.

 I'm using the low-level datastore API. In my app, users will be
 entering a SQL where clause. For instance:

 category = Java and rating  5

 This translates to the com.google.appengine.api.datastore.Query object
 as such:

 Query q = new Query(a kind);
 q.addFilter(category, Query.FilterOperator.EQUAL, Java);
 q.addFilter(rating, Query.FilterOperator.GREATER_THAN, 5);

 Has anyone written a generic library that does this translation?

 Thanks,
 Keyur

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




-- 

You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group.

To post to this group, send email to google-appengine-j...@googlegroups.com.

To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com.

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



[appengine-java] encounter server internal error (code = 500) when I deploy my web app into prom.corp.google.com

2010-01-06 Thread John Lin
I upgrade my GWT application (from GWT 1.7.1 to GWT 2.0) and GAE (from
1.2.6 to 1.3.0)  I have deployed this application into appspot.com
successfully.  However, I encounter server internal error (code = 500)
when I deploy this application into prom.corp.google.com.  Does anyone
know why ?  Please advise me.  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] Maven

2010-01-06 Thread Marcel Overdijk
Is GAE 1.3.0 available in central maven repo?

Would be nice if Google GAE team could create a subpage on the GAE
docs homepage with information for maven.

Many users would appreciate this.

Thanks,
Marcel
-- 
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] Search functionality using Compass

2010-01-06 Thread dantuluri
Hi,

   Anybody implemented the search functionality using Compass on App
engine? If so, can you share your experiences? Did you face any
issues, how they are solved? How it impacted your Billing?

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: select count(*) ?

2010-01-06 Thread king
just to follow up on a pending question back a few months ago.  When
the java datastore export will be
available?




On Dec 18 2009, 2:47 am, Jorge athenas...@gmail.com wrote:
 I second this question.

 Jorge Gonzalez

 On Dec 2, 1:19 pm, king kingalpha...@gmail.com wrote:



  Jason, do you have a timeline for when:
  1. the cursor feature will be available?
  2. the data download feature be available for JAVA (not Python).

  On Oct 21, 10:54 am, Jason (Google) apija...@google.com wrote:

   The query restrictions are an artifact of the way App Engine's datastore 
   is
   constructed, which makes certain operations (e.g. queries and reads) very
   fast and scalable but does limit the types of queries you can make, though
   you can typically get around these restrictions by re-thinking your model 
   a
   bit.

   We are working on adding built-in cursor support for easier paging through
   entities and have just added a datastore statistics API for, among other
   things, getting the total entity count, even if it exceeds 1,000. More
   details here:

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

   And we also have a data export utility included with the SDK to make it
   easier for you to back up or even move off of App Engine should you choose
   to, and we're continuing to look at ways of making App Engine, 
   particularly
   the datastore component, easier to use.

  http://code.google.com/appengine/docs/python/tools/uploadingdata.html...

   - Jason

   On Mon, Oct 19, 2009 at 1:53 PM, vetch oldpete...@gmail.com wrote:

On 6 Paź, 10:03, Jason (Google) apija...@google.com wrote:
 * Because App Engine queries can only return up to 1,000 results,
 count(this) will never return above 1,000, even if you have more than
1,000
 entities, so bear this in mind.

I'm deeply shocked. This works like some black hole.

You put your data there simply, but can't get them back that simply.

In connection with restricions (inequality property filter), it is
even harder to get anything more complex.

BiGAppEngine disappointment.
-- 
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 can I get to the Google App Engine Dashboard?

2010-01-06 Thread Amber
I am trying to deploy an in-development application, so that I can see
the Users service in action.  I went to http://appengine.google.com/
and created a new application (two, actually).  I know that they went
through because when I checked the name availability before-hand it
was available and then after I hit Create those names were no longer
available.  I received no error or confirmation message when I hit
create, it just directed me back to the Welcome page.  The only option
on the Welcome page is the Create an Application button.  All links
point to http://appengine.google.com/ but that only takes me to the
welcome page, not a dashboard.

I also tried deploying to the newly created applications, and it says
the deploy was successful but nothing loads on those URLs (http://
homecook-in.appengine.com).

There is an image of a dashboard on this page (http://code.google.com/
appengine/articles/domains.html) but I can't seem to find anything
like it.

Am I missing something obvious, or perhaps is the appengine dashboard
down right now.. ?

Thanks!
Amber
-- 
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] http 503 error

2010-01-06 Thread mminopuga
I changed from jre to jdk, but now i get a http 503 error message
can anybody help me with that?
-- 
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] Exception when using JPA: Type xxx is not that of an entity but needs to be for this operation

2010-01-06 Thread Matthias
I'm facing a problem when using a slightly changed JPA Controller
Class generated out of my entity class by NetBeans 6.8. In this JPA
Controller Class I'm using the EMF (Entity Manager Factory) as
described here: 
http://code.google.com/appengine/docs/java/datastore/usingjpa.html#Getting_an_EntityManager_Instance

I'm using AppEngine-Java-SDK-1.3.0. Why do I get the is not that of
an entity but needs to be for this operation exception:

==

public class MessageJpaController {

private EntityManagerFactory emf = null;

public MessageJpaController() {
emf = EMF.get();
}

public EntityManager getEntityManager() {
return emf.createEntityManager();
}

public void create(Message message) {
EntityManager em = null;
try {
em = getEntityManager();
em.getTransaction().begin();
em.persist(message);
em.getTransaction().commit();
} catch (Exception ex) {
throw new PersistenceException(ex);
} finally {
if (em != null) {
em.close();
}
}
}

...
}

==

@Entity
public class Message implements Serializable {

private static final long serialVersionUID = 1L;

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

private String message;

@Temporal(javax.persistence.TemporalType.TIMESTAMP)
private Date dateTime;

public Long getId() {
return id;
}

public void setId(Long id) {
this.id = id;
}

public String getMessage() {
return message;
}

public void setMessage(String message) {
this.message = message;
}

public Date getDateTime() {
return dateTime;
}

public void setDateTime(Date dateTime) {
this.dateTime = dateTime;
}

@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Message other = (Message) obj;
if (this.id != other.id  (this.id == null || !this.id.equals
(other.id))) {
return false;
}
return true;
}

@Override
public int hashCode() {
int hash = 7;
hash = 37 * hash + (this.id != null ? this.id.hashCode() : 0);
return hash;
}
}

==

 [java] java.lang.IllegalArgumentException: Type
(de.alteskind.appengine.jpa.Message) is not that of an entity but
needs to be for this operation
 [java] at
org.datanucleus.jpa.EntityManagerImpl.assertEntity
(EntityManagerImpl.java:888)
 [java] at org.datanucleus.jpa.EntityManagerImpl.persist
(EntityManagerImpl.java:385)
 [java] at
de.alteskind.appengine.jpa.MessageJpaController.create
(MessageJpaController.java:28)
 [java] at
de.alteskind.appengine.jsf.MessageView.createMessage(MessageView.java:
36)
 [java] at sun.reflect.NativeMethodAccessorImpl.invoke0
(Native Method)
 [java] at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
 [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
 [java] at java.lang.reflect.Method.invoke(Method.java:
597)
 [java] at
com.google.appengine.tools.development.agent.runtime.Runtime.invoke
(Runtime.java:100)
 [java] at com.sun.el.parser.AstValue.invoke(AstValue.java:
187)
 [java] at com.sun.el.MethodExpressionImpl.invoke
(MethodExpressionImpl.java:297)
 [java] at
com.sun.faces.facelets.el.TagMethodExpression.invoke
(TagMethodExpression.java:98)
 [java] at
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke
(MethodBindingMethodExpressionAdapter.java:88)
 [java] at
com.sun.faces.application.ActionListenerImpl.processAction
(ActionListenerImpl.java:102)
 [java] at javax.faces.component.UICommand.broadcast
(UICommand.java:315)
 [java] at javax.faces.component.UIViewRoot.broadcastEvents
(UIViewRoot.java:775)
 [java] at
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:
1267)
 [java] at
com.sun.faces.lifecycle.InvokeApplicationPhase.execute
(InvokeApplicationPhase.java:82)
 [java] at com.sun.faces.lifecycle.Phase.doPhase
(Phase.java:101)
 [java] at com.sun.faces.lifecycle.LifecycleImpl.execute
(LifecycleImpl.java:118)
 [java] at javax.faces.webapp.FacesServlet.service
(FacesServlet.java:312)
 [java] at org.mortbay.jetty.servlet.ServletHolder.handle
(ServletHolder.java:487)
 [java] at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1093)
 [java] at

[appengine-java] Cannot load class javax.mail.Session

2010-01-06 Thread David P. Caldwell
My Servlet can't load the Session class at all, running on the
development server or the actual backend.

Is this by design?

Here's the minimal code to demonstrate the problem; it fails both
locally and on the server, albeit with different ClassLoader
implementations:

package example;

public class JavaMailBug extends javax.servlet.http.HttpServlet {
public void init() {
try {
Class c = Class.forName(javax.mail.Session);
System.err.println(Loaded Session);
} catch (ClassNotFoundException e) {
System.err.println(Did not load Session; ClassLoader = 
 +
JavaMailBug.class.getClassLoader());
}
}
}

appengine-web-app xmlns=http://appengine.google.com/ns/1.0;
  applicationJavaMailBug/application
  version1.3.0/version
/appengine-web-app

web-app
servlet
servlet-namedefault/servlet-name
servlet-classexample.JavaMailBug/servlet-class
load-on-startup1/load-on-startup
/servlet
servlet-mapping
servlet-namedefault/servlet-name
url-pattern//url-pattern
/servlet-mapping
/web-app

-- David P. Caldwell
http://www.inonit.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] a description of cron job bug! It's not support for UTF-8

2010-01-06 Thread 时空之蕊
Thanks for your healp:
my cron.xml:
?xml version=1.0 encoding=UTF-8?
cronentries
 cron
   url/cron/flushCache.do/url
   descriptionThis's a Chinese description! 这是一个中文描述!/description
   scheduleevery 2 minutes/schedule
 /cron
/cronentries

When description of cron isn't ascii code,i can't deploy my web app!
so i change description to:descriptionThis's a Chinese description!
/description, it's work ok!
My xml encoding is utf-8,but cron.xml can't supported by utf-8!
-- 
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] Datastore/JDO model - Data Nucleus

2010-01-06 Thread TJain
I have read somewhere that goole app engine will not supporting for
query which is having the two three level join and where clause.

Like suppose we having the  One Person who is having the Multiple
Contact address and in one contact address having multiple phone
numbers.

Can we make a join and condition for getting the name of the person if
we know the phone no of the person.

Let me confirm so that we will start looking at it.

thanks in advance

tjain
-- 
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] Run cronjob every n minutes only on workdays

2010-01-06 Thread Milos
Hello, I have a problem with getting this to work. My cron.xml looks
like this:

cronentries
  cron
  url/cron/myCronJob/url
  descriptionmyCronDescription/description
  scheduleevery 15 minutes mon,tue,wed,thu,fri/schedule
  /cron
  /cronentries

I uploaded this successfully, but cronjob runs every 15 minutes, every
day.
Is it possible to configure this job running every n minutes only on
workdays?

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] Session problem

2010-01-06 Thread avdhesh
I got following exception wehn i deploy a application to google apps
engineEverything works fine with EclipsePlugin...May be
EclipsePlugin not able to catch this..

I filed a Bug report...

http://code.google.com/p/googleappengine/issues/detail?id=2606



java.lang.RuntimeException: java.io.NotSerializableException:
com.google.apphosting.utils.jetty.AppEngineWebAppContext
$AppEngineServletContext
at
com.google.apphosting.runtime.jetty.SessionManager.serialize
(SessionManager.java:361)
at
com.google.apphosting.runtime.jetty.SessionManager.createEntityForSession
(SessionManager.java:341)
at
com.google.apphosting.runtime.jetty.SessionManager
$AppEngineSession.save(SessionManager.java:162)
at
com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter
(SaveSessionFilter.java:41)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
(TransactionCleanupFilter.java:43)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
405)
at
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle
(AppVersionHandlerMap.java:238)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
506)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete
(HttpConnection.java:830)
at
com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable
(RpcRequestParser.java:76)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest
(JettyServletEngineAdapter.java:135)
at
com.google.apphosting.runtime.JavaRuntime.handleRequest
(JavaRuntime.java:235)
at
com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:5235)
at
com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:5233)
at
com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest
(BlockingApplicationHandler.java:24)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
363)
at com.google.net.rpc.impl.Server$2.run(Server.java:838)
at
com.google.tracing.LocalTraceSpanRunnable.run
(LocalTraceSpanRunnable.java:56)
at
com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan
(LocalTraceSpanBuilder.java:536)
at com.google.net.rpc.impl.Server.startRpc(Server.java:793)
at com.google.net.rpc.impl.Server.processRequest(Server.java:368)
at
com.google.net.rpc.impl.ServerConnection.messageReceived
(ServerConnection.java:448)
at com.google.net.rpc.impl.RpcConnection.parseMessages
(RpcConnection.java:319)
at com.google.net.rpc.impl.RpcConnection.dataReceived
(RpcConnection.java:290)
at com.google.net.async.Connection.handleReadEvent(Connection.java:
466)
at
com.google.net.async.EventDispatcher.processNetworkEvents
(EventDispatcher.java:759)
at com.google.net.async.EventDispatcher.internalLoop
(EventDispatcher.java:205)
at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:
101)
at com.google.net.rpc.RpcService.runUntilServerShutdown
(RpcService.java:251)
at
com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run
(JavaRuntime.java:394)
at java.lang.Thread.run(Unknown Source)
-- 
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: log4j logging everything as INFO even though I'm doing log.error(xxx);?

2010-01-06 Thread Bill Mers
hi Tb,

I'm having the same problem: all logging statements through log4j are
coming out as Info severity, even if I called log.debug(), log.warn
(), log.error(), etc.

Anybody have any ideas?

thanks
Bill

On Jan 4, 2:12 pm, Tb tho...@bertranfamily.com wrote:
 Hi,

 I switched tolog4jin my app because of the (supposed) ease to send
 out emails with log traces but it's not coming out right in the GAE
 log console. Every error seems to come out as INFO which is pretty
 confusing...

 Am I missing something?
-- 
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] Appengine::Login Error

2010-01-06 Thread sathish12345678
Hi,
I just would like to notify an error message which I got while
navigating from login page of appengine.
Error Message:
Error: Server Error

The server encountered an error and could not complete your request.
If the problem persists, please report your problem and mention this
error message and the query that caused it.


Here is the url of my navigation for debugging.

URL of login page:
https://www.google.com/accounts/ServiceLogin?service=ahcontinue=https://appengine.google.com/_ah/login%3Fcontinue%3Dhttps://appengine.google.com/ltmpl=aesig=c24697718eec1be75b7ab8f8a0c02416
URL of error page:
https://appengine.google.com/_ah/login?continue=https://appengine.google.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: log4j logging everything as INFO even though I'm doing log.error(xxx);?

2010-01-06 Thread Bill Mers
Found this from the GAE docs (http://code.google.com/appengine/docs/
java/runtime.html#Logging):

Lines written to the standard output stream are logged at the INFO
level, and lines written to the standard error stream are logged at
the WARNING level. Any logging framework (such as log4j) that logs
to the output or error streams will work. However, for more fine-
grained control of the Admin Console's log level display, the logging
framework must use a java.util.logging adapter.

So, looks like if you want anything other than INFO or WARNING, ya
gotta use java.util.logging.

cheers
Bill

On Jan 4, 2:12 pm, Tb tho...@bertranfamily.com wrote:
 Hi,

 I switched tolog4jin my app because of the (supposed) ease to send
 out emails with log traces but it's not coming out right in the GAE
 log console. Every error seems to come out asINFOwhich is pretty
 confusing...

 Am I missing something?
-- 
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] Web based application in java.

2010-01-06 Thread yadav
Hi..
  I am trying to develop a small application in java on google apps.it
is mainly depends on data base.my question is how to create entities
and how to retrieve the data from 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.




[appengine-java] how do I upload my xml file?

2010-01-06 Thread dualboot
My application is working in local machine, but not after uploading to
App Engine. I suspect I have my configurations settings on the xml
file and wondering it getup uploaded or not by default.

Tks
-- 
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: Exception When Uploading Application To AppEngine

2010-01-06 Thread Kiryl Bahdanau
I'm seeing the same problem. I am not able to upload any generated
GWT .cache.html files to the server.
The upload is working fine when I remove all .cache.html but failed on
any .cache.html file. The generated GWT file size is about 450 Kb. The
previous GWT version file was possible to upload the file size was
about the same. I updated GWT 1.7 to 2.0 and implemented some logic
changes but without big API changes so HashMap with Serializable
solution will not work for me.

It looks like there is some datastorage issue on App Engine servers.
Small files update is working fine but any big file update is failed
with exception

com.google.appengine.tools.admin.AdminException: Unable to update app:
Error writing to server
at com.google.appengine.tools.admin.AppAdminImpl.update
(AppAdminImpl.java:62)
at com.google.appengine.tools.admin.AppCfg$UpdateAction.execute
(AppCfg.java:521)
at com.google.appengine.tools.admin.AppCfg.init(AppCfg.java:130)
at com.google.appengine.tools.admin.AppCfg.init(AppCfg.java:58)
at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:54)
Caused by: java.io.IOException: Error writing to server
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance
(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at sun.net.www.protocol.http.HttpURLConnection$6.run
(HttpURLConnection.java:1345)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException
(HttpURLConnection.java:1339)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream
(HttpURLConnection.java:993)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:
373)
at com.google.appengine.tools.admin.ServerConnection.send
(ServerConnection.java:129)
at com.google.appengine.tools.admin.ServerConnection.post
(ServerConnection.java:95)
at com.google.appengine.tools.admin.AppVersionUpload.send
(AppVersionUpload.java:527)
at com.google.appengine.tools.admin.AppVersionUpload.uploadFile
(AppVersionUpload.java:433)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload
(AppVersionUpload.java:118)
at com.google.appengine.tools.admin.AppAdminImpl.update
(AppAdminImpl.java:56)
... 4 more
Caused by: java.io.IOException: Error writing to server
at sun.net.www.protocol.http.HttpURLConnection.writeRequests
(HttpURLConnection.java:453)
at sun.net.www.protocol.http.HttpURLConnection.writeRequests
(HttpURLConnection.java:465)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream
(HttpURLConnection.java:1047)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderFieldKey
(HttpURLConnection.java:2160)
at com.google.appengine.tools.util.ClientCookieManager.readCookies
(ClientCookieManager.java:123)
at com.google.appengine.tools.admin.ServerConnection.connect
(ServerConnection.java:340)
at com.google.appengine.tools.admin.ServerConnection.send
(ServerConnection.java:127)
... 9 more

I am using the latest SDK 1.3.0 for upload. Any help would be
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 
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] Handling incoming emails, broken due incorrect attachment size.

2010-01-06 Thread de Witte
Hello,

I'm unable to process correctly incoming attachments. In my case,
UTF-8 xml files of ~3k.

It was working perfectly two days ago.  See issue:
http://code.google.com/p/googleappengine/issues/detail?id=2612

Anyone facing the same problem? using v1.3.0

regards, W.
-- 
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] IllegalAccessException trying to do time zone calculations

2010-01-06 Thread David P. Caldwell
java.lang.IllegalAccessException: Reflection is not allowed on public
int sun.util.calendar.ZoneInfo.getOffset(long)

This is when calling the public API:

java.util.TimeZone.getTimeZone(...).getOffset( [long] )

This error does not occur on the development server (1.3.0).

-- David P. Caldwell
http://www.inonit.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] Unable to get Upload App

2010-01-06 Thread Mit
Hi I Created an App on Google App Engine and now i am trying to upload
the my app on it is shows following error. I did not get get any email
from Google for activating my account yet. if it is necessary to get
email from the google then how long it takes to get one i created my
account 2-3 hours ago.



Unable to update:
java.io.IOException: Error posting to URL:
http://appengine.google.com/api/appversion/create?app_id=MitTwitOauthversion=1;
403 Forbidden
You do not have permission to modify this app
(app_id=u'MitTwitOauth').

at com.google.appengine.tools.admin.ServerConnection.send
(ServerConnection.java:143)
at com.google.appengine.tools.admin.ServerConnection.post
(ServerConnection.java:81)
at com.google.appengine.tools.admin.AppVersionUpload.send
(AppVersionUpload.java:522)
at com.google.appengine.tools.admin.AppVersionUpload.beginTransaction
(AppVersionUpload.java:339)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload
(AppVersionUpload.java:111)
at com.google.appengine.tools.admin.AppAdminImpl.update
(AppAdminImpl.java:56)
at com.google.appengine.tools.admin.AppCfg$UpdateAction.execute
(AppCfg.java:521)
at com.google.appengine.tools.admin.AppCfg.init(AppCfg.java:130)
at com.google.appengine.tools.admin.AppCfg.init(AppCfg.java:58)
at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:54)
com.google.appengine.tools.admin.AdminException: Unable to update app:
Error posting to URL: 
http://appengine.google.com/api/appversion/create?app_id=MitTwitOauthversion=1;
403 Forbidden
You do not have permission to modify this app
(app_id=u'MitTwitOauth').

at com.google.appengine.tools.admin.AppAdminImpl.update
(AppAdminImpl.java:62)
at com.google.appengine.tools.admin.AppCfg$UpdateAction.execute
(AppCfg.java:521)
at com.google.appengine.tools.admin.AppCfg.init(AppCfg.java:130)
at com.google.appengine.tools.admin.AppCfg.init(AppCfg.java:58)
at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:54)
Caused by: java.io.IOException: Error posting to URL:
http://appengine.google.com/api/appversion/create?app_id=MitTwitOauthversion=1;
403 Forbidden
You do not have permission to modify this app
(app_id=u'MitTwitOauth').

at com.google.appengine.tools.admin.ServerConnection.send
(ServerConnection.java:143)
at com.google.appengine.tools.admin.ServerConnection.post
(ServerConnection.java:81)
at com.google.appengine.tools.admin.AppVersionUpload.send
(AppVersionUpload.java:522)
at com.google.appengine.tools.admin.AppVersionUpload.beginTransaction
(AppVersionUpload.java:339)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload
(AppVersionUpload.java:111)
at com.google.appengine.tools.admin.AppAdminImpl.update
(AppAdminImpl.java:56)
... 4 more


Thank You !
-- 
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] Exception when using JPA: Type xxx is not that of an entity but needs to be for this operation

2010-01-06 Thread Matthias Hüller
I'm facing a problem when using a slightly changed JPA Controller
Class generated out of my entity class by NetBeans 6.8. In this JPA
Controller Class I'm using the EMF (Entity Manager Factory) as
described here:
http://code.google.com/appengine/docs/java/datastore/usingjpa.html#Getting_an_EntityManager_Instance

I'm using AppEngine-Java-SDK-1.3.0. Why do I get the is not that of
an entity but needs to be for this operation exception?

==

public class MessageJpaController {

private EntityManagerFactory emf = null;

public MessageJpaController() {
emf = EMF.get();
}

public EntityManager getEntityManager() {
return emf.createEntityManager();
}

public void create(Message message) {
EntityManager em = null;
try {
em = getEntityManager();
em.getTransaction().begin();
em.persist(message);
em.getTransaction().commit();
} catch (Exception ex) {
throw new PersistenceException(ex);
} finally {
if (em != null) {
em.close();
}
}
}

...
}

==

@Entity
public class Message implements Serializable {

private static final long serialVersionUID = 1L;

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

private String message;

@Temporal(javax.persistence.TemporalType.TIMESTAMP)
private Date dateTime;

public Long getId() {
return id;
}

public void setId(Long id) {
this.id = id;
}

public String getMessage() {
return message;
}

public void setMessage(String message) {
this.message = message;
}

public Date getDateTime() {
return dateTime;
}

public void setDateTime(Date dateTime) {
this.dateTime = dateTime;
}

@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Message other = (Message) obj;
if (this.id != other.id  (this.id == null || !this.id.equals
(other.id))) {
return false;
}
return true;
}

@Override
public int hashCode() {
int hash = 7;
hash = 37 * hash + (this.id != null ? this.id.hashCode() : 0);
return hash;
}
}

==

 [java] java.lang.IllegalArgumentException: Type
(de.alteskind.appengine.jpa.Message) is not that of an entity but
needs to be for this operation
 [java] at
org.datanucleus.jpa.EntityManagerImpl.assertEntity
(EntityManagerImpl.java:888)
 [java] at org.datanucleus.jpa.EntityManagerImpl.persist
(EntityManagerImpl.java:385)
 [java] at
de.alteskind.appengine.jpa.MessageJpaController.create
(MessageJpaController.java:28)
 [java] at
de.alteskind.appengine.jsf.MessageView.createMessage(MessageView.java:
36)
 [java] at sun.reflect.NativeMethodAccessorImpl.invoke0
(Native Method)
 [java] at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
 [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
 [java] at java.lang.reflect.Method.invoke(Method.java:
597)
 [java] at
com.google.appengine.tools.development.agent.runtime.Runtime.invoke
(Runtime.java:100)
 [java] at com.sun.el.parser.AstValue.invoke(AstValue.java:
187)
 [java] at com.sun.el.MethodExpressionImpl.invoke
(MethodExpressionImpl.java:297)
 [java] at
com.sun.faces.facelets.el.TagMethodExpression.invoke
(TagMethodExpression.java:98)
 [java] at
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke
(MethodBindingMethodExpressionAdapter.java:88)
 [java] at
com.sun.faces.application.ActionListenerImpl.processAction
(ActionListenerImpl.java:102)
 [java] at javax.faces.component.UICommand.broadcast
(UICommand.java:315)
 [java] at javax.faces.component.UIViewRoot.broadcastEvents
(UIViewRoot.java:775)
 [java] at
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:
1267)
 [java] at
com.sun.faces.lifecycle.InvokeApplicationPhase.execute
(InvokeApplicationPhase.java:82)
 [java] at com.sun.faces.lifecycle.Phase.doPhase
(Phase.java:101)
 [java] at com.sun.faces.lifecycle.LifecycleImpl.execute
(LifecycleImpl.java:118)
 [java] at javax.faces.webapp.FacesServlet.service
(FacesServlet.java:312)
 [java] at org.mortbay.jetty.servlet.ServletHolder.handle
(ServletHolder.java:487)
 [java] at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1093)
 [java] at

[appengine-java] how to send data in blobstore as mail attachment?

2010-01-06 Thread Aadith
Hi,
I am trying to design an application that would require me to retrieve
data stored in blobstore and send it as attachment. Does google app
engine allow this?  From the documentation, i could not find a way to
retrieve data from blobstore for processing within the app.. can
someone please tell me how to accomplish this? Code examples and/or
pointers to related online resources would be really helpful.

Thanks,
Aadith
-- 
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 can I test my java app behind proxy ?

2010-01-06 Thread 008
As title, my network is behind a proxy.

I add the following text to appengine-web.xml
property name=http.proxyHost value=10.1.1.1/
property name=http.proxyPort value=8080/
property name=https.proxyHost value=10.1.1.1/
property name=https.proxyPort value=8080/

and, the appcfg.cmd file is as follow (I use windows XP and jdk 1.6):
@java -cp -Dhttp.proxyHost=10.1.1.1 -Dhttp.proxyPort=8080 -
Dhttps.proxyHost=10.1.1.1 -Dhttps.proxyPort=8080 %~dp0\..\lib
\appengine-tools-api.jar com.google.appengine.tools.admin.AppCfg %*

but, my application throws an IOException.
my code is:
URL url = new URL(http://i-plaza.appspot.com/
index.html);
InputStream inputStream;
HttpURLConnection connection = (HttpURLConnection)
url.openConnection();
connection.connect();
inputStream = connection.getInputStream();
//...
It does work in anywhere without proxy.

Would you kindly help me ?
-- 
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] Eclipse plugin software update not working

2010-01-06 Thread sam2themax
I tried to update the Google App Engine SDK and Eclipse Plugin this
morning and got the following error:

An error occurred while collecting items to be installed
  session context was:(profile=epp.package.jee,
phase=org.eclipse.equinox.internal.provisional.p2.engine.phases.Collect,
operand=, action=).
  Artifact not found: osgi.bundle,com.google.gwt.eclipse.core,
1.2.0.v200912062003.
  
http://dl.google.com/eclipse/plugin/3.5/plugins/com.google.gwt.eclipse.core_1.2.0.v200912062003.jar;

I tried this with a fresh install of Eclipse Java EE IDE for Web
Developers Galileo - Build id: 20090920-1017 running on Windows 2000.

I wouldn't think the OS would matter, but I was able to successfully
update to the latest version of the plugin and SDK on my Mac at home
last night.

Any ideas?

Thanks,
Sam
-- 
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] One To Many. JDO. Error while save data.

2010-01-06 Thread webus
Hi to all! I have problem.
I have JDO objects:

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class MenuButton {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long uid;

@Persistent
private String name;

@Persistent(mappedBy=menuButton)
private ListTopic topicSets;

@Persistent
private boolean isEnabled;

@Persistent
private String toURL;

public Long getUid() {
return uid;
}

public void setUid(Long uid) {
this.uid = uid;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public ListTopic getTopicSets() {
return topicSets;
}

public void setTopicSets(ListTopic topicSets) {
this.topicSets = topicSets;
}

public boolean isEnabled() {
return isEnabled;
}

public void setEnabled(boolean isEnabled) {
this.isEnabled = isEnabled;
}

public String getToURL() {
return toURL;
}

public void setToURL(String toURL) {
this.toURL = toURL;
}
}

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Topic {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key uid;

@Persistent
private MenuButton menuButton;

@Persistent
private String topicTheme;

@Persistent
private Text topicText;

public Key getUid() {
return uid;
}

public void setUid(Key uid) {
this.uid = uid;
}

public MenuButton getMenuButton() {
return menuButton;
}

public void setMenuButton(MenuButton menuButton) {
this.menuButton = menuButton;
}

public String getTopicTheme() {
return topicTheme;
}

public void setTopicTheme(String topicTheme) {
this.topicTheme = topicTheme;
}

public Text getTopicText() {
return topicText;
}

public void setTopicText(Text topicText) {
this.topicText = topicText;
}
}


I have Manager class to help me save or update data.

public class Manager {

PersistenceManager pm = null;

public Manager() {
pm = PMF.get().getPersistenceManager();
}

public PersistenceManager getPersistenceManager(){
return pm;
}

public boolean Save(Object obj) {
Transaction tx = null;
try {
tx = pm.currentTransaction();
tx.begin();
pm.makePersistent(obj);
tx.commit();
System.out.println(Успешно сохранили транзакцию!);
return true;
}
catch(Exception ex) {
System.out.println(ex.getMessage());
System.out.println(ex.getLocalizedMessage());
if(tx.isActive())
tx.rollback();
System.out.println(Откатили транзакцию по исключению);
return false;
}
}

public boolean Delete(Object obj){
Transaction tx = null;
try {
tx = pm.currentTransaction();
tx.begin();
pm.deletePersistent(obj);
tx.commit();
return true;
}
catch(Exception ex){
System.out.println(ex.getMessage());
return false;
}
finally {
if(tx.isActive())
tx.rollback();
}
}

public Object getObjects(Object obj) {
Query query = pm.newQuery(obj.getClass());
Object reObj = query.execute();
return reObj;
}

public Object getObjectById(Object obj, Long uid) {
Object reObj = pm.getObjectById(obj.getClass(), uid);
return reObj;
}

public Object executeJDOSQL(String sql){
Object reObj = pm.newQuery(sql).execute();
return reObj;
}
}

I servlet i do some:
String sql = String.format(
select from %s where name == '%s'
,MenuButton.class.getName()
,Тесты);
MenuButton 

[appengine-java] Re: unable to delete cron job

2010-01-06 Thread Aadith
got it working..thanks!

On Jan 3, 7:20 am, seleronm seler...@gmail.com wrote:
 Hi,

 Please refer to the following 
 linkshttp://code.google.com/intl/us/appengine/docs/java/config/cron.html
 [Uploading Cron Jobs] section

 Please try.
 Thanks.



 I created a sample cron job with an excution frequency of 2 minutes
 just to experiment with the working of cron on GAE. After a few
 invocations, I decided to remove the job. I deleted cron.xml and
 deployed my app on GAE. However, the cron continues to execute. How do
 I remove the job?

 --

 You received this message because you are subscribed to the Google Groups
 Google App Engine for Java group.
 To post to this group, send email to google-appengine-j...@googlegroups.com.
 To unsubscribe from this group, send email to google-appengine-java+
 unsubscr...@googlegroups.com.
 For more options, visit this group athttp://groups.google.com/group/google-
 appengine-java?hl=en.
-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to 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] HTTP PUT in dev server generates exception

2010-01-06 Thread James Cooper
Hi everyone,

I'm trying to use S3Shell to PUT a file onto Amazon S3.  I get this on
my local dev server:

java.lang.IllegalArgumentException: Entity enclosing requests cannot
be redirected without user intervention
 at
org.apache.commons.httpclient.methods.EntityEnclosingMethod.setFollowRedirects
(Unknown Source)
 at
com.google.appengine.api.urlfetch.dev.LocalURLFetchService.fetch
(LocalURLFetchService.java:176)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at
com.google.appengine.tools.development.ApiProxyLocalImpl.makeSyncCall
(ApiProxyLocalImpl.java:118)
 at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:
83)
 at com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch
(URLFetchServiceImpl.java:43)
 at
com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler
$Connection.fetchResponse(URLFetchServiceStreamHandler.java:409)
 at
com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler
$Connection.getInputStream(URLFetchServiceStreamHandler.java:290)
 at
com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler
$Connection.getResponseCode(URLFetchServiceStreamHandler.java:131)
 at com.amazon.s3shell.S3Store.checkResponse(S3Store.java:510)
 at com.amazon.s3shell.S3Store.storeItem(S3Store.java:315)
 at com.amazon.s3shell.S3Store.storeItem(S3Store.java:287)

The S3Shell code is doing this (I've collapsed some of the method
calls here):

final HttpURLConnection itemConn = (HttpURLConnection)
itemURL.openConnection();
itemConn.setRequestMethod(method);
itemConn.setReadTimeout(READ_TIMEOUT);
itemConn.setDoOutput(true);
itemConn.connect();
OutputStream dataout = itemConn.getOutputStream();
dataout.write(data);
dataout.close();

// blows up here:
final int responseCode = conn.getResponseCode();


any ideas?

-- James
-- 
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: HTTP PUT in dev server generates exception

2010-01-06 Thread James Cooper
Figured it out.  Looks like you need to do this:

itemConn.setInstanceFollowRedirects(false);

thanks

-- James
-- 
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 to Datastore Query object

2010-01-06 Thread keyurva
Hi Vince,

Thanks for sharing this. It has much more than what I need, but I'll
cut a version off the addFilters() method for my use.

Thanks again,
Keyur

On Jan 6, 12:32 pm, Vince Bonfanti vbonfa...@gmail.com wrote:
 I've written such a translater that implements a subset of JDOQL:

      https://code.google.com/p/lowlevelquery/

 https://code.google.com/p/lowlevelquery/There's really no documentation
 other than the source code, which is a single class:

 https://code.google.com/p/lowlevelquery/source/browse/trunk/src/com/n...

 https://code.google.com/p/lowlevelquery/source/browse/trunk/src/com/n...The
 LowLevelQuery class contains a number of static methods that let you execute
 a JDOQL-like query string directly; for example:

     ListEntity results = LowLevelQuery.asList( select from myKind where
 category = 'Java' and rating  5 );

 LowLevelQuery also implements the PreparedQuery interface; you can create a
 LowLevelQuery instance from a query string and then use it just like you
 would a PreparedQuery; for example:

     PreparedQuery myQuery = new LowLevelQuery( select from myKind where
 category = 'Java' and rating  5 );
     ListEntity results = myQuery.asList();

 Let me know what you think.

 Vince

 On Wed, Jan 6, 2010 at 3:06 PM, keyurva keyu...@gmail.com wrote:
  This is likely a common scenario and I'm wondering if someone has
  already written some code to do this that I can steal.

  I'm using the low-level datastore API. In my app, users will be
  entering a SQL where clause. For instance:

  category = Java and rating  5

  This translates to the com.google.appengine.api.datastore.Query object
  as such:

  Query q = new Query(a kind);
  q.addFilter(category, Query.FilterOperator.EQUAL, Java);
  q.addFilter(rating, Query.FilterOperator.GREATER_THAN, 5);

  Has anyone written a generic library that does this translation?

  Thanks,
  Keyur

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


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




[appengine-java] Re: File path in App Engine

2010-01-06 Thread m seleron

Hi,

It might be solved by this though is not a direct answer.

Follow this thread:
http://groups.google.co.jp/group/google-appengine-java/browse_thread/thread/474203bfe0936636/080b511624096ba8#080b511624096ba8

Please Try.
thanks.


 Hello,

 I have recently started using App Engine for a project I am working
 on, and I have a simple question.

 I have a file in the war/WEB-INF directory of my app filename.txt.
 When I try BufferedReader b = new BufferedReader(new FileReader(new
 File(filename.txt))); I get a FileNotFoundException.

 What path should I use when trying to access files in the war/WEB-INF
 directory? I have tried what seem to me to be the obvious ones and I
 have read the faq on this (which just tells you to put files in that
 directory).

 Thanks,

 Finbarr
-- 
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: Datanucleus initialization performance

2010-01-06 Thread Todd Lindner
Copy and pasted from appengine.google.com logs

App Initialization starts here.  I use Spring.

I 01-04 10:19PM 01.999 javax.servlet.ServletContext log: Initializing
Spring root WebApplicationContext
I 01-04 10:19PM 02.002 org.springframework.web.context.ContextLoader
initWebApplicationContext: Root WebApplicationContext: initialization
started
I 01-04 10:19PM 02.207
org.springframework.context.support.AbstractApplicationContext
prepareRefresh: Refreshing Root WebApplicationContext: startup date
[Tue Jan 05 06:19:0
I 01-04 10:19PM 02.472
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions: Loading XML bean definitions from class path
resource [spring.xml]
I 01-04 10:19PM 05.711
org.springframework.beans.factory.support.DefaultListableBeanFactory
preInstantiateSingletons: Pre-instantiating singletons in
org.springframework.bea
I 01-04 10:19PM 05.752 com.thomasgermano.util.Version init: Current
Google app engine version 1.3.0

At this point, all of my beans are instantiated.  It took about 3.7
seconds (a bit long I know…  but that is purely my fault).
Datanucleus starts up now (I make a call to
Persistence.createEntityManagerFactory(transactions-optional)).

I 01-04 10:19PM 06.482 org.datanucleus.plugin.NonManagedPluginRegistry
resolveConstraints: Bundle org.datanucleus.jpa has an optional
dependency to org.datanucleus.enhanc
I 01-04 10:19PM 06.482 org.datanucleus.plugin.NonManagedPluginRegistry
resolveConstraints: Bundle org.datanucleus has an optional
dependency to org.eclipse.equinox.regist
I 01-04 10:19PM 06.483 org.datanucleus.plugin.NonManagedPluginRegistry
resolveConstraints: Bundle org.datanucleus has an optional
dependency to org.eclipse.core.runtime
I 01-04 10:19PM 07.193 org.datanucleus.plugin.NonManagedPluginRegistry
resolveConstraints: Bundle org.datanucleus.jpa has an optional
dependency to org.datanucleus.enhanc
I 01-04 10:19PM 07.194 org.datanucleus.plugin.NonManagedPluginRegistry
resolveConstraints: Bundle org.datanucleus has an optional
dependency to org.eclipse.equinox.regist
I 01-04 10:19PM 07.194 org.datanucleus.plugin.NonManagedPluginRegistry
resolveConstraints: Bundle org.datanucleus has an optional
dependency to org.eclipse.core.runtime
I 01-04 10:19PM 07.289 org.datanucleus.PersistenceConfiguration
setProperty: Property datanucleus.rdbms.sql.allowAllSQLStatements
unknown - will be ignored
I 01-04 10:19PM 07.293 org.datanucleus.PersistenceConfiguration
setProperty: Property datanucleus.rdbms.query.containsUsesExistsAlways
unknown - will be ignored
I 01-04 10:19PM 07.293 org.datanucleus.PersistenceConfiguration
setProperty: Property datanucleus.rdbms.stringDefaultLength unknown -
will be ignored
I 01-04 10:19PM 07.302 org.datanucleus.PersistenceConfiguration
setProperty: Property datanucleus.appengine.autoCreateDatastoreTxns
unknown - will be ignored
I 01-04 10:19PM 07.309 org.datanucleus.ObjectManagerFactoryImpl
logConfiguration: = Persistence Configuration
===
I 01-04 10:19PM 07.317 org.datanucleus.ObjectManagerFactoryImpl
logConfiguration: DataNucleus Persistence Factory - Vendor:
DataNucleus Version: 1.1.5
I 01-04 10:19PM 07.317 org.datanucleus.ObjectManagerFactoryImpl
logConfiguration: DataNucleus Persistence Factory initialised for
datastore URL=appengine driver= userNam
I 01-04 10:19PM 07.318 org.datanucleus.ObjectManagerFactoryImpl
logConfiguration:
===
I 01-04 10:19PM 07.391 org.datanucleus.PersistenceConfiguration
setProperty: Property datanucleus.query.cached unknown - will be
ignored
I 01-04 10:19PM 08.570
org.datanucleus.jpa.metadata.JPAAnnotationReader
processClassAnnotations: Class com.thomasgermano.db.Painting has
been specified with JPA annotation
I 01-04 10:19PM 10.244
org.datanucleus.jpa.metadata.JPAAnnotationReader
processClassAnnotations: Class com.thomasgermano.db.Category has
been specified with JPA annotation
I 01-04 10:19PM 10.714
org.datanucleus.jpa.metadata.JPAAnnotationReader
processClassAnnotations: Class com.thomasgermano.db.User has been
specified with JPA annotations so
I 01-04 10:19PM 10.984
org.datanucleus.jpa.metadata.JPAAnnotationReader
processClassAnnotations: Class com.thomasgermano.db.Image has been
specified with JPA annotations s
I 01-04 10:19PM 11.013
org.datanucleus.jpa.metadata.JPAAnnotationReader
processClassAnnotations: Class com.thomasgermano.db.Info has been
specified with JPA annotations so

Datanucleus finished.  All cycles from 06.482 until 11.013 are
datanucleus.  Thats over 5 seconds to initialize 5 persistent classes.

I 01-04 10:19PM 11.480 org.springframework.web.context.ContextLoader
initWebApplicationContext: Root WebApplicationContext: initialization
completed in 9478 ms

Spring says all beans are done

I 01-04 10:19PM 12.628 org.apache.struts.tiles.TilesPlugin
initDefinitionsFactory: Tiles definition factory loaded for module ''.
I 01-04 10:19PM 12.631 com.thomasgermano.StrutsInitPlugin init: init()


App is up.  

Re: [appengine-java] how to send data in blobstore as mail attachment?

2010-01-06 Thread Vince Bonfanti
I haven't tried this, but...the BlobstoreService.serve() method takes a
javax.servlet.http.HttpServletResponse instance as a parameter. My guess is
that BlobstoreService.serve() simply invokes
HttpServletResponse.getOutputStream() and then writes the data to the output
stream. You could create your own implementation of the HttpServletResponse
interface that simply writes the output to a byte array
(java.io.ByteArrayOutputStream). You could then retrieve the byte array and
do whatever is needed to send it as an attachment. Something like this:

   ByteArrayHttpServletResponse response = new
ByteArrayHttpServletResponse();
   BlobstoreService.serve( myBlobKey, response );
   byte[] data = response.toByteArray();

Attached is a quick-and-dirty skeleton for ByteArrayHttpServletResponse that
should get you started.

Vince

On Sun, Jan 3, 2010 at 2:32 AM, Aadith aaad...@gmail.com wrote:

 Hi,
 I am trying to design an application that would require me to retrieve
 data stored in blobstore and send it as attachment. Does google app
 engine allow this?  From the documentation, i could not find a way to
 retrieve data from blobstore for processing within the app.. can
 someone please tell me how to accomplish this? Code examples and/or
 pointers to related online resources would be really helpful.

 Thanks,
 Aadith


-- 

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.



ByteArrayHttpServletResponse.java
Description: Binary data


[appengine-java] Re: Purge _ah_SESSION ???

2010-01-06 Thread m seleron

Hi,

Though it is likely already to have tried.
You might solve the problem by examining sessionCleanupServlet.

thanks.

On 1月7日, 午後1:18, Jorge athenas...@gmail.com wrote:
 Is there a way to delete old _ah_SESSION entities? I found a post
 about deleting all sessions, both from the datastore and from
 memcache, but I am looking a clean  way to delete past sessions and
 preserve the active ones.

 Thanks,

 Jorge Gonzalez
-- 
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: Upload of images

2010-01-06 Thread m seleron
Hi,

Is the following links useful though I am not looking in detail.

http://stackoverflow.com/questions/1513603/how-to-upload-and-store-an-image-with-google-app-engine-java

Please try.
thanks.


On 1月3日, 午前6:13, Hárley Diniz fhar...@gmail.com wrote:
 Hi, would like to know as to make upload of images for bigtable. I am not
 obtaining to find examples.
 Regards

 --
 --
 []'s Hárley Diniz
 --
-- 
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: DB doesn't return all corresponding records for query!

2010-01-06 Thread Denis Moskalets
Hello, GOOGLE!
We pay money for non-working service.


Queries
SELECT * FROM ctms_Report WHERE ANCESTOR IS KEY
('agxjdG1zLXJlbGVhc2VyGQsSDGN0bXNfUHJvamVjdCIHaWQyNDYzMAw') AND
contactdate = DATE('2009-11-14') AND contactdate = DATE
('2009-11-14') ORDER BY contactdate DESC

returns 3 records
and

SELECT * FROM ctms_Report WHERE ANCESTOR IS KEY
('agxjdG1zLXJlbGVhc2VyGQsSDGN0bXNfUHJvamVjdCIHaWQyNDYzMAw') AND
contactdate = DATE('2009-11-14') AND contactdate = DATE
('2009-11-14') ORDER BY contactdate

returns 1 record.

IS IT OK?
I think — no.

On Dec 27 2009, 10:12 pm, Denis Moskalets denya@gmail.com wrote:
 Cool

 I've added this index:

 - kind: ctms_Report
   properties:
   - name: project
   - name: contactdate

 and the 2nd query become broken too!

 On Dec 27, 9:44 pm, Denis Moskalets denya@gmail.com wrote:



  Sorry, wrong subject.
  DB doesn't return all corresponding records for query!
-- 
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] Advantage of GAE over PHP/MySQL please

2010-01-06 Thread paulmo
I love all things Google, but I'm wondering if I should put in effort
to migrate to Python, Datastore and GAE.

My non-commercial app has two distinct text forms: one is a radio
selection and one is a text string that gets exploded and is searched
in elseif statements against arrays. The original message is posted to
2 tables in MySQL: one with entire message, and another with exploded
array words. This second table is queried for most common words and
echoed in a datatable.

Both of these forms must be in same app.

My app also uses geo location and css/js libraries.

I'm confused about Django templates; I did not see any CSS/JS
templates per se in the docs; does a beginner do best with static
CSS/JS files?

The attraction of GAE seems to be doing everything in one interface/
set of tools, and I'd like to keep it that way: I don't need a bunch
of links and 3rd party apps.

Advice greatly appreciated.

-- 
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: Advantage of GAE over PHP/MySQL please

2010-01-06 Thread Sylvain
Hello,

I think most answers are here :
http://code.google.com/appengine/docs/python/gettingstarted/

Do the getting started, and everything will be clear.

About django templates : you can use it (or not) or use static files
(html, css, js,...)
http://code.google.com/appengine/docs/python/gettingstarted/staticfiles.html

You can create forms directly inside the code (without template) :
http://code.google.com/appengine/docs/python/gettingstarted/handlingforms.html

Hope it will help.

Regards.

On Jan 6, 1:33 pm, paulmo paul.moll...@gmail.com wrote:
 I love all things Google, but I'm wondering if I should put in effort
 to migrate to Python, Datastore and GAE.

 My non-commercial app has two distinct text forms: one is a radio
 selection and one is a text string that gets exploded and is searched
 in elseif statements against arrays. The original message is posted to
 2 tables in MySQL: one with entire message, and another with exploded
 array words. This second table is queried for most common words and
 echoed in a datatable.

 Both of these forms must be in same app.

 My app also uses geo location and css/js libraries.

 I'm confused about Django templates; I did not see any CSS/JS
 templates per se in the docs; does a beginner do best with static
 CSS/JS files?

 The attraction of GAE seems to be doing everything in one interface/
 set of tools, and I'd like to keep it that way: I don't need a bunch
 of links and 3rd party apps.

 Advice greatly appreciated.
-- 
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: Advantage of GAE over PHP/MySQL please

2010-01-06 Thread paulmo
thanks for links. I have read those. I should have stated that I have
created a guestbook app with GAE
as a trial to explore the datastore etc.

I was looking more for feedback from users who are deep in GAE and can
make a comparison:

Do you miss not having a relational database? Workarounds given my
situation of using 2 tables?
Are/can you use Google's webtoolkit or ajax/css apis without having to
deploy 3rd party apps?

Stuff like that...
On Jan 6, 9:07 am, Sylvain sylvain.viv...@gmail.com wrote:
 Hello,

 I think most answers are here 
 :http://code.google.com/appengine/docs/python/gettingstarted/

 Do the getting started, and everything will be clear.

 About django templates : you can use it (or not) or use static files
 (html, css, 
 js,...)http://code.google.com/appengine/docs/python/gettingstarted/staticfil...

 You can create forms directly inside the code (without template) 
 :http://code.google.com/appengine/docs/python/gettingstarted/handlingf...

 Hope it will help.

 Regards.

 On Jan 6, 1:33 pm, paulmo paul.moll...@gmail.com wrote:

  I love all things Google, but I'm wondering if I should put in effort
  to migrate to Python, Datastore and GAE.

  My non-commercial app has two distinct text forms: one is a radio
  selection and one is a text string that gets exploded and is searched
  in elseif statements against arrays. The original message is posted to
  2 tables in MySQL: one with entire message, and another with exploded
  array words. This second table is queried for most common words and
  echoed in a datatable.

  Both of these forms must be in same app.

  My app also uses geo location and css/js libraries.

  I'm confused about Django templates; I did not see any CSS/JS
  templates per se in the docs; does a beginner do best with static
  CSS/JS files?

  The attraction of GAE seems to be doing everything in one interface/
  set of tools, and I'd like to keep it that way: I don't need a bunch
  of links and 3rd party apps.

  Advice greatly appreciated.
-- 
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: Advantage of GAE over PHP/MySQL please

2010-01-06 Thread Sylvain
 Do you miss not having a relational database? Workarounds given my
 situation of using 2 tables?

Not really. I think it's easier.
But if you need relations, you should read this article :
http://code.google.com/appengine/articles/modeling.html

If you have only 2 table, maybe you can merge them.
So denormalize your datas is often a good thing.

 Are/can you use Google's webtoolkit or ajax/css apis without having to
 deploy 3rd party apps?

Yes. but for ajax/css, I think it's always easier to use a library
like Jquery, Google Closure,...

Just upload them as static file/dir or use direct links :
http://code.google.com/apis/ajaxlibs/documentation/#AjaxLibraries

I think it's similar to PHP, no real diff here.

-- 
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: Using different frameworks depending on the hostname?

2010-01-06 Thread johnwlockwood
you setup the app.yaml to send urls starting with /admin/ to a python
file that loads app-engine-patch and everything else to a main.py that
loads webapp.
something like:

- url: /admin/.*
  script: app_engine_patch_loader.py
  login: admin

- url: /.*
  script: main.py
  secure: never


Then in your django urls.py handle /admin



On Jan 4, 9:15 pm, Nickolas Daskalou n...@daskalou.com wrote:
 This is probably a pure Python question.

 Is it possible to use a different framework depending on what hostname the
 request was made to? For example:

 api.mydomain.com (API service) - webapp
 admin.mydomain.com (Backend administration) - app-engine-patch (AEP)

 The data model needs to be the same for each framework (worst case would
 require a duplicated models.py file, which is ok).

 We want AEP for its admin capabilities for admin.mydomain.com, but we want
 responses from api.mydomain.com to be as fast as possible so we'd prefer to
 use webapp, which responds faster than AEP on cold requests (requests
 where there is no app caching 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.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.




[google-appengine] Server Error

2010-01-06 Thread webdev
Server Error
A server error has occurred.

I get that when I log into appengine.google.com

This has been 3 weeks now.
My user is web...@zuckerfeather.com

Can anyone help me? Im desperate!

Thanks,

-Matthew
-- 
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: Advantage of GAE over PHP/MySQL please

2010-01-06 Thread paulmo
ok thank you for that. seems to come down to cost savings, with price
of learning python and accepting that one's data is in G's cloud and
is not necessarily under one's exclusive control.

Am I on the right track?
On Jan 6, 10:59 am, Sylvain sylvain.viv...@gmail.com wrote:
  Do you miss not having a relational database? Workarounds given my
  situation of using 2 tables?

 Not really. I think it's easier.
 But if you need relations, you should read this article 
 :http://code.google.com/appengine/articles/modeling.html

 If you have only 2 table, maybe you can merge them.
 So denormalize your datas is often a good thing.

  Are/can you use Google's webtoolkit or ajax/css apis without having to
  deploy 3rd party apps?

 Yes. but for ajax/css, I think it's always easier to use a library
 like Jquery, Google Closure,...

 Just upload them as static file/dir or use direct links 
 :http://code.google.com/apis/ajaxlibs/documentation/#AjaxLibraries

 I think it's similar to PHP, no real diff here.
-- 
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: Server Error

2010-01-06 Thread Sylvain
There are many reasons why this error can be raised.
Example : http://code.google.com/p/googleappengine/issues/detail?id=554

Could you pastbin the app.yaml and the main.py ?

Or you can check the issue tracker / this forum to find similar issue.

Regards.


On Jan 6, 5:08 pm, webdev web...@zuckerfeather.com wrote:
 Server Error
 A server error has occurred.

 I get that when I log into appengine.google.com

 This has been 3 weeks now.
 My user is web...@zuckerfeather.com

 Can anyone help me? Im desperate!

 Thanks,

 -Matthew
-- 
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: Advantage of GAE over PHP/MySQL please

2010-01-06 Thread Sylvain
Yes.

- For cost savings : read this : 
http://code.google.com/appengine/docs/billing.html
I think GAE is cheap but it only depends on your app.

- Learning python, I think it's very easy... I learnt it 1 year ago
only for GAE.

- data in G's cloud... I can't answer but you should read this upload/
download data :
http://code.google.com/appengine/docs/python/tools/uploadingdata.html



On Jan 6, 5:36 pm, paulmo paul.moll...@gmail.com wrote:
 ok thank you for that. seems to come down to cost savings, with price
 of learning python and accepting that one's data is in G's cloud and
 is not necessarily under one's exclusive control.

 Am I on the right track?
 On Jan 6, 10:59 am, Sylvain sylvain.viv...@gmail.com wrote:

   Do you miss not having a relational database? Workarounds given my
   situation of using 2 tables?

  Not really. I think it's easier.
  But if you need relations, you should read this article 
  :http://code.google.com/appengine/articles/modeling.html

  If you have only 2 table, maybe you can merge them.
  So denormalize your datas is often a good thing.

   Are/can you use Google's webtoolkit or ajax/css apis without having to
   deploy 3rd party apps?

  Yes. but for ajax/css, I think it's always easier to use a library
  like Jquery, Google Closure,...

  Just upload them as static file/dir or use direct links 
  :http://code.google.com/apis/ajaxlibs/documentation/#AjaxLibraries

  I think it's similar to PHP, no real diff here.
-- 
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: Billing Administrator change

2010-01-06 Thread Jason C
I need to do this too. Does anyone know how?
j

On Dec 30 2009, 7:32 am, vlo...@pennswoods.net
vlo...@pennswoods.net wrote:
 I need to change thebillingadministrator without any down time to
 the site.  How do I go about doing that?
-- 
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: Advantage of GAE over PHP/MySQL please

2010-01-06 Thread G
I have been thinking about this very topic, even (re)considering
PHP. :)

You might want to look into using Django, or one of the other Python
web frameworks, instead of the modified version running on AppEngine
(the same could be said for the Java flavor).  There are a couple of
free hosting services available.

While not deep into AppEngine; my current impression is that AppEngine
needs more time to mature as a development target.  Though some things
are easier, a lot of time is wasted working around old bugs, design
limitations, and incomplete implementations.  Server status
information is also lacking, and feels more like a marketing mindset,
where an honest 'five nines' mindset would be more useful. In my
experience, the development speed benefits of Python (and Django) are
lost to AppEngine trivia.  The promise of high scalability for data
isn't exclusive to AppEngine, especially when memcached is the first
line of defense, so even that is not an exclusive win.

--
G


paulmo wrote:
 thanks for links. I have read those. I should have stated that I have
 created a guestbook app with GAE
 as a trial to explore the datastore etc.

 I was looking more for feedback from users who are deep in GAE and can
 make a comparison:

 Do you miss not having a relational database? Workarounds given my
 situation of using 2 tables?
 Are/can you use Google's webtoolkit or ajax/css apis without having to
 deploy 3rd party apps?

 Stuff like that...
 On Jan 6, 9:07 am, Sylvain sylvain.viv...@gmail.com wrote:
  Hello,
 
  I think most answers are here 
  :http://code.google.com/appengine/docs/python/gettingstarted/
 
  Do the getting started, and everything will be clear.
 
  About django templates : you can use it (or not) or use static files
  (html, css, 
  js,...)http://code.google.com/appengine/docs/python/gettingstarted/staticfil...
 
  You can create forms directly inside the code (without template) 
  :http://code.google.com/appengine/docs/python/gettingstarted/handlingf...
 
  Hope it will help.
 
  Regards.
 
  On Jan 6, 1:33 pm, paulmo paul.moll...@gmail.com wrote:
 
   I love all things Google, but I'm wondering if I should put in effort
   to migrate to Python, Datastore and GAE.
 
   My non-commercial app has two distinct text forms: one is a radio
   selection and one is a text string that gets exploded and is searched
   in elseif statements against arrays. The original message is posted to
   2 tables in MySQL: one with entire message, and another with exploded
   array words. This second table is queried for most common words and
   echoed in a datatable.
 
   Both of these forms must be in same app.
 
   My app also uses geo location and css/js libraries.
 
   I'm confused about Django templates; I did not see any CSS/JS
   templates per se in the docs; does a beginner do best with static
   CSS/JS files?
 
   The attraction of GAE seems to be doing everything in one interface/
   set of tools, and I'd like to keep it that way: I don't need a bunch
   of links and 3rd party apps.
 
   Advice greatly appreciated.
-- 
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: Billing Administrator change

2010-01-06 Thread Jason C
The UI was so clever that it confused me!

http://code.google.com/appengine/docs/billing.html#Changing_the_Billing_Administrator

(The Task Over Billing button is not visible if you view the Billing
Settings page as the Billing Administrator.)

j

On Jan 6, 1:50 pm, Jason C jason.a.coll...@gmail.com wrote:
 I need to do this too. Does anyone know how?
 j

 On Dec 30 2009, 7:32 am, vlo...@pennswoods.net



 vlo...@pennswoods.net wrote:
  I need to change thebillingadministrator without any down time to
  the site.  How do I go about doing that?
-- 
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: Anyone operate a heavy-traffic large-scale web service on app engine?

2010-01-06 Thread lucrussell
For those people who mentioned the high cost of GAE, are the main
costs in CPU, bandwidth or stored data (just out of curiosity)?

On Jan 6, 4:02 am, Tom Wu service.g2...@gmail.com wrote:
 Hi Michael,

 Please send me the Url.

 Best Regards
 Tom Wu

 2010/1/6 Michael m...@mzlab.net

  Since September GAE had several problems, but most of them were
  fixed in a timely manner (except slow cold-star time).
  I'm satisfied with uptime.

  James, my app is the dating app for Russian social network
  (like Facebook). If you want the URL, ask me via e-mail.

  On Jan 3, 10:48 pm, dhruvg dhruv.g...@gmail.com wrote:
   Thanks for the responses. Also, I have a question about reliability -
   with 4 million requests/day did you ever face any issues with gae
   being down/crashing or being insecure? Any precautions you took?

  --
  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] Slow query [java]

2010-01-06 Thread Amir Michail
Hello,

I'm getting slow query performance:

5848ms 8362cpu_ms 40api_cpu_ms

Query:  String query = select from  + DemoScore.class.getName()
+  order by score desc;

This is returning three objects.

If the query is repeated, it becomes very fast.

What could be wrong?

Amir
-- 
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: Anyone operate a heavy-traffic large-scale web service on app engine?

2010-01-06 Thread nickmilon

Well it depents on a lot of factors (i.e. memcache usage, site's
optimazation,  sites use profile etc.)

For my site ( geognos.com ) bandwidth is the main factor for the time
been, but there are a lot of things I can optimize to reduce it, then
I have to think of minimizing requests may be.
For sure there are a lot of things you can do to minimize costs with
App Engine.

Happy coding !


On Jan 6, 10:31 pm, lucrussell russell@googlemail.com wrote:
 For those people who mentioned the high cost of GAE, are the main
 costs in CPU, bandwidth or stored data (just out of curiosity)?

 On Jan 6, 4:02 am, Tom Wu service.g2...@gmail.com wrote:



  Hi Michael,

  Please send me the Url.

  Best Regards
  Tom Wu

  2010/1/6 Michael m...@mzlab.net

   Since September GAE had several problems, but most of them were
   fixed in a timely manner (except slow cold-star time).
   I'm satisfied with uptime.

   James, my app is the dating app for Russian social network
   (like Facebook). If you want the URL, ask me via e-mail.

   On Jan 3, 10:48 pm, dhruvg dhruv.g...@gmail.com wrote:
Thanks for the responses. Also, I have a question about reliability -
with 4 million requests/day did you ever face any issues with gae
being down/crashing or being insecure? Any precautions you took?

   --
   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] Re: Advantage of GAE over PHP/MySQL please

2010-01-06 Thread Robert Kluin
I second G's opinion.

It is far to easy to spend days designing and coding to solve things
that should not need solved at this high of a level.  You could get
yourself some real fine hosting with the money you could save spending
your time on more valuable things.

Right now I am heavily using app engine, and I really like it in
general.  But some days it is very frustrating.

Robert









On Wed, Jan 6, 2010 at 3:24 PM, G culturea...@gmail.com wrote:
 I have been thinking about this very topic, even (re)considering
 PHP. :)

 You might want to look into using Django, or one of the other Python
 web frameworks, instead of the modified version running on AppEngine
 (the same could be said for the Java flavor).  There are a couple of
 free hosting services available.

 While not deep into AppEngine; my current impression is that AppEngine
 needs more time to mature as a development target.  Though some things
 are easier, a lot of time is wasted working around old bugs, design
 limitations, and incomplete implementations.  Server status
 information is also lacking, and feels more like a marketing mindset,
 where an honest 'five nines' mindset would be more useful. In my
 experience, the development speed benefits of Python (and Django) are
 lost to AppEngine trivia.  The promise of high scalability for data
 isn't exclusive to AppEngine, especially when memcached is the first
 line of defense, so even that is not an exclusive win.

 --
 G


 paulmo wrote:
 thanks for links. I have read those. I should have stated that I have
 created a guestbook app with GAE
 as a trial to explore the datastore etc.

 I was looking more for feedback from users who are deep in GAE and can
 make a comparison:

 Do you miss not having a relational database? Workarounds given my
 situation of using 2 tables?
 Are/can you use Google's webtoolkit or ajax/css apis without having to
 deploy 3rd party apps?

 Stuff like that...
 On Jan 6, 9:07 am, Sylvain sylvain.viv...@gmail.com wrote:
  Hello,
 
  I think most answers are here 
  :http://code.google.com/appengine/docs/python/gettingstarted/
 
  Do the getting started, and everything will be clear.
 
  About django templates : you can use it (or not) or use static files
  (html, css, 
  js,...)http://code.google.com/appengine/docs/python/gettingstarted/staticfil...
 
  You can create forms directly inside the code (without template) 
  :http://code.google.com/appengine/docs/python/gettingstarted/handlingf...
 
  Hope it will help.
 
  Regards.
 
  On Jan 6, 1:33 pm, paulmo paul.moll...@gmail.com wrote:
 
   I love all things Google, but I'm wondering if I should put in effort
   to migrate to Python, Datastore and GAE.
 
   My non-commercial app has two distinct text forms: one is a radio
   selection and one is a text string that gets exploded and is searched
   in elseif statements against arrays. The original message is posted to
   2 tables in MySQL: one with entire message, and another with exploded
   array words. This second table is queried for most common words and
   echoed in a datatable.
 
   Both of these forms must be in same app.
 
   My app also uses geo location and css/js libraries.
 
   I'm confused about Django templates; I did not see any CSS/JS
   templates per se in the docs; does a beginner do best with static
   CSS/JS files?
 
   The attraction of GAE seems to be doing everything in one interface/
   set of tools, and I'd like to keep it that way: I don't need a bunch
   of links and 3rd party apps.
 
   Advice greatly appreciated.

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




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




[google-appengine] Re: Advantage of GAE over PHP/MySQL please

2010-01-06 Thread paulmo
thanks for feedback. I'm continuing to experiment with GAE while
keeping my main app hosted. hope that Webtoolkit will be integrated in
next version--shouldn't have to use a framework to use G's own
product!
On Jan 6, 3:24 pm, G culturea...@gmail.com wrote:
 I have been thinking about this very topic, even (re)considering
 PHP. :)

 You might want to look into using Django, or one of the other Python
 web frameworks, instead of the modified version running on AppEngine
 (the same could be said for the Java flavor).  There are a couple of
 free hosting services available.

 While not deep into AppEngine; my current impression is that AppEngine
 needs more time to mature as a development target.  Though some things
 are easier, a lot of time is wasted working around old bugs, design
 limitations, and incomplete implementations.  Server status
 information is also lacking, and feels more like a marketing mindset,
 where an honest 'five nines' mindset would be more useful. In my
 experience, the development speed benefits of Python (and Django) are
 lost to AppEngine trivia.  The promise of high scalability for data
 isn't exclusive to AppEngine, especially when memcached is the first
 line of defense, so even that is not an exclusive win.

 --
 G

 paulmo wrote:
  thanks for links. I have read those. I should have stated that I have
  created a guestbook app with GAE
  as a trial to explore the datastore etc.

  I was looking more for feedback from users who are deep in GAE and can
  make a comparison:

  Do you miss not having a relational database? Workarounds given my
  situation of using 2 tables?
  Are/can you use Google's webtoolkit or ajax/css apis without having to
  deploy 3rd party apps?

  Stuff like that...
  On Jan 6, 9:07 am, Sylvain sylvain.viv...@gmail.com wrote:
   Hello,

   I think most answers are here 
   :http://code.google.com/appengine/docs/python/gettingstarted/

   Do the getting started, and everything will be clear.

   About django templates : you can use it (or not) or use static files
   (html, css, 
   js,...)http://code.google.com/appengine/docs/python/gettingstarted/staticfil...

   You can create forms directly inside the code (without template) 
   :http://code.google.com/appengine/docs/python/gettingstarted/handlingf...

   Hope it will help.

   Regards.

   On Jan 6, 1:33 pm, paulmo paul.moll...@gmail.com wrote:

I love all things Google, but I'm wondering if I should put in effort
to migrate to Python, Datastore and GAE.

My non-commercial app has two distinct text forms: one is a radio
selection and one is a text string that gets exploded and is searched
in elseif statements against arrays. The original message is posted to
2 tables in MySQL: one with entire message, and another with exploded
array words. This second table is queried for most common words and
echoed in a datatable.

Both of these forms must be in same app.

My app also uses geo location and css/js libraries.

I'm confused about Django templates; I did not see any CSS/JS
templates per se in the docs; does a beginner do best with static
CSS/JS files?

The attraction of GAE seems to be doing everything in one interface/
set of tools, and I'd like to keep it that way: I don't need a bunch
of links and 3rd party apps.

Advice greatly appreciated.
-- 
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: Server Error

2010-01-06 Thread webdev
Im not sure how to get to app.yaml or main.py
I dont develop any applications for the appengine

I did download the google app engine launcher, thinking that it lets
me log on to my google appengine account to veiww the app.yaml and
main.py, and doesnt look like that is what its for...

Any more tips on how to get you the app.yaml and main.py you need?

Thanks,

-Matthew

On Jan 6, 10:40 am, Sylvain sylvain.viv...@gmail.com wrote:
 There are many reasons why this error can be raised.
 Example :http://code.google.com/p/googleappengine/issues/detail?id=554

 Could you pastbin the app.yaml and the main.py ?

 Or you can check the issue tracker / this forum to find similar issue.

 Regards.

 On Jan 6, 5:08 pm, webdev web...@zuckerfeather.com wrote:



  Server Error
  A server error has occurred.

  I get that when I log into appengine.google.com

  This has been 3 weeks now.
  My user is web...@zuckerfeather.com

  Can anyone help me? Im desperate!

  Thanks,

  -Matthew
-- 
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: Server Error

2010-01-06 Thread Robert Kluin
Hello Matthew,
  Have you tried going to https://appengine.google.com/a/zuckerfeather.com?

  What exactly are you trying to do?  You will not be able to download
files from other apps by logging in, but you will be able to register
a new application.


Robert








On Wed, Jan 6, 2010 at 5:17 PM, webdev web...@zuckerfeather.com wrote:
 Im not sure how to get to app.yaml or main.py
 I dont develop any applications for the appengine

 I did download the google app engine launcher, thinking that it lets
 me log on to my google appengine account to veiww the app.yaml and
 main.py, and doesnt look like that is what its for...

 Any more tips on how to get you the app.yaml and main.py you need?

 Thanks,

 -Matthew

 On Jan 6, 10:40 am, Sylvain sylvain.viv...@gmail.com wrote:
 There are many reasons why this error can be raised.
 Example :http://code.google.com/p/googleappengine/issues/detail?id=554

 Could you pastbin the app.yaml and the main.py ?

 Or you can check the issue tracker / this forum to find similar issue.

 Regards.

 On Jan 6, 5:08 pm, webdev web...@zuckerfeather.com wrote:



  Server Error
  A server error has occurred.

  I get that when I log into appengine.google.com

  This has been 3 weeks now.
  My user is web...@zuckerfeather.com

  Can anyone help me? Im desperate!

  Thanks,

  -Matthew

 --
 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] Automating appcfg.py

2010-01-06 Thread pythono
Hey there,

I would like to run a shell script that does certain things first and
then updates my app engine application.  How could I supply my
password to appcfg.py without manually entering it in?  I'm kind of a
novice in shell scripting (i'm using OS X), so the more specific you
can be, the better.

Thanks,
Arjun
-- 
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] Featured Applications on App Gallery

2010-01-06 Thread Vamsi Mohun
Please give more opportunities for other applications to be featured.
Perhaps, one application per category for a two week period on the
landing page?

http://appgallery.appspot.com/

Vamsi Mohun
http://www.entreave.com/
http://www.entreave.com/tour/

-- 
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] models help - simple sharding example

2010-01-06 Thread Andy
I'm new to sharding and am a little stuck on how to implement the toy
problem below.  Basically I have a many-to-one relationship between a
Company and Employees, and I want shards which are partitioned
according to company name.  My naive approach is to replicate and
rename the tables.

   (1) Is there a better approach?
   (2) How do I switch context effectively to use the correct
  my request handlers?

Thanks!
Andy


# (from my models.py)
#  # I start with these two models, then shard by company
#  class Company(db.Model):
# name=db.StringProperty(required=True)
#
#  class Employee(db.Model):
# lastname=db.StringProperty(required=True)
# company=db.ReferenceProperty(Company,
collection_name='employees')

# Company 'Foo' and it's employees
class Company_Foo(db.Model):
   name=db.StringProperty(required=True)

class Employee_Foo(db.Model):
   lastname=db.StringProperty(required=True)
   company=db.ReferenceProperty(Company_Foo,
collection_name='employees')

# company 'Bar' and it's employees
class Company_Bar(db.Model):
   name=db.StringProperty(required=True)

class Employee_Bar(db.Model):
   lastname=db.StringProperty(required=True)
   company=db.ReferenceProperty(Company_Bar,
collection_name='employees')



# (from my handlers.py)
# other imports here
from models import *  # potentially hundreds of model shards!?

def MyHandler(webpp.RequestHandler):
   def post(self):
  company_id=get_from_request(self)
  if company_id == 'Foo':
   my_emp=Employee_Foo.gql(...)
  else:
   my_emp=Employee_Bar.gql(...)
-- 
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] SSL with my own domain

2010-01-06 Thread Timmy G
Over a year ago when Google announced SSL support they said it
wouldn't be supported with custom domains. (http://
googleappengine.blogspot.com/2008/10/announcing-https-support-for-
appspotcom.html). This appears to be the case still today. However,
they offered some hoped in their statement:
 You may be wondering why we're only supporting appspot.com right now, and 
 not arbitrary Google Apps domains. This has to do with fundamental 
 limitations in the SSL protocol. We're currently investigating workarounds 
 for this using e.g. SNI, which provides a viable solution for newer 
 browsers--we'll keep you posted! 

So, 1.25 years later, any progress or encouraging expectations?

I ask because I'm working on a project due in 6-12 months that has a
business requirement of supporting a custom domain name over https. If
there's a reasonable chance it will supported it by then, I might
stick with AppEngine and save the decision point for later. If not, I
might as well not waste my time and will bail on AppEngine right now.
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] Can anyone create new applications currently

2010-01-06 Thread cdegroot
Hi All,

is the ability to create applications working currentl?. I am trying
to use the option to create my first application but the SMS
verification code is not being received and the web form does not seem
to get a response after a couple days.

Any ideas?

Thanks C.
-- 
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] Transactions in hierarchical entity groups

2010-01-06 Thread Geyes
Are there any benefits for running transactions on entities that are
grouped more hierarchically? Say, for example, i run a transaction
that only modifies a 'leaf' group of 100 entities. Is this different
if the entities are located under /root/group1/somegroup vs. /root/
group1/group2/somegroup?

It seems from the storage breakdown article that more indeces are
generated for the second layout, i was just wondering if transactions
themselves work any differently. (The data would still have to be
stored together, but maybe in the above example any transactions that
only operate on group2 and above could run concurrently with the
example transaction?)

Thanks

Geyes
-- 
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] my app doesn't work on ie7

2010-01-06 Thread andy
Hello,
I have problem with my app. Can't get it working on ie (at least ver
7, which I use). It works almost fine on FF 3.5.

url: 
http://party-organizer.appspot.com/PartyOrganizer.html?partyId=smolinski.andrzej
ie ver 7.0.5730.13
no errors on server or client site, no JavaScript errors. Nothing and
nothing is displayed. What can be wrong? Any help?
-- 
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: How to test my application with local database

2010-01-06 Thread Minh Tran
Yes, thank you all.

mobject

On Sun, Jan 3, 2010 at 4:26 PM, David Sowerby david.sowe...@virgin.netwrote:

 You may also find this useful, it describes setting up a datastore
 test environment

 http://code.google.com/appengine/docs/java/howto/unittesting.html



 On Jan 3, 9:01 am, Nickolas Daskalou n...@daskalou.com wrote:
  You can't use MySQL or any other traditional RDBMS with App Engine,
  you'll need to use Google's Datastore:
 
  http://code.google.com/appengine/docs/java/datastore/
 
  On Jan 2, 7:04 pm, mobject mobj...@gmail.com wrote:
 
   Hello,
 
   I would like to test my app with local db before deploying to
   APPEngine but I could not config my jdo to connect to my local Mysql
   database.
 
   Could anyone help me on this ?
 
   Thank you in advance,
 
   mobject
 
 

 --

 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.





-- 
MObject mobject = new MObject(Minh Tran);
-- 

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] new searching for inter netall results

2010-01-06 Thread ratha r
http://basicsofdnafingerprinting.blogspot.com/
http://dnafingerprintingandforensics-baki.blogspot.com/
http://plasmid-fingerprinting.blogspot.com/ 
http://dna-fingerprinting001.blogspot.com/
http://amplifiedfragment-length-polymorphis.blogspot.com/
http://whatisdnafingerprinting.blogspot.com/
http://amplifiedfragment-length-polymorphis.blogspot.com/
http://dna-profiling.blogspot.com/  
http://hivaids-in-india.blogspot.com/
http://india-hiv-caseload.blogspot.com/ 
http://hivaids-in-asia.blogspot.com/
http://the-mobilestore.blogspot.com/
http://app-store123.blogspot.com/
http://baki-standard-chartered-bank.blogspot.com/
http://structural-engineering123.blogspot.com/
http://chiefministersinsuranceschemeforbaki.blogspot.com/http://baki-nokia6600.blogspot.com/
http://baki-annamalai-university.blogspot.com/  
http://visa-requirements-baki.blogspot.com/
http://userwisewhipbharatmatrimony.blogspot.com/
http://health-tips57.blogspot.com/
http://baki-dna123.blogspot.com/
http://al-service.blogspot.com/
http://cancer-information107.blogspot.com/  
http://dna-money.blogspot.com/?zx=c0e2aa080cbac622
http://dnareplication123.blogspot.com/  
http://types-ofcancer.blogspot.com/
http://baki-hdfcbank.blogspot.com/  
http://dna-fingerprinting001.blogspot.com/
http://experimenttakes-us-backto.blogspot.com/  
http://baki-reliance.blogspot.com/
http://rob-zombie143.blogspot.com/  
http://baki-mostbeautifulhollywoodactress.blogspot.com/
http://keggpathway.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] I'm having a lot of issues with uploading a file. (ImportError)

2010-01-06 Thread Jack Low
I would do a bunch of random stuff and then it would work, then it
would stop working the next day. I have the loader in the same folder
as helloworld.py, and PYTHONPATH is set to that same folder. Can
someone give me a rundown as to what I really am supposed to do? Where
is the loader supposed to be? And what's PYTHONPATH supposed to be?
This is really frustrating.

Traceback (most recent call last):
  File F:\Program Files\Google\google_appengine\appcfg.py, line 67,
in module

run_file(__file__, globals())
  File F:\Program Files\Google\google_appengine\appcfg.py, line 63,
in run_fil
e
execfile(script_path, globals_)
  File F:\Program Files\Google\google_appengine\google\appengine\tools
\appcfg.p
y, line 2548, in module
main(sys.argv)
  File F:\Program Files\Google\google_appengine\google\appengine\tools
\appcfg.p
y, line 2539, in main
result = AppCfgApp(argv).Run()
  File F:\Program Files\Google\google_appengine\google\appengine\tools
\appcfg.p
y, line 1640, in Run
self.action(self)
  File F:\Program Files\Google\google_appengine\google\appengine\tools
\appcfg.p
y, line 2427, in __call__
return method()
  File F:\Program Files\Google\google_appengine\google\appengine\tools
\appcfg.p
y, line 2313, in PerformUpload
run_fn(args)
  File F:\Program Files\Google\google_appengine\google\appengine\tools
\appcfg.p
y, line 2215, in RunBulkloader
sys.exit(bulkloader.Run(arg_dict))
  File F:\Program Files\Google\google_appengine\google\appengine\tools
\bulkload
er.py, line 3940, in Run
return _PerformBulkload(arg_dict)
  File F:\Program Files\Google\google_appengine\google\appengine\tools
\bulkload
er.py, line 3763, in _PerformBulkload
LoadConfig(config_file)
  File F:\Program Files\Google\google_appengine\google\appengine\tools
\bulkload
er.py, line 3517, in LoadConfig
('', 'r', imp.PY_SOURCE))
  File restaurant_loader.py, line 4, in module
import helloworld
ImportError: No module named helloworld
-- 
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] api to determine if application is running on a development server?

2010-01-06 Thread Jeremy Faller
Hello all:

I've been fooling with AppEngine and the Google Maps APIs, and I'm
running into a bit of a snag.  The Google Maps APIs require a 'key'
url parameter.  The key parameter is hashed to your domain name, so if
I've got a img tag from localhost, the key differs than from when
I'm running on the Google servers.

I'd like to programmatically switch the key depending on whether I'm
running in the development server on my localhost, or on Google's
infrastructure.  Does anyone know an API that I can call that will
tell me if I'm running in debug mode or not?  Specifically, I'm
looking for (in python):


_LOCALHOST_KEY= 'ABQInfs7bKE82qgb3Zc2YyS-
oBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxSySz_REpPq-4WZA27OwgbtyR3VcA'
_MY_DOMAIN_KEY = 'xyzpdq'

def GoogleMapsKey():
  if IsRunningLocalHost():  # What's this API?
return _LOCALHOST_KEY
  return _MY_DOMAIN_KEY


Thanks in advance.

Regards,
Jeremy Faller
-- 
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] a description of cron job bug! It's not support for UTF-8

2010-01-06 Thread 时空之蕊
Thanks for your healp:
my cron.xml:
?xml version=1.0 encoding=UTF-8?
cronentries
  cron
url/cron/flushCache.do/url
descriptionThis's a Chinese description! 这是一个中文描述!/description
scheduleevery 2 minutes/schedule
  /cron
/cronentries

When description of cron isn't ascii code,i can't deploy my web app!
so i change description to:descriptionThis's a Chinese description!
/description, it's work ok!
My xml encoding is utf-8,but cron.xml can't supported by utf-8!
-- 
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: Blobstore upload with empty file

2010-01-06 Thread Andy Lo-A-Foe
Hi,

Perhaps use Javascript to make sure the form is filled in before
allowing the POST?

Regards,
Andy

On Jan 3, 11:02 pm, Hazzadous ha...@microwayes.net wrote:
 Having a little trouble using blobstore when file form fields are
 empty.  I'm getting Server Error and nothing useful by the way of
 debugging from this error or in the logs.  Handler as 
 perhttp://codepad.org/TKnI0WuQand live version 
 athttp://rafikirecords-sandbox.appspot.com/upload_form

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




[google-appengine] bulkloader.py --restore timeout during connect

2010-01-06 Thread Ryan

I've was able to restore most of my model objects from a local dev
instance to production using bulkloader.py --dump and --restore, but
my last Model object is timing out:

bulkloader.py --restore --kind=RecommendationIndex --url=http://
appid.appspot.com/remote_api --filename=RecommendationIndex.bulk --
debug app-dir

[INFO] Logging to bulkloader-log-20100106.140340
[INFO] Throttling transfers:
[INFO] Bandwidth: 25 bytes/second
[INFO] HTTP connections: 8/second
[INFO] Entities inserted/fetched/modified: 20/second
[INFO] Opening database: bulkloader-progress-20100106.140340.sql3
[DEBUG   ] [Thread-1] RestoreThread: started
[DEBUG   ] [Thread-1] RestoreThread: exiting
[DEBUG   ] [Thread-2] RestoreThread: started
[DEBUG   ] [Thread-3] WorkerThread: started
[DEBUG   ] [Thread-5] WorkerThread: started
[DEBUG   ] [Thread-4] WorkerThread: started
[DEBUG   ] [Thread-6] WorkerThread: started
[DEBUG   ] [Thread-7] WorkerThread: started
[DEBUG   ] [Thread-8] WorkerThread: started
[DEBUG   ] [Thread-9] WorkerThread: started
[DEBUG   ] [Thread-10] WorkerThread: started
[DEBUG   ] [Thread-11] WorkerThread: started
[DEBUG   ] Configuring remote_api. url_path = /remote_api, servername
= .appspot.com
[DEBUG   ] [Thread-12] WorkerThread: started
[DEBUG   ] Bulkloader using app_id: 
[INFO] Connecting to .appspot.com/remote_api
Traceback (most recent call last):
  File /usr/local/bin/bulkloader.py, line 67, in module
run_file(__file__, globals())
  File /usr/local/bin/bulkloader.py, line 63, in run_file
execfile(script_path, globals_)
  File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/bulkloader.py, line 3960, in module
sys.exit(main(sys.argv))
  File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/bulkloader.py, line 3956, in main
return _PerformBulkload(arg_dict)
  File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/bulkloader.py, line 3814, in _PerformBulkload
return_code = app.Run()
  File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/bulkloader.py, line 3125, in Run
self.RunPostAuthentication()
  File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/bulkloader.py, line 3230, in
RunPostAuthentication
self.request_manager.IncrementId(list(ancestor_path), kind,
high_id)
  File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/bulkloader.py, line 1197, in IncrementId
start, end = datastore.AllocateIds(model_key, 1)
  File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/api/datastore.py, line 1377, in AllocateIds
raise _ToDatastoreError(err)
google.appengine.api.datastore_errors.Timeout

The data set isn't particularly large (the dump is about 8 megs), and
it has the same number of entries and another model object (~5000)
that restored fine.  It's an 'index' object as recommended in the
Google I/O talk, so has some rather large StringListProperty values,
but never more than 500 short strings in a particular object, and of
course the exception occurs before it's actually transferring any
data.

If anyone has any ideas on what may be causing this, I'd love to hear
them.  It's always the same exception (datastore.AllocateIds), I guess
I could sprinkle in some logging statements around there in
bulkloader.py, but figured I'd ask here first.  I tried --dry_run and
got the standard datastore_v3 error, so it's definitely datastore
related.

Thanks,
Ryan

-- 
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 send massive emails and avoid being suspended?

2010-01-06 Thread Karter
Can you provide something like DKIM so that things like this can be
mitigated? If you are charging $X for sending emails - it would only
be appropriate to have tools that would enable verification..or
altenatively, are there any recipes that talk about how to do DKIM?

I've been searching and I can't find any.

On Dec 28 2009, 5:01 pm, Wesley Chun wesc+...@google.com wrote:
 greetings!

 the email service we provide is exactly as you have stated. there is a
 daily quota, and an additional quota for billed customers.
 unfortunately, it is not under our control as to whether or not your
 messages are marked as abuse -- that is up to each internet provider
 which hosts inbox recipients. if you do indeedspamyour recipients,
 they will eventually get you on such lists, but again, that is up to
 the recipient, not the sender.

 all we can suggest is to obey the rules and keep your messages to any
 provider at a reasonable level.

 best wishes!
 -wesley

 On Wed, Dec 23, 2009 at 12:30 AM, Krystox krys...@gmail.com wrote:
  We have a service to let user to send greeting cards to their friends.
  Soon we realize people might mark those emails asspam. As a result,
  the account used to domail.send() is easily suspended for abuse.

  My question is GAEmailquota allows sending thousands of emails per
  day, even the free quota is 2000. How it is possible to not being
  marked as abuse?

  Again, we have no intention tospam. Just want to know what is the
  correct way to use this email service. Thank you!

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

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




[google-appengine] medical records, hipaa compliance

2010-01-06 Thread RalphWSiegler
would the datastore of the GAE be HIPAA compliant as to privacy and
security of information.

We (my client's IT department) have medical apps to port to cloud
architecture but issue of use of public vs. private cloud (Google App
engine vs.  hosted vmware virtual appliance) hinges on this issue.
-- 
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] Best way to model relations

2010-01-06 Thread Daniel A
Hi there,

I just started writting my first app after reading some documentation
and tutorials.
Looks like an exciting platform to develop on, but there're many
things I still have doubts about.
I used to develop in PHP/MySQL, and I quite don't get how should I
proceed in order to get an efficient relational model.

To simplify things, I have two kind of entities: Artist and Photo. I
need to define relations one-to-many between instances of these two
entities. That is, an Artist can have many Photos, and a Photo can
only have one Artist.

In my table-shaped mind, I would model three kinds of entities
(Artist, Photo, ArtistPhotoRelation). Would this approach be the right
thing in GAE/datastore? Maybe I should avoid the relational entity,
and use multiple-valued properties in the Artist instead?

Thanks a lot!
-- 
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: Anyone operate a heavy-traffic large-scale web service on app engine?

2010-01-06 Thread DAndrea
Hi Michael,
it seems to me the cost is low with a so big traffic
and you don't have to take care of database, operating system,
hardware ...

Did you move your site to AppEngine from another hosting?

On Jan 3, 1:18 pm, Michael m...@mzlab.net wrote:
 I have around 4 million requests per day. The cost is $65 per week.
 In my opinion, at present App Engine is too expensive for sites
 with free business model.


-- 
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: Blobstore upload with empty file

2010-01-06 Thread Andy Lo-A-Foe
You can use JavaScript to check if the file form field is filled in
before submitting.

Regards,
Andy

On Jan 3, 11:02 pm, Hazzadous ha...@microwayes.net wrote:
 Having a little trouble using blobstore when file form fields are
 empty.  I'm getting Server Error and nothing useful by the way of
 debugging from this error or in the logs.  Handler as 
 perhttp://codepad.org/TKnI0WuQand live version 
 athttp://rafikirecords-sandbox.appspot.com/upload_form

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




[google-appengine] About Transactions

2010-01-06 Thread Patrick Twohig
So, I know that transactions are restricted to a single entity group.
I was curious if in the future this restriction may be relaxed.  If
not, what other common strategies are in place to ensure that
concurrent updates to multiple entity groups are kept consistent?
-- 
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] Slow query [java]

2010-01-06 Thread Patrick Twohig
My guess is that the first time you're running it the classes required to
run the query haven't been loaded yet by the classloader.

On Wed, Jan 6, 2010 at 12:54 PM, Amir Michail amich...@gmail.com wrote:

 Hello,

 I'm getting slow query performance:

 5848ms 8362cpu_ms 40api_cpu_ms

 Query:  String query = select from  + DemoScore.class.getName()
+  order by score desc;

 This is returning three objects.

 If the query is repeated, it becomes very fast.

 What could be wrong?

 Amir

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






-- 
Patrick H. Twohig.

Namazu Studios
P.O. Box 34161
San Diego, CA 92163-4161

Office: 619.862.2890 x100
Cell: 619.453.5075
Twitter: @svm_invictvs
IRC: svm_invic...@irc.freenode.net ##java, #android-dev, #iphonedev,
#appengine

http://www.namazustudios.com/

This communication, and any attachments, shall be considered confidential
and proprietary information of Namazu Studios LLC.  This message, and
attachments, are intended for the listed recipients only.  If you are not
one of the intended recipients, please destroy all copies of this
communication.
-- 

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] FileNotFoundException, and best to use jsp or not?

2010-01-06 Thread Ftaylor
Hello,

my current web.xml setup looks like this:

servlet
servlet-nameGetIMGs/servlet-name
servlet-classgetimgs.GetIMGsServlet/servlet-class
/servlet
servlet-mapping
servlet-nameGetIMGs/servlet-name
url-pattern//url-pattern
/servlet-mapping
welcome-file-list
welcome-fileGetIMGs/welcome-file
/welcome-file-list

Root requests to my app are routed to the GetIMGsServlet. Is this the
right way to go about things or should I really be using a .jsp file
to instantiate objects to answer requests?

I have a file names.txt that I wish to access from the
GetIMGsServlet class, but I always get a FileNotFoundException. Where
should I be putting the file, and what path should I provide when I
create a new File()?

Thanks,

Finbarr
-- 
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] Sending mail via second Developer-Account - only with second phone number?

2010-01-06 Thread serprime
Hi.

Is there a way to add an second developer account to an application
without having a second phone number for account verification?

I have an app on gae. Visitors can send mails to my customer using a
contact form on the site. I wanted a seperate mail adress to forward
these mails to the private inbox of my customer. So I created a second
gmail account and sent an invitation for gae using the admin console.

fine, but at this point I need a second phone number what isn't that
great.

Next I had to create an application to be able to access the 'my apps'
screen even though in this account I was invited to an app.

I think these steps were very complicated and there should be an
easier way to bind an mail account to a gae app.

best regards, philipp
-- 
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] big table query

2010-01-06 Thread kaza
Hi,

given document-D1: containing words (w1,w2,w3) and document D2 and
words (w2,w3..) and document Dn and words ( w1,w2, wn)

can I structure my data in big table  to answer the questions like:
which words occure most frequently with w1,
or wich words occure most frequently with w1 and w2

thanks
almir
-- 
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: Using memcache effectively

2010-01-06 Thread Satoshi
It probably depends on the type of application, but memcache does not
help you much if you have a lot of customized output (which are
different
from one user to another).

My application (social network application) has a very similar
requirement,
and I am solving this problem by doing following:

1. Break the data into pieces, so that each data is identical to all
the users,
2. Assign a unique URL to each data, and cache them in memcache using
the URL as the key,
3. Write some JavaScript code on the client side and construct the
custom page
by retrieving those data using AJAX (typically in JSON format, but you
can use HTML-let as well).

In other word, the server side of code is mostly acting as Model (in
MVC), and
the JavaScript code on the client side is acting as Controller.

I found that this architecture works really well with App Engine and
memcache, allowing me
to keep the cache hit rate very high (95%) and the average access
time to below 100 cpu_ms.

By the way, please aware that you still need to put some access
control on the server side (above memcache).
For example, the profile of each user can be accessed via http://
myapp.appspot.com/profile?uid={user_id}
(which can be cached in memcache), you want to make it sure that only
friends can access that profile.

Satoshi

On Jan 5, 1:21 pm, dburns drrnb...@gmail.com wrote:
 My app may display a lot of different output for a given page
 (customized per user amongst other things), and I'm wondering how best
 to use memcache.

 My current scheme is to estimate that a given user's output might be
 useful for, say 10 minutes, after which time the user has probably
 gone away so there's no point caching it.  It's not that the content
 is invalid after 10 minutes (I explicitly clear memcache if content
 becomes invalid).  Rather, I'm trying to aid memcache in determining
 what it can get rid of.

 Is this a good idea, or am I interfering with memcache's algorithm?
 It may all depend on the exact details of the application, but I'm
 wondering if there any general advice on memcache usage.

 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] Re: bulkloader.py --restore timeout during connect

2010-01-06 Thread Ryan

Forgot to say that these objects are all part of a entity group.  The
parent entities have already been restored though.  Do I need to
handle entity groups differently?

Thanks,
Ryan

On Jan 6, 2:35 pm, Ryan ryanleeschnei...@gmail.com wrote:
 I've was able to restore most of my model objects from a local dev
 instance to production using bulkloader.py --dump and --restore, but
 my last Model object is timing out:

 bulkloader.py --restore --kind=RecommendationIndex --url=http://
 appid.appspot.com/remote_api --filename=RecommendationIndex.bulk --
 debug app-dir

 [INFO    ] Logging to bulkloader-log-20100106.140340
 [INFO    ] Throttling transfers:
 [INFO    ] Bandwidth: 25 bytes/second
 [INFO    ] HTTP connections: 8/second
 [INFO    ] Entities inserted/fetched/modified: 20/second
 [INFO    ] Opening database: bulkloader-progress-20100106.140340.sql3
 [DEBUG   ] [Thread-1] RestoreThread: started
 [DEBUG   ] [Thread-1] RestoreThread: exiting
 [DEBUG   ] [Thread-2] RestoreThread: started
 [DEBUG   ] [Thread-3] WorkerThread: started
 [DEBUG   ] [Thread-5] WorkerThread: started
 [DEBUG   ] [Thread-4] WorkerThread: started
 [DEBUG   ] [Thread-6] WorkerThread: started
 [DEBUG   ] [Thread-7] WorkerThread: started
 [DEBUG   ] [Thread-8] WorkerThread: started
 [DEBUG   ] [Thread-9] WorkerThread: started
 [DEBUG   ] [Thread-10] WorkerThread: started
 [DEBUG   ] [Thread-11] WorkerThread: started
 [DEBUG   ] Configuring remote_api. url_path = /remote_api, servername
 = .appspot.com
 [DEBUG   ] [Thread-12] WorkerThread: started
 [DEBUG   ] Bulkloader using app_id: 
 [INFO    ] Connecting to .appspot.com/remote_api
 Traceback (most recent call last):
   File /usr/local/bin/bulkloader.py, line 67, in module
     run_file(__file__, globals())
   File /usr/local/bin/bulkloader.py, line 63, in run_file
     execfile(script_path, globals_)
   File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
 GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
 google/appengine/tools/bulkloader.py, line 3960, in module
     sys.exit(main(sys.argv))
   File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
 GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
 google/appengine/tools/bulkloader.py, line 3956, in main
     return _PerformBulkload(arg_dict)
   File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
 GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
 google/appengine/tools/bulkloader.py, line 3814, in _PerformBulkload
     return_code = app.Run()
   File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
 GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
 google/appengine/tools/bulkloader.py, line 3125, in Run
     self.RunPostAuthentication()
   File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
 GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
 google/appengine/tools/bulkloader.py, line 3230, in
 RunPostAuthentication
     self.request_manager.IncrementId(list(ancestor_path), kind,
 high_id)
   File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
 GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
 google/appengine/tools/bulkloader.py, line 1197, in IncrementId
     start, end = datastore.AllocateIds(model_key, 1)
   File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
 GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
 google/appengine/api/datastore.py, line 1377, in AllocateIds
     raise _ToDatastoreError(err)
 google.appengine.api.datastore_errors.Timeout

 The data set isn't particularly large (the dump is about 8 megs), and
 it has the same number of entries and another model object (~5000)
 that restored fine.  It's an 'index' object as recommended in the
 Google I/O talk, so has some rather large StringListProperty values,
 but never more than 500 short strings in a particular object, and of
 course the exception occurs before it's actually transferring any
 data.

 If anyone has any ideas on what may be causing this, I'd love to hear
 them.  It's always the same exception (datastore.AllocateIds), I guess
 I could sprinkle in some logging statements around there in
 bulkloader.py, but figured I'd ask here first.  I tried --dry_run and
 got the standard datastore_v3 error, so it's definitely datastore
 related.

 Thanks,
 Ryan
-- 
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: api to determine if application is running on a development server?

2010-01-06 Thread johnwlockwood
You can use:

if os.environ['SERVER_SOFTWARE'].contains('Development')

-John

On Jan 2, 10:26 pm, Jeremy Faller jeremy.fal...@gmail.com wrote:
 Hello all:

 I've been fooling with AppEngine and the Google Maps APIs, and I'm
 running into a bit of a snag.  The Google Maps APIs require a 'key'
 url parameter.  The key parameter is hashed to your domain name, so if
 I've got a img tag from localhost, the key differs than from when
 I'm running on the Google servers.

 I'd like to programmatically switch the key depending on whether I'm
 running in the development server on my localhost, or on Google's
 infrastructure.  Does anyone know an API that I can call that will
 tell me if I'm running in debug mode or not?  Specifically, I'm
 looking for (in python):

 _LOCALHOST_KEY= 'ABQInfs7bKE82qgb3Zc2YyS-
 oBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxSySz_REpPq-4WZA27OwgbtyR3VcA'
 _MY_DOMAIN_KEY = 'xyzpdq'

 def GoogleMapsKey():
   if IsRunningLocalHost():  # What's this API?
     return _LOCALHOST_KEY
   return _MY_DOMAIN_KEY

 Thanks in advance.

 Regards,
 Jeremy Faller
-- 
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: Best way to model relations

2010-01-06 Thread Satoshi
First of all, please remember that GAE/database is an Object-database,
not a Relational-database. You can design your database with
relations, but you will likely hit a roadblock later if you heavily
rely on relations (because of the lack of JOIN and the performance
problem of nested queries).

If I were you, I would simply create two models (Artist and Photo),
and have the artist property on Photo class, which is just a
reference to an Artist entity (ReferenceProperty).  If you want to
show all the Photos done by a particular Artist, you just need to
query it (Photos.all().filter('artist', ...)).

Alternatively, you could specify the Artist entity as the parent
entity of each Photo, which essentially creates an entity group for
each Artist - which has pros (transactions) and cons (possible
performance hit because of transactions).

Third alternative is ListProperty, but this is difficult to do it
right without putting them in an entity group (which is alternative
two)...

Satoshi

On Jan 5, 9:52 am, Daniel A dani.agui...@gmail.com wrote:
 Hi there,

 I just started writting my first app after reading some documentation
 and tutorials.
 Looks like an exciting platform to develop on, but there're many
 things I still have doubts about.
 I used to develop in PHP/MySQL, and I quite don't get how should I
 proceed in order to get an efficient relational model.

 To simplify things, I have two kind of entities: Artist and Photo. I
 need to define relations one-to-many between instances of these two
 entities. That is, an Artist can have many Photos, and a Photo can
 only have one Artist.

 In my table-shaped mind, I would model three kinds of entities
 (Artist, Photo, ArtistPhotoRelation). Would this approach be the right
 thing in GAE/datastore? Maybe I should avoid the relational entity,
 and use multiple-valued properties in the Artist instead?

 Thanks a lot!
-- 
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: api to determine if application is running on a development server?

2010-01-06 Thread johnwlockwood
OK, that doesn't seem to work.

I personally do this, and I know it works:

import os
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))

if not PROJECT_ROOT.startswith(/base/data/home/apps/MYAPPNAME):
DEVELOPMENT = True
DEBUG = True
GOOGLE_MAPS_API_KEY = VSE...
else:
DEVELOPMENT = False
DEBUG = False
GOOGLE_MAPS_API_KEY = GER...



On Jan 6, 5:40 pm, johnwlockwood johnwlockw...@gmail.com wrote:
 You can use:

 if os.environ['SERVER_SOFTWARE'].contains('Development')

 -John

 On Jan 2, 10:26 pm, Jeremy Faller jeremy.fal...@gmail.com wrote:



  Hello all:

  I've been fooling with AppEngine and the Google Maps APIs, and I'm
  running into a bit of a snag.  The Google Maps APIs require a 'key'
  url parameter.  The key parameter is hashed to your domain name, so if
  I've got a img tag from localhost, the key differs than from when
  I'm running on the Google servers.

  I'd like to programmatically switch the key depending on whether I'm
  running in the development server on my localhost, or on Google's
  infrastructure.  Does anyone know an API that I can call that will
  tell me if I'm running in debug mode or not?  Specifically, I'm
  looking for (in python):

  _LOCALHOST_KEY= 'ABQInfs7bKE82qgb3Zc2YyS-
  oBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxSySz_REpPq-4WZA27OwgbtyR3VcA'
  _MY_DOMAIN_KEY = 'xyzpdq'

  def GoogleMapsKey():
    if IsRunningLocalHost():  # What's this API?
      return _LOCALHOST_KEY
    return _MY_DOMAIN_KEY

  Thanks in advance.

  Regards,
  Jeremy Faller
-- 
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: Using different frameworks depending on the hostname?

2010-01-06 Thread Nickolas Daskalou
Thanks johnwlockwood. I ended up doing this:

app.yaml:

- url: /.*
  script: main.py


main.py:
import os
import re

regex_api_site = re.compile('^api\.(localhost|mydomain\.com)$')
regex_admin_site = re.compile('^admin\.(localhost|mydomain\.com)$')

handlers_map = [
{'regex':regex_api_site,
 'handler':'WEBAPP'},
{'regex':regex_admin_site,
 'handler':'APP_ENGINE_PATCH'},
]

def main():
  http_host = os.environ['SERVER_NAME']
  handler = None
  for handler_info in handlers_map:
if handler_info['regex'].match(http_host):
  if handler_info['handler'] == 'WEBAPP':
# main_webapp.py is in the root application directory
from main_webapp import main as handler
  elif handler_info['handler'] == 'APP_ENGINE_PATCH':
from common.appenginepatch.main import main as handler
  break
  if not handler:
import logging
logging.critical('No handler found for HTTP host %s',http_host)
return 1 # Not sure if this is the correct way to return failure
  return handler()

if __name__ == '__main__':
  main()


This seems to work well, although I haven't tried sharing models yet.


2010/1/7 johnwlockwood johnwlockw...@gmail.com

 you setup the app.yaml to send urls starting with /admin/ to a python
 file that loads app-engine-patch and everything else to a main.py that
 loads webapp.
 something like:

 - url: /admin/.*
  script: app_engine_patch_loader.py
  login: admin

 - url: /.*
  script: main.py
  secure: never


 Then in your django urls.py handle /admin



 On Jan 4, 9:15 pm, Nickolas Daskalou n...@daskalou.com wrote:
  This is probably a pure Python question.
 
  Is it possible to use a different framework depending on what hostname
 the
  request was made to? For example:
 
  api.mydomain.com (API service) - webapp
  admin.mydomain.com (Backend administration) - app-engine-patch (AEP)
 
  The data model needs to be the same for each framework (worst case would
  require a duplicated models.py file, which is ok).
 
  We want AEP for its admin capabilities for admin.mydomain.com, but we
 want
  responses from api.mydomain.com to be as fast as possible so we'd prefer
 to
  use webapp, which responds faster than AEP on cold requests (requests
  where there is no app caching 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.



  1   2   >