[google-appengine] Re: Requesting Same Entity Multiple Times in 1 Model.get_by_key_name Call

2009-10-05 Thread Nick Johnson (Google)
Hi Devel63,
The SDK will pass the list of keys through to the backend unmodified.
Whether the backend will de-duplicate before fetching is undefined, but
probable. In any case, your code will still have the overhead of decoding
the same entity several times - so I would suggest deduplicating yourself
before sending it to the API.

-Nick Johnson

On Fri, Oct 2, 2009 at 5:34 PM, Devel63  wrote:

>
> If I pass in a list of key_names to Model.get_by_key_name(), and the
> list contains duplicates, everything works and I get the complete,
> duplicative list of entities back.
>
> But behind the scenes, is GAE making only one query for all the
> duplicates, or is it being smart and just duplicating the results?
> >
>


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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@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: bulk uploading to related tables

2009-10-05 Thread Nick Johnson (Google)
Hi Graham,

On Sun, Oct 4, 2009 at 10:25 PM, Graham Charles wrote:

>
> I'm struggling with bulk uploading CSV files to related tables. I have
> foreign keys in the source data, but obviously, GAE doesn't use them.
>

You can translate foreign keys into db.Key instances, and use a
ReferenceProperty in you model for them.


> The code at
>
> http://code.google.com/appengine/docs/python/tools/uploadingdata.html
>
> Works great for one flat table at a time, but doesn't reference how to
> relate entries in a Child table to its Parent.
>

Override the generate_key method in your Loader class, and have it return a
key specifying the desired Parent.

-Nick Johnson


>
> Thanks,
>
> Graham Charles
>
> >
>


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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@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 obtain the number of rows of one kind

2009-10-05 Thread Kenneth

You can't beyond 1000.  You will need to keep the total in another
table and update it as the number of rows changes.  So work out how
many you have uploaded and seed that number into the table.

If you don't know how many you uploaded, to find out the number
already in the table you will need to write a task that key only
fetches a thousand, sorting by key. Add the number returned to the
total, and run the task again where key > last_key.  Keep running that
task until you get <1000 back.  Make sure no-one adds any rows while
that is running!

Good luck.

On Oct 4, 3:20 pm, Jaap  wrote:
> I've got a database uploaded to the datastore of around 100,000
> records.
>
> Which GQL statement can I use to obtain the number of rows my database
> has
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: beginner need for help about Cookie!

2009-10-05 Thread Allen

Tobias and skyleecm,

Thanks for your kindly help.

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



[google-appengine] Re: Failing cron job

2009-10-05 Thread Nick Johnson (Google)
On Sat, Oct 3, 2009 at 1:16 PM, David  wrote:

>
> Hi Nick
>
> Even when I replace my grabber with the below, the cron still fails.
> By this I mean that when I look in the dashboard and click the cron
> jobs, it says that the cron has failed.
>
> I don't really understand why. I think my problem is somewhere
> "webapp.WSGIApplication" call, and the app.yaml/ cron.yaml
>

When you see your cron job failed, you need to open the Logs page of the
Admin Console and look for its log entry to discover why.


>
> As I say its such a basic example I would of thought it would run? Or
> am I deluded?
>
> Cheers
>
>
> grabber.py
> **
>
> from google.appengine.api import users
> from google.appengine.ext import webapp
> from google.appengine.ext.webapp.util import run_wsgi_app
>
> class grabber(webapp.RequestHandler):
>  def get(self):
>   x = "hello"
>
> application = webapp.WSGIApplication(
> [('/', 'grabber')],
>

'grabber' should not be quoted - it's an identifier, not a string.

-Nick Johnson



> debug=True)
>
> def main():
>  run_wsgi_app(application)
>
> if __name__ == "__main__":
>  main()
>
>
>
> On Oct 2, 9:55 am, "Nick Johnson (Google)" 
> wrote:
> > Hi David,
> > You didn't actually say in your message what the problem you're
> encountering
> > is. However, one issue with your cron script is that you're attempting to
> > get the current user in it. Although the cron system can access 'login'
> and
> > 'admin' URLs, it does not have a user account, so get_current_user will
> > always return None.
> >
> > -Nick Johnson
> >
> >
> >
> > On Thu, Oct 1, 2009 at 10:24 PM, David 
> wrote:
> >
> > > Hi
> >
> > > I'm obviously a novice to the app engine, I have been tinkering with
> > > it off and on for a bit. I've spent a stupid amount of time today
> > > trying to figure out why this doesnt work.
> >
> > > I have a cron job to perform a cron every 5 minutes (I will include
> > > everything below) at first I thought it must be my code - but then I
> > > tried using some code from the google pages -
> >
> > > Any clues? I'm finding it really hard to debug - I can't see how I get
> > > a message that says where its blown up, am I being stupid?
> >
> > > grabber.py
> > > 
> >
> > > from google.appengine.api import users
> > > from google.appengine.ext import webapp
> > > from google.appengine.ext.webapp.util import run_wsgi_app
> >
> > > class grabber(webapp.RequestHandler):
> > >  def get(self):
> > >user = users.get_current_user()
> >
> > >if user:
> > >  self.response.headers['Content-Type'] = 'text/plain'
> > >  self.response.out.write('Hello, ' + user.nickname())
> > >else:
> > >  self.redirect(users.create_login_url(self.request.uri))
> >
> > > application = webapp.WSGIApplication(
> > > [('/', 'grabber')],
> > > debug=True)
> >
> > > def main():
> > >  run_wsgi_app(application)
> >
> > > if __name__ == "__main__":
> > >  main()
> >
> > > cron.yaml
> > > 
> >
> > > cron:
> > > - description: grabs some data
> > >  url: /grabber
> > >  schedule: every 1 minutes
> >
> > > app.yaml
> > > ***
> >
> > > application: ##My application name usually here
> > > version: 1
> > > runtime: python
> > > api_version: 1
> >
> > > handlers:
> > > - url: /grabber
> > >  script: grabber.py
> >
> > > - url: /
> > >  script: main.py
> >
> > > - url: /favicon.ico
> > >  static_files: favicon.ico
> > >  upload: favicon.ico
> >
> > --
> > Nick Johnson, Developer Programs Engineer, App Engine
> > Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration
> Number:
> > 368047
> >
>


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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@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: Is This a Bug in admin console ?

2009-10-05 Thread Nick Johnson (Google)
Hi,
The local admin console is only designed to run on the dev_appserver.
Although most of it will work in production, some, such as the task queue
page, will not.

-Nick Johnson

On Sat, Oct 3, 2009 at 11:25 AM, gimme  wrote:

>
> I just visiting my admin console with the following settings in
> app.yaml:
>
> - url: /admin/.*
>  script: $PYTHON_LIB/google/appengine/ext/admin
>  login: admin
>
>
> but when i visit the `Task Queues` menu , it seems error occured
> somewhere in python lab.
>
> Traceback (most recent call last):
>  File "/base/python_lib/versions/1/google/appengine/ext/webapp/
> __init__.py", line 507, in __call__
>handler.get(*groups)
>  File "/base/python_lib/versions/1/google/appengine/ext/admin/
> __init__.py", line 292, in get
>'queues': self.stub.GetQueues(),
> AttributeError: 'module' object has no attribute 'GetQueues'
> >
>


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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@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: [appengine-python] Mail api doesn't allow "+token" in email ids

2009-10-05 Thread Nick Johnson (Google)
Hi Prashant,
This looks like a bug. Could you file it in the issue tracker, please?

-Nick Johnson

On Sat, Oct 3, 2009 at 6:54 AM, Prashant  wrote:

> Hi,
>
> I tried to send mail from "myemailid*+tok...@gmail.com" but mail api threw
> error on this. is this not allow deliberately or not just ever considered as
> a feature?
>
> Thanks
>
> >
>


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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@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] TyphoonAE alpha released

2009-10-05 Thread Tobias

Hi,

I happily announce the first alpha release of TyphoonAE.

The TyphoonAE project aims at providing a full-featured and productive
serving environment to run Google App Engine (Python) applications. It
delivers the parts for building your own scalable App Engine while
staying compatible with Google's API (SDK 1.2.5).

It integrates 100% open source projects where each one is a superhero
and scales independently.

* mongoDB as datastore backend
* memcached speaks for itself
* RabbitMQ for the task queue
* NGINX + FastCGI to deliver HTTP at cyberspeed
* supervisord to keep everything together

Don't be shocked, all this stuff will be automatically installed by
zc.buildout into an isolated environment.

The alpha release however is somewhat limited and you might find one
or the other bug. As for now, it has been tested on Mac OS X Leopard
and Snow Leopard, Debian Lenny and Ubuntu.

http://typhoonae.googlecode.com
http://pypi.python.org/pypi/typhoonae

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



[google-appengine] Re: Pagination with Ranking

2009-10-05 Thread Nick Johnson (Google)
Hi Josh,
You might want to look into the 'ranklist' library. It'll allow you to keep
a large (much larger than 1000) set of records in ranked order, and
efficiently answer queries like 'what is the value of the 235th entry?' and
'where would a score of 500 place me?'.

http://code.google.com/p/google-app-engine-ranklist/

-Nick Johnson

On Fri, Oct 2, 2009 at 10:40 PM, Josh  wrote:

>
> Hi all,
>
> I've seen a number of interesting discussions on how to do efficient
> pagination on appengine, but one thing that I haven't seen addressed,
> which I would like, is how to efficiently compute ranking information
> for the items that are paginated.
>
> Let me motivate this discussion by considering a leader board.  We
> have a model like so:
>
> class Player(db.Model):
>  name = db.StringProperty()
>  score = db.IntegerProperty()
>  last_updated = db.DateTimeProperty(auto_now=True)
>
> We may have hundreds of thousands of Players and we want to be able to
> rank them by their score.
>
> How could we used the previously discussed pagination techniques
> (http://code.google.com/appengine/articles/paging.html) to efficiently
> page through the leader board and not only show the Players in order
> by score, but also assign a rank value to each player.
>
> Many thanks for your thoughts and input.
>
> Cheers,
> Josh
>
> >
>


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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@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: Increase Number of Apps

2009-10-05 Thread Nick Johnson (Google)
Hi EW,
I've increased your app count to 20.

-Nick Johnson

On Fri, Oct 2, 2009 at 9:31 PM, EW  wrote:

>
> Is there any way to increase the number of allotted apps? When I
> create apps for clients, its more practical to use my account rather
> than have them open app engine accounts, but I'm about to reach ten
> soon, and that will put me in quite the quandary. Any help?
> >
>


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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@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: Pagination with Ranking

2009-10-05 Thread Joshua Smith

I'd approach this by using some kind of a tree structure, with each  
node in the tree represented by an entity in the data store.  Your  
player items would be in leaf nodes pointing at those interior node  
entities.  Put a count in each node saying how many items are below  
that node.  If you have the record for a player, and you know his  
parent node, you can compute his rank with O(lg N) datastore lookups,  
which you can probably get done before the deadline runs out.   
Whenever you need to change someone's position in the tree, you'd run  
through O(lg N) entities and update counters (in a transaction, of  
course).

What kind of tree to use would require some study of the problem  
domain.  Red/Black, B-tree, etc., etc.

-Joshua


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



[google-appengine] Re: Failing cron job

2009-10-05 Thread David

OOOs it was me being dumb! I hadn't got the url mappings correct
in the WSGIApplication call. Du!

Thanks for your help

David

On Oct 5, 2:20 pm, "Nick Johnson (Google)" 
wrote:
> On Sat, Oct 3, 2009 at 1:16 PM, David  wrote:
>
> > Hi Nick
>
> > Even when I replace my grabber with the below, the cron still fails.
> > By this I mean that when I look in the dashboard and click the cron
> > jobs, it says that the cron has failed.
>
> > I don't really understand why. I think my problem is somewhere
> > "webapp.WSGIApplication" call, and the app.yaml/ cron.yaml
>
> When you see your cron job failed, you need to open the Logs page of the
> Admin Console and look for its log entry to discover why.
>
>
>
>
>
> > As I say its such a basic example I would of thought it would run? Or
> > am I deluded?
>
> > Cheers
>
> > grabber.py
> > **
>
> > from google.appengine.api import users
> > from google.appengine.ext import webapp
> > from google.appengine.ext.webapp.util import run_wsgi_app
>
> > class grabber(webapp.RequestHandler):
> >  def get(self):
> >       x = "hello"
>
> > application = webapp.WSGIApplication(
> >                                     [('/', 'grabber')],
>
> 'grabber' should not be quoted - it's an identifier, not a string.
>
> -Nick Johnson
>
>
>
> >                                     debug=True)
>
> > def main():
> >  run_wsgi_app(application)
>
> > if __name__ == "__main__":
> >  main()
>
> > On Oct 2, 9:55 am, "Nick Johnson (Google)" 
> > wrote:
> > > Hi David,
> > > You didn't actually say in your message what the problem you're
> > encountering
> > > is. However, one issue with your cron script is that you're attempting to
> > > get the current user in it. Although the cron system can access 'login'
> > and
> > > 'admin' URLs, it does not have a user account, so get_current_user will
> > > always return None.
>
> > > -Nick Johnson
>
> > > On Thu, Oct 1, 2009 at 10:24 PM, David 
> > wrote:
>
> > > > Hi
>
> > > > I'm obviously a novice to the app engine, I have been tinkering with
> > > > it off and on for a bit. I've spent a stupid amount of time today
> > > > trying to figure out why this doesnt work.
>
> > > > I have a cron job to perform a cron every 5 minutes (I will include
> > > > everything below) at first I thought it must be my code - but then I
> > > > tried using some code from the google pages -
>
> > > > Any clues? I'm finding it really hard to debug - I can't see how I get
> > > > a message that says where its blown up, am I being stupid?
>
> > > > grabber.py
> > > > 
>
> > > > from google.appengine.api import users
> > > > from google.appengine.ext import webapp
> > > > from google.appengine.ext.webapp.util import run_wsgi_app
>
> > > > class grabber(webapp.RequestHandler):
> > > >  def get(self):
> > > >    user = users.get_current_user()
>
> > > >    if user:
> > > >      self.response.headers['Content-Type'] = 'text/plain'
> > > >      self.response.out.write('Hello, ' + user.nickname())
> > > >    else:
> > > >      self.redirect(users.create_login_url(self.request.uri))
>
> > > > application = webapp.WSGIApplication(
> > > >                                     [('/', 'grabber')],
> > > >                                     debug=True)
>
> > > > def main():
> > > >  run_wsgi_app(application)
>
> > > > if __name__ == "__main__":
> > > >  main()
>
> > > > cron.yaml
> > > > 
>
> > > > cron:
> > > > - description: grabs some data
> > > >  url: /grabber
> > > >  schedule: every 1 minutes
>
> > > > app.yaml
> > > > ***
>
> > > > application: ##My application name usually here
> > > > version: 1
> > > > runtime: python
> > > > api_version: 1
>
> > > > handlers:
> > > > - url: /grabber
> > > >  script: grabber.py
>
> > > > - url: /
> > > >  script: main.py
>
> > > > - url: /favicon.ico
> > > >  static_files: favicon.ico
> > > >  upload: favicon.ico
>
> > > --
> > > Nick Johnson, Developer Programs Engineer, App Engine
> > > Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration
> > Number:
> > > 368047
>
> --
> Nick Johnson, Developer Programs Engineer, App Engine
> Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
> 368047
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@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: beginner need for help about Cookie!

2009-10-05 Thread Anh Hai Trinh

> NEW_SID = 
> sha.new(repr(time.time())).hexdigest()cookie=Cookie.SimpleCookie()cookie['sid']
>  = NEW_SIDcookie['sid']['expires'] = 24*60*60
>

I believe you can do

> self.response.out.write(cookie.output())

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



[google-appengine] Porting an existing site to GAE - deploying the GAE app on the existing domain

2009-10-05 Thread Gerard Mason

I have Google Apps working nicely on gerardmason.com. Thank you very
much, no complaints.

I also have a little Servlet/JSP/PostgreSQL-based website at
wow.gedsguides.com that I have just finished porting to App Engine,
more or less. The new version is currently accessible at
http://com-gedsguides-wow-read.appspot.com/.

So now it's time to think about switching off the old site and making
"wow.gedsguides.com" point to the GAE app. It should be fairly simple.
But there appears to be a whole rigmarole involving Google Apps that I
don't like the look of.

It starts off badly: when I read the article at
http://code.google.com/appengine/articles/domains.html it has a main
heading "Deploying your Application on your Google Apps URL" and then
almost immediately a subheading "Deploying your application to a
domain of your choice". It sounds as though the person who wrote the
article thought that those two were the same thing. They are very much
not the same thing. I want to deploy my application on a domain of my
choice (wow.gedsguides.com); I do *not* want to deploy my application
on my Google Apps URL (gerardmason.com).

Nevertheless, I tried the first step: going to my application's
control panel and clicking the Add Domain button, then entering
"gedsguides.com" on the following page. I wasn't particularly
apprehensive: the DNS server for gedsguides.com is still pointing at
my existing ISP. What could possibly go wrong?

Anyway, when it moved on again, I got a Google Apps login page for
user "@gedsguides.com". WTF?^H^H^H^H Goodness me! I don't have Google
Apps set up on gedsguides.com, of course (it's on gerardmason.com), so
I was unable to log in. Naturally, I don't want to set up Google Apps
on gedsguides.com - why would I, when I already have it somewhere
else?

Is this right, or have I made a stupid mistake? Why can't I just point
wow.gedsguides.com at appspot, the way you can point arbitrary urls at
your blogger blog, for example?

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-appengine@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] The google app is open for other search engine to crawl

2009-10-05 Thread Peter

I am hosting some app in google GAE with domain name. And also submit
my site to couple search engines which includes google.com. But couple
days passed, I tried to type my domain name for search, nothing!. Is
GAE allowing search engine come to crawl? 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-appengine@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: Child Objects and Relationships (JDO)

2009-10-05 Thread Andreas

I have the exact same problem. Have you found a solution yet?

On 25 Sep., 21:32, Prashant  wrote:
> Hi,
>
> I created a relationship similar to the one given
> here.
> Suppose fetched an *Employee*** entity from datastore, now, how to get *
> Employee*'s *ContactInfo* entity?
>
> I tries using *employee.myContactInfo* but it gives nullPointerException.
>
> 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-appengine@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] is there some opensource 'wap cms' project for google app engine?

2009-10-05 Thread terry-wang

Hi,
 I'm working for a wap cms application on google app engine. Could
you pls tell me that there is some open source 'wap cms' here, and
then i can use it as reference.
 many 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-appengine@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: Slow response static javascript files on development server

2009-10-05 Thread Toms Bauģis

I can confirm that the history file size has direct impact to how fast
static files are being returned. After mine had grown to 312kb,
reloading the dev server page took about 8 secs (serving in the test
page ~15 static stylesheets, images and js files). Removing history
sets it back to something like 200msec serve.


On Sep 4, 4:38 pm, Nick Winter  wrote:
> Dunno about the caching, but for slow requests, try deleting your
> datastore history file. I found that every request to the development
> server got slower and slower as that grew, so I delete the history
> file each time I start the server.

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



[google-appengine] Google App Engine Doesn't support Grails enum?

2009-10-05 Thread xigua

I was trying a simple grails app which only has one domain class, I
used generate-all to generate the control class and view then I
compiled it locally and tested it locally which worked. I then
deployed it to google app engine and it failed when I tried to create
a new instance of the domain object. The domain class is as following:

package test

import javax.persistence.*;
// import com.google.appengine.api.datastore.Key;

enum Role {Manager, Developer}
@Entity
class Person implements Serializable {

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

static constraints = {
id visible:false
}

String name
Role role
}

The stack trace is:
Uncaught exception from servlet
org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException:
Error processing GroovyPageView: Error executing tag :
java.lang.IllegalAccessException: Reflection is not allowed on
protected native java.lang.Object java.lang.Object.clone() throws
java.lang.CloneNotSupportedException
at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter
(SaveSessionFilter.java:35)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
(TransactionCleanupFilter.java:43)
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle
(AppVersionHandlerMap.java:237)
at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable
(RpcRequestParser.java:76)
at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest
(JettyServletEngineAdapter.java:139)
at com.google.apphosting.runtime.JavaRuntime.handleRequest
(JavaRuntime.java:235)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:4950)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:4948)
at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest
(BlockingApplicationHandler.java:24)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
359)
at com.google.net.rpc.impl.Server$2.run(Server.java:823)
at com.google.tracing.LocalTraceSpanRunnable.run
(LocalTraceSpanRunnable.java:56)
at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan
(LocalTraceSpanBuilder.java:516)
at com.google.net.rpc.impl.Server.startRpc(Server.java:778)
at com.google.net.rpc.impl.Server.processRequest(Server.java:351)
at com.google.net.rpc.impl.ServerConnection.messageReceived
(ServerConnection.java:437)
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:
428)
at com.google.net.async.EventDispatcher.processNetworkEvents
(EventDispatcher.java:762)
at com.google.net.async.EventDispatcher.internalLoop
(EventDispatcher.java:207)
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:392)
at java.lang.Thread.run(Unknown Source)
Caused by:
org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException:
Error executing tag : java.lang.IllegalAccessException:
Reflection is not allowed on protected native java.lang.Object
java.lang.Object.clone() throws java.lang.CloneNotSupportedException
at
base_data_home_apps_grailsenumtest_1_336810351809818768_WEB_INF_grails_app_views_person_create_gsp.run
(base_data_home_apps_grailsenumtest_1_336810351809818768_WEB_INF_grails_app_views_person_create_gsp:
56)
... 25 more
Caused by: org.codehaus.groovy.runtime.InvokerInvocationException:
java.lang.IllegalAccessException: Reflection is not allowed on
protected native java.lang.Object java.lang.Object.clone() throws
java.lang.CloneNotSupportedException
... 26 more
Caused by: java.lang.IllegalAccessException: Reflection is not allowed
on protected native java.lang.Object java.lang.Object.clone() throws
java.lang.CloneNotSupportedException
at com.google.appengine.runtime.Request.process-42e1461ce95b9d26
(Request.java)
at test.Role.values(Person.groovy)
at test.Role$values.call(Unknown Source)
at
base_data_home_apps_grailsenumtest_1_336810351809818768_WEB_INF_grails_app_views_person_create_gsp
$_run_closure3.doCall
(base_data_home_apps_grailsenumtest_1_336810351809818768_WEB_INF_grails_app_views_person_create_gsp:
50)
at
base_data_home_apps_grailsenumtest_1_336810351809818768_WEB_INF_grails_app_views_person_create_gsp
$_run_closure3.doCall
(base_data_home_apps_grailsenumtest_1_336810351809818768_WEB_INF_grails_app_views_person_create_gsp)
... 26 more

--~--~-~--~~~---~--

[google-appengine] GAE Docs redirections bug.

2009-10-05 Thread thepumpkin1979

Hi. I try to explore the docs but the browser keeps redirecting to
spanish.
this link for example:
http://code.google.com/appengine/docs/inboundservices.html

it redirect several times like this:

http://code.google.com/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/appengine/docs/inboundservices.html

this is the message i got using google chrome:

Esta página web tiene un bucle de redireccionamiento.

La página web en
http://code.google.com/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/intl/es-419/appengine/docs/inboundservices.html
ha ocasionado demasiados redireccionamientos. Borrar tus cookies de
este sitio o permitir las cookies de terceros puede solucionar el
problema. Si no, es posiblemente un problema de la configuración del
servidor y no un problema de tu computadora.

Have a nice day :)

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



[google-appengine] Re: Admins Emailed quota ?

2009-10-05 Thread Aurelian

i suppose you code something like

MailService ms = MailServiceFactory.getMailService();
...
try {
ms.send(msg);
}
..

You should use ms.sendToAdmins(msg); instead..

Regards.



On 4 Ott, 19:53, Prashant  wrote:
> Hi,
>
> Whenever I mail to myself, it always counts to Recipients Emailed quota
> only, it never counts to Admins Emailed quota. any idea why???
>
> 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-appengine@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] Serving Dynamic Images with Google App Engine - Java

2009-10-05 Thread Nitin Joshi

I read the article "Serving Dynamic Images with Google App Engine"
by Austin Chau, Google Developer Programs, April 2008.
(http://code.google.com/appengine/articles/images.html)

In this article there is information to store and serve images using
python language.

Actually I want to store images in Googpe app engine's Datastore using
Java.

How can I do this?

please help.

Thanks in Advance,
Nitin Joshi.

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



[google-appengine] Re: Child Objects and Relationships (JDO)

2009-10-05 Thread Prashant
the inheritance 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-appengine@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: Admins Emailed quota ?

2009-10-05 Thread Prashant
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-appengine@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: TyphoonAE alpha released

2009-10-05 Thread bFlood

this is excellent work Tobias, thanks. this could certainly help with
smaller sites that need to keep at least a single instance handler
hot, have you tried it on EC2 yet?

cheers
brian

On Oct 5, 9:45 am, Tobias  wrote:
> Hi,
>
> I happily announce the first alpha release of TyphoonAE.
>
> The TyphoonAE project aims at providing a full-featured and productive
> serving environment to run Google App Engine (Python) applications. It
> delivers the parts for building your own scalable App Engine while
> staying compatible with Google's API (SDK 1.2.5).
>
> It integrates 100% open source projects where each one is a superhero
> and scales independently.
>
> * mongoDB as datastore backend
> * memcached speaks for itself
> * RabbitMQ for the task queue
> * NGINX + FastCGI to deliver HTTP at cyberspeed
> * supervisord to keep everything together
>
> Don't be shocked, all this stuff will be automatically installed by
> zc.buildout into an isolated environment.
>
> The alpha release however is somewhat limited and you might find one
> or the other bug. As for now, it has been tested on Mac OS X Leopard
> and Snow Leopard, Debian Lenny and Ubuntu.
>
> http://typhoonae.googlecode.comhttp://pypi.python.org/pypi/typhoonae
>
> Have fun,
> Tobias
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Porting an existing site to GAE - deploying the GAE app on the existing domain

2009-10-05 Thread Nick Johnson (Google)
Hi Gerard,

On Sun, Oct 4, 2009 at 2:53 AM, Gerard Mason  wrote:

>
> I have Google Apps working nicely on gerardmason.com. Thank you very
> much, no complaints.
>
> I also have a little Servlet/JSP/PostgreSQL-based website at
> wow.gedsguides.com that I have just finished porting to App Engine,
> more or less. The new version is currently accessible at
> http://com-gedsguides-wow-read.appspot.com/.
>
> So now it's time to think about switching off the old site and making
> "wow.gedsguides.com" point to the GAE app. It should be fairly simple.
> But there appears to be a whole rigmarole involving Google Apps that I
> don't like the look of.
>
> It starts off badly: when I read the article at
> http://code.google.com/appengine/articles/domains.html it has a main
> heading "Deploying your Application on your Google Apps URL" and then
> almost immediately a subheading "Deploying your application to a
> domain of your choice". It sounds as though the person who wrote the
> article thought that those two were the same thing. They are very much
> not the same thing. I want to deploy my application on a domain of my
> choice (wow.gedsguides.com); I do *not* want to deploy my application
> on my Google Apps URL (gerardmason.com).
>

You actually can't deploy an app on the 'naked' domain. Following the steps
in that article will allow you to add it to any subdomain of your domain.


>
> Nevertheless, I tried the first step: going to my application's
> control panel and clicking the Add Domain button, then entering
> "gedsguides.com" on the following page. I wasn't particularly
> apprehensive: the DNS server for gedsguides.com is still pointing at
> my existing ISP. What could possibly go wrong?
>
> Anyway, when it moved on again, I got a Google Apps login page for
> user "@gedsguides.com". WTF?^H^H^H^H Goodness me! I don't have Google
> Apps set up on gedsguides.com, of course (it's on gerardmason.com), so
> I was unable to log in. Naturally, I don't want to set up Google Apps
> on gedsguides.com - why would I, when I already have it somewhere
> else?
>

You need to set up Google Apps for gedsguides.com, or add gedsguides.com as
an alias domain on another Apps installation. If you want to go with the
former option, Standard Edition is available here, for free:
http://www.google.com/apps/intl/en/group/index.html . You don't need to use
any services (eg, email) unless you want to.

-Nick Johnson


>
> Is this right, or have I made a stupid mistake? Why can't I just point
> wow.gedsguides.com at appspot, the way you can point arbitrary urls at
> your blogger blog, for example?
>
> Help.
>
> >
>


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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@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] Job in Task Queue using up all my CPU, how to stop?

2009-10-05 Thread Kevin

Hello,

I have a Job in Task Queue that is using all my CPU within an a hour
after the quota reset. The problem is my quota resets at like 5am in
the morning for me. Is the only way for me to stop the Job is to wake
up at 5am and do it?

The Job is setup to infinitely add jobs to the queue, so the only way
I know how to stop it is to redeploy my add with the queue xml setting
set to stop. And, I can't seem to redeploy when I've reached the Quota
maximum.

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



[google-appengine] Re: Persistant Data: Sometimes Persistant Sometimes Not ?

2009-10-05 Thread Kevin

I solved this, but I dont know why this was the solution...

I has a Portfolio class that contained a persistent Vector of Stocks.
I had to remove this.



On Sep 30, 10:29 pm, Kevin  wrote:
> It is also worth noting that the object never persist on my local
> computer running from eclipse debug, but there are no errors.
>
> This is the class with functions removed:
>
> @PersistenceCapable(identityType = IdentityType.APPLICATION)
> public class Stock {
>     @PrimaryKey
>     @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
>         private Key key;
>
>     @Persistent
>     private Key portfolio;
>
>     @Persistent
>     private String exchange;
>     @Persistent
>     private String ticker;
>     @Persistent
>     private String name;
>     @Persistent
>     private double price;
>         @Persistent
>         private long sharesOutstanding;
>     @Persistent
>     private double marketCap;
>     @Persistent
>     private double volume3Month;
>
>         @Persistent
>     private Vector balanceSheets;
>
>     @Persistent
>     private Vector incomeStatements;
>
>   ..
>
> }
>
> On Sep 30, 10:02 pm, Kevin  wrote:
>
>
>
> > Mine involves adding new objects to go DB, not modifying an exist
> > object. I did more testing, its seems that after a couple of hours of
> > not using the application, and then coming back to it to add new
> > objects to the db the objects just don't persist, I have to try a keep
> > on trying to add it for like 20 minutes before it appears. Then, soon
> > after persist work fine the first time I try to add objects. It is
> > like I have to warm up the application before it performs at 100%.
>
> > On Sep 29, 7:19 pm, orig  wrote:
>
> > > I have experienced the same thing. If I create an entity, I can not go
> > > back and modify a property of that entity for 15-20 minutes. It fails
> > > without error. After that time it can be modified. Simple changes of
> > > short strings stored in properties fail. The question is is it running
> > > up against some short term quota or is it some weird contention issue.
> > > The problem is seen in simple entities with basic properties.
>
> > > Problem is there are many such bugs. Ever try to run a query with
> > > order by and each time you get back a different result set:
>
> > >http://code.google.com/p/googleappengine/issues/detail?id=901&q=query...
>
> > > Funny that things like this have been around for almost a year and are
> > > never addressed. It is more important to add unused junk features
> > > than fix basic issues
>
> > > On Sep 29, 1:49 pm, Kevin  wrote:
>
> > > > Hello,
>
> > > > I have an application where sometimes the object gets stores
> > > > successfully to the data store and sometimes it doesn't.
> > > > If I try like a couple of hours later it will work without touch
> > > > anything on my application.
>
> > > > I don't see any errors or warning and it definately is call the
> > > > persist function. So I have indiction of what went wrong.
>
> > > > Anyone experiance this before?
>
> > > > Thanks in advance,
> > > > Kevin.- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@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: Indexes in building state for quite a while. Unable to vacuum.

2009-10-05 Thread Jeff S (Google)
Hi Sakthivel,

I've moved these indices to the error state so you should be able to vacuum
them now.

Thank you,

Jeff

On Fri, Oct 2, 2009 at 5:35 AM, Sakthivel  wrote:

>
> Hi,
>
> I updated a set of indexes and it is in building state for more
> than 2 hours now. I tried to use update_indexes, vacuum_indexes but it
> didn't solve the
> problem.. Any solution please...
>
> My app id is: sakthi-testing
>
> Thanks,
> Sakthivel
>
> >
>

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



[google-appengine] Protocol Buffer Question

2009-10-05 Thread dplouffe

I want to use protocol buffer to transfer data between two
applications, one being on GAE and the other being on EC2.  I noticed
this *note* when reading through the documentation of the
model_to_protobuf method of google.appengine.ext.db.

Note: This method uses a different (older) format for protobuffers
than the open sourced protocol buffer format. It is not compatible
with the open source implementation.

If that's the case, can I find the "different (older)" format/
specifications of protobuffers somewhere that I can use in a different
application?  Is it possible to use protobuffers to xfer data between
GAE and an external application the way they are implemented on GAE?

Dominic

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



[google-appengine] Re: bulk uploading to related tables

2009-10-05 Thread Graham Charles

Thanks for the reply! Any idea where I can find any documentation or
sample code?

Thanks,

g.

On Oct 5, 2:39 am, "Nick Johnson (Google)" 
wrote:
> Hi Graham,
>
> On Sun, Oct 4, 2009 at 10:25 PM, Graham Charles 
> wrote:
>
>
>
> > I'm struggling with bulk uploading CSV files to related tables. I have
> > foreign keys in the source data, but obviously, GAE doesn't use them.
>
> You can translate foreign keys into db.Key instances, and use a
> ReferenceProperty in you model for them.
>
> > The code at
>
> >http://code.google.com/appengine/docs/python/tools/uploadingdata.html
>
> > Works great for one flat table at a time, but doesn't reference how to
> > relate entries in a Child table to its Parent.
>
> Override the generate_key method in your Loader class, and have it return a
> key specifying the desired Parent.
>
> -Nick Johnson
>
>
>
> > Thanks,
>
> > Graham Charles
>
> --
> Nick Johnson, Developer Programs Engineer, App Engine
> Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
> 368047
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@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: missing logs

2009-10-05 Thread neil souza

thanks nick, responses in line (hope they come through right, i don't
really know how to use groups)

On Sep 30, 2:57 am, "Nick Johnson (Google)" 
wrote:
> Hi Neil,
>
> Sorry for the delay responding. Responses inline.
>
>
>
>
>
> On Sat, Sep 26, 2009 at 1:40 PM, neil souza  wrote:
>
> > the issue: it looks like we may not be getting all of our log entries
> > when when pull the logs from app engine.
>
> > first, a little context. there's a lot here, so bear with me.
>
> > we need to record event lines for metrics. normally, we would write
> > the lines to a local file on each app server and then pull those logs
> > every few minutes from the metrics system. we found this to be the
> > most stable and scalable architecture.
>
> > however, in app engine land, we can't write to a file. so we wrote the
> > event lines to the logs, set up a script to pull them in 10 minute
> > intervals, and loaded them into the stats system.
>
> > to be clear, the process goes like this:
>
> > 1.) an event happens on the server that we'd like to record. we write
> > a line to the log using logging.info(...) in python
>
> > 2.) every 10 minutes, a job starts on a metrics server, which requests
> > the next batch of logs by calling appcfg.py. the last log in the new
> > batch is kept in a append file to use as the 'sentinel' for the next
> > fetch.
>
> > 3.) the new log file is parsed for event lines, which are written to
> > another 'event' file.
>
> > 4.) a few minutes later, another job grabs new event files and loads
> > the events into the metrics system.
>
> > everything seemed to work great. until we realized that we were
> > missing events. a lot of them. between 20-50%.
>
> > there are some events that need to be shared with other systems. for
> > one if those event types, i was feeling lazy, so i just fired http
> > hits at the other system as the event happen. at some point, we
> > compared these numbers - and found them to be drastically different.
>
> > i ran tests today comparing the number of events recorded 'through'
> > the logs system and the same events recorded by http hit during
> > runtime. the percent of 'missing' events ranged from 18-56%, and the
> > percent missing appeared to be significantly higher when the frequency
> > of events was higher (during peak).
>
> > i've done a significant amount of work that points to the logs being
> > missing by the point that appcfg.py records them. i've reasonably
> > verified that all the event lines that appcfg.py pulls down make it
> > into the metrics system. oh, and all the numbers are being run on
> > unique user counts, so there's no way that the counts could be
> > mistakenly large (accidentally reading an event twice does not produce
> > a new unique user id).
>
> > my questions / issues:
>
> > 1.) should we be getting all of our logged lines from appcfg.py's
> > request_logs command? is this a known behavior? recall that we are
> > missing 20-50% of events - this is not a small discrepancy.
>
> App Engine has a fixed amount of space available for logs; it's essentially
> a circular buffer. When it runs out of space, it starts replacing older
> logs.
>
well, i'm going to guess that's the culprit.
>
>
> > 2.) we're pulling our logs every 10 minutes. seeing as the
> > request_logs command lets you specify the time you want in days, i
> > imagine this as more frequent than intended. could this be causing an
> > issue?
>
> How much traffic are you getting? What's the size of 10 minutes' worth of
> logs?
>
we're at maybe avg. 200 request and looks like we're recording 1.25
events per request, so perhaps 250 log lines / sec? that's in addition
to all the other junk getting spilled out there - i didn't know that
space was limited, there's prob some debug output, then the
exceptions, etc...
>
>
> > 3.) we switch major versions of the app every time we push, which can
> > be several times each day. this doesn't make sense as an issue since
> > the numbers are know to be wrong over periods where there have been no
> > version changes, but i wanted to mention it.
>
> > 4.) can you suggest a better solution for getting data to offline
> > processing? right now we getting the correct numbers using the async
> > http requests without ever calling get_result() or the like as a 'fire-
> > and-forget' http hit (not even sure if we're supposed to use it like
> > this, but seems to work). however, this approach has serious
> > drawbacks:
>
> You could log to the datastore, and read and delete old entries using
> remote_api.
>

this just doesn't seem like the right job for the datastore - we're
only inserting at 250 events / sec right now, but need to be able to
scale that. if we're inserting a few thousand events per second, and
can only fetch or delete 1K at a time, that seems like a potential
problem. we can batch up the events in each request, but still only
limits the inserts per second to the app's requests per second, which
can have the same issue. just doesn't sound f

[google-appengine] Re: [appengine-java] Incoming email support

2009-10-05 Thread Jason (Google)
Yes, it is tentatively scheduled to ship with the next release.

- Jason

On Fri, Oct 2, 2009 at 9:34 PM, Prashant  wrote:

> Hi,
>
> Will "Incoming email support" be there in the next release? When is it
> expected to release??
>
> 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-appengine@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: [appengine-java] Incoming email support

2009-10-05 Thread Prashant
And, when it is scheduled/expected to release?

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



[google-appengine] Re: missing logs

2009-10-05 Thread jonathan

I have been using a lockless memcache queue for something similar. It
is only for data that it is ok if you lose some of it. But it scales
quite well.

The implementation here is a little out of date:
http://www.redredred.com.au/memcache-lockless-queue-implementation/. I
plan to update with my current version soon.

j

On Oct 6, 11:00 am, neil souza  wrote:
> thanks nick, responses in line (hope they come through right, i don't
> really know how to use groups)
>
> On Sep 30, 2:57 am, "Nick Johnson (Google)" 
> wrote:
>
> > Hi Neil,
>
> > Sorry for the delay responding. Responses inline.
>
> > On Sat, Sep 26, 2009 at 1:40 PM, neil souza  wrote:
>
> > > the issue: it looks like we may not be getting all of our log entries
> > > when when pull the logs from app engine.
>
> > > first, a little context. there's a lot here, so bear with me.
>
> > > we need to record event lines for metrics. normally, we would write
> > > the lines to a local file on each app server and then pull those logs
> > > every few minutes from the metrics system. we found this to be the
> > > most stable and scalable architecture.
>
> > > however, in app engine land, we can't write to a file. so we wrote the
> > > event lines to the logs, set up a script to pull them in 10 minute
> > > intervals, and loaded them into the stats system.
>
> > > to be clear, the process goes like this:
>
> > > 1.) an event happens on the server that we'd like to record. we write
> > > a line to the log using logging.info(...) in python
>
> > > 2.) every 10 minutes, a job starts on a metrics server, which requests
> > > the next batch of logs by calling appcfg.py. the last log in the new
> > > batch is kept in a append file to use as the 'sentinel' for the next
> > > fetch.
>
> > > 3.) the new log file is parsed for event lines, which are written to
> > > another 'event' file.
>
> > > 4.) a few minutes later, another job grabs new event files and loads
> > > the events into the metrics system.
>
> > > everything seemed to work great. until we realized that we were
> > > missing events. a lot of them. between 20-50%.
>
> > > there are some events that need to be shared with other systems. for
> > > one if those event types, i was feeling lazy, so i just fired http
> > > hits at the other system as the event happen. at some point, we
> > > compared these numbers - and found them to be drastically different.
>
> > > i ran tests today comparing the number of events recorded 'through'
> > > the logs system and the same events recorded by http hit during
> > > runtime. the percent of 'missing' events ranged from 18-56%, and the
> > > percent missing appeared to be significantly higher when the frequency
> > > of events was higher (during peak).
>
> > > i've done a significant amount of work that points to the logs being
> > > missing by the point that appcfg.py records them. i've reasonably
> > > verified that all the event lines that appcfg.py pulls down make it
> > > into the metrics system. oh, and all the numbers are being run on
> > > unique user counts, so there's no way that the counts could be
> > > mistakenly large (accidentally reading an event twice does not produce
> > > a new unique user id).
>
> > > my questions / issues:
>
> > > 1.) should we be getting all of our logged lines from appcfg.py's
> > > request_logs command? is this a known behavior? recall that we are
> > > missing 20-50% of events - this is not a small discrepancy.
>
> > App Engine has a fixed amount of space available for logs; it's essentially
> > a circular buffer. When it runs out of space, it starts replacing older
> > logs.
>
> well, i'm going to guess that's the culprit.
>
> > > 2.) we're pulling our logs every 10 minutes. seeing as the
> > > request_logs command lets you specify the time you want in days, i
> > > imagine this as more frequent than intended. could this be causing an
> > > issue?
>
> > How much traffic are you getting? What's the size of 10 minutes' worth of
> > logs?
>
> we're at maybe avg. 200 request and looks like we're recording 1.25
> events per request, so perhaps 250 log lines / sec? that's in addition
> to all the other junk getting spilled out there - i didn't know that
> space was limited, there's prob some debug output, then the
> exceptions, etc...
>
>
>
>
>
> > > 3.) we switch major versions of the app every time we push, which can
> > > be several times each day. this doesn't make sense as an issue since
> > > the numbers are know to be wrong over periods where there have been no
> > > version changes, but i wanted to mention it.
>
> > > 4.) can you suggest a better solution for getting data to offline
> > > processing? right now we getting the correct numbers using the async
> > > http requests without ever calling get_result() or the like as a 'fire-
> > > and-forget' http hit (not even sure if we're supposed to use it like
> > > this, but seems to work). however, this approach has serious
> > > drawbacks:
>
> > You could log to the datastore, 

[google-appengine] Re: Requesting Same Entity Multiple Times in 1 Model.get_by_key_name Call

2009-10-05 Thread Devel63

Thanks for the response; already de-duped just to be safe.

On Oct 5, 2:07 am, "Nick Johnson (Google)" 
wrote:
> Hi Devel63,
> The SDK will pass the list of keys through to the backend unmodified.
> Whether the backend will de-duplicate before fetching is undefined, but
> probable. In any case, your code will still have the overhead of decoding
> the same entity several times - so I would suggest deduplicating yourself
> before sending it to the API.
>
> -Nick Johnson
>
> On Fri, Oct 2, 2009 at 5:34 PM, Devel63  wrote:
>
> > If I pass in a list of key_names to Model.get_by_key_name(), and the
> > list contains duplicates, everything works and I get the complete,
> > duplicative list of entities back.
>
> > But behind the scenes, is GAE making only one query for all the
> > duplicates, or is it being smart and just duplicating the results?
>
> --
> Nick Johnson, Developer Programs Engineer, App Engine
> Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
> 368047
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@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] Is it possible to read gmail from appengine project?

2009-10-05 Thread Joseph

Hi,
I tried via poplib, but it returns 'module' object has no attribute
'getaddrinfo'. Is there anyway to read gmail from within appengine?
Any alternatives?

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



[google-appengine] Re: Increase Number of Apps

2009-10-05 Thread EW

Thank You!

- Eric

On Oct 5, 7:05 am, "Nick Johnson (Google)" 
wrote:
> Hi EW,
> I've increased your app count to 20.
>
> -Nick Johnson
>
> On Fri, Oct 2, 2009 at 9:31 PM, EW  wrote:
>
> > Is there any way to increase the number of allotted apps? When I
> > create apps for clients, its more practical to use my account rather
> > than have them open app engine accounts, but I'm about to reach ten
> > soon, and that will put me in quite the quandary. Any help?
>
> --
> Nick Johnson, Developer Programs Engineer, App Engine
> Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
> 368047
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@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
-~--~~~~--~~--~--~---