[google-appengine] deployment issues - HELP

2009-04-13 Thread pumplove

Hi,
I have created a simple application and uploaded it to the app
engine and though i have given the app a unique Id (nostalgia-
register.appspot.com) whenever i click on the link it tells me the url
is invalid. Do i need a domain name ? becuase this is what is given in
the docs " You can now see your application running on App Engine. If
you set up a free appspot.com domain name, the URL for your website
begins with your application ID:
http://application-id.appspot.com "

so ideally is shud have been able to access it ...any help on this
would be greatly appreciated.

Regards,
Vikram
--~--~-~--~~~---~--~~
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: Datastore Question

2009-04-13 Thread Paul Kinlan
Hi,

I have added some use of memcache, however I am still seeing timeouts at the
moment - although it has just said I need a composite index for another part
of my application.

What I don't quite understand is that it appears to be "puts" of new
entities that are timing out and I can't work out why, I do individual
writes of 3 entities and I was thinking of batching these together in a
db.put, but from what I remember that is only a convienince method and
essentially performs the same task.

Paul

2009/4/13 Paul Kinlan 

> Hi,
>
> I will look at using memcache again, it might help a little as I do perform
> some http requests against a user sequentially so it might help a bit.  The
> problem is that I see a lot of timeouts on puts at the moment and I am not
> sure how to remedy them.
>
> Paul.
>
> 2009/4/12 Alkis Evlogimenos ('Αλκης Ευλογημένος) 
>
> Pervasive use of memcache + exponential backoff retries on most operations
>> solved it for me.
>>
>> On Sun, Apr 12, 2009 at 11:55 PM, Paul Kinlan wrote:
>>
>>> Hi Guys,
>>>
>>> My app is Twitterautofollow.  I have a question about the quota,
>>> basically my app was serving between 6-13 requests a second and jumped up to
>>> 32 requests per-second and subsequently went over the quota.  I am not sure
>>> where the 32 requests a second are comming from although some of them might
>>> come from my ping service that I am running to regularly perform some tasks
>>> - I wouldn't be suprised if it was a bug I created
>>>
>>> Additionally the DataStore CPU Time is Limited even though it is only at
>>> 3% of quota.
>>>
>>> Its starting to get a bit frustrating at the moment because I am having
>>> Data Store Timeouts very often on reads and puts.  Nothing in my model is in
>>> an EntityGroup, that is, there is no use of parent, however there are many
>>> RefernceProperties.
>>>
>>> The general process I have that is causing the process goes as follows
>>>
>>>
>>>1. Get the user (User Entity) from the datastore
>>>2. Get the current search term (Search Entity) for the user - I don't
>>>use the refernce propery set from the user because I need to filter it
>>>   1. Query Twitter
>>>   2. For up to 3 search results add a new entity of type "Follow"
>>>   and reference the search and user
>>>  1. For each result check to see if the "Follow" entity already
>>>  exists for the user - if it does we ignore the result
>>>  3. update the search entity with some basic stats
>>>
>>> Overall there are, with 5 (1 user, 1 search and 3 reads of Follow) reads
>>> and up to 4 puts (3 for new entities 1 for the "Search" entity).  I don't
>>> think this is too heavy, but it might be.
>>>
>>> So my question is, am I being too excessive, why would this cause a lot
>>> of datastore timeouts in both the reads and puts?  What tips do people have
>>> for DataStore performance?
>>>
>>> Thanks,
>>> Paul
>>>
>>>
>>>
>>
>>
>> --
>>
>> Alkis
>>
>> >>
>>
>

--~--~-~--~~~---~--~~
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: Transactions - Entity Groups

2009-04-13 Thread djidjadji

If a Team has a lot of Games you don't have enough time to delete them
all in 30 seconds.

You must use a method that always work, even in the event that the
datastore is giving troubles or is in maintenance (no write or delete
possible).

What you could do is mark the Team as being deleted, add an extra
field to the model.
Give the operator feedback that the Team is successfully marked as
deleted. Read the Team object back and check the deleted attribute.

When you want to create a Game filter for teams not marked for delete.

With a cron job:

1) Find a Team marked for delete.  markedTeam =
Team.all().filter('deleted =',True).get()
2) Find Games for this Team, in team1 or team2 attribute, fetch at most 10 games
3) if Games found: delete Games
   if no Games Found: delete Team

This way you will eventually delete all the Games and the Team.

2009/4/13 GMailingList :
>
> Ok maybe I don't absolutely need it to delete a team but what about...
>
> 1) when I'm creating a new game - team1 or team2 could be deleted as
> I'm creating a new game, then the game will have a team that does not
> exist
>
> OR
>
> 2) for arguments sake, I need the deletion of a team (and all the
> games it's in) to be atomic.  What you're suggesting can fail at
> anywhere between 1 and 4.
>
>
> On Apr 12, 4:35 pm, djidjadji  wrote:
>> Start with answering the question: Do I need a transaction?
>>
>> I don't think you need it to delete a team.
>>
>> Every Team and every Game are root entities, no child objects.
>>
>> When you want to delete a Team
>>    1) find all Games that have the Team in attribute team1
>>    2) delete these Games, maybe delete in groups of 10 to 20 per request
>>    3) find all Games that have the Team in attribute team2
>>    4) delete these Games, maybe delete in groups of 10 to 20 per request
>>    5) delete the Team object
>>
>> You can use the method from [1] to delete the Games
>>
>> [1]http://code.google.com/appengine/articles/update_schema.html
>>
>> 2009/4/13 ae :
>>
>>
>>
>> > Does anybody else find transactions very restricting?  How do I solve
>> > this problem?  Here is my data model...
>>
>> > Team(db.Model):
>> >  name = db.StringProperty()
>>
>> > Game(db.Model):
>> >  team1 = db.ReferenceProperty(Team, collection_name='game1_set')
>> >  team2 = db.ReferenceProperty(Team, collection_name='game2_set')
>>
>> > ... if I delete a team, I want to delete all the games associated with
>> > it as well so I need to put the delete operation in a transaction.
>> > But how would I setup the entity group?
>>
>> > setup 1) Team as parent of Game - but there can be only 1 parent and
>> > team1 and team2 should both be parents - DOESN'T WORK
>> > setup 2) Game as parent of Team - then that would mean each team can
>> > only play 1 game?  DOESN'T WORK
>> > setup 3) create a 3rd entity and let that be the parent of both Team
>> > and Game - but then all teams and games would be in the same entity
>> > group - is this my only option?
>>
>> > 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: deployment issues - HELP

2009-04-13 Thread 风笑雪
You should check whether you have handled the root path ('/') in your app.
If your app id is nostalgia-register, you will got this domain:
nostalgia-register.appspot.com, and need no settings.

2009/4/13 pumplove 

>
> Hi,
>I have created a simple application and uploaded it to the app
> engine and though i have given the app a unique Id (nostalgia-
> register.appspot.com) whenever i click on the link it tells me the url
> is invalid. Do i need a domain name ? becuase this is what is given in
> the docs " You can now see your application running on App Engine. If
> you set up a free appspot.com domain name, the URL for your website
> begins with your application ID:
> http://application-id.appspot.com "
>
> so ideally is shud have been able to access it ...any help on this
> would be greatly appreciated.
>
> Regards,
> Vikram
> >
>

--~--~-~--~~~---~--~~
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 sitemap file

2009-04-13 Thread Nora

Hello,
I want my application to be indexed by the google crawler quickly.  I
used the automatic sitemap generator to produce one.  I copied my
sitemap.xml to my account and added a static handler in my app.yaml
file.

- url: /
  static_files: sitemap.xml
  upload: sitemap.xml


But still I get the  (404 error) file not found Does anyone have a
clue why this is taking place?

Thank you very much.
--~--~-~--~~~---~--~~
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: GAE inter-apps communication

2009-04-13 Thread 风笑雪
It's here:

http://code.google.com/appengine/terms.html
*4. Fees for Use of the Service*
4.4. You may not develop multiple Applications to simulate or act as a
single Application or otherwise access the Service in a manner intended to
avoid incurring fees.

2009/4/12 DarkCoiote 

>
> Humm.. Didn't remember that, and with a quick (really quick) look
> didn't find that too...
>
> But that make sense, as It would be a way to 'bypass' the quotas and a
> way to do bad things (dos)...and other evil stuff too! lol
>
> But then, with an application like I said - central database, to use
> for score, person info,
> 'virtual currency',etc  - what would you suggest to do?
>
> Thanks!
> On Apr 11, 1:15 pm, 风笑雪  wrote:
> > There is a policy of GAE that you CAN NOT use an app to support another
> > app.
> >
> > 2009/4/11 DarkCoiote 
> >
> >
> >
> > > I thinking about creating a couple of applications that have a common
> > > data-base.
> > > As I'm pretty new at this stuff, I don't have many ideas.
> >
> > > One possible solution would be:
> >
> > > create the applications A,B,C
> > > create an master app. D that controls the central database:
> >
> > > Then, apps A,B,C would query app D to use the database  (get, post,
> > > put)
> >
> > > For D I guess an REST solution would be fine (although I don't even
> > > know for sure what
> > > REST is), then A,B,C would use the D REST api.
> >
> > > As the database should not be public, some kind of authentication must
> > > be done to
> > > ensure that D processes only requests from A,B,C (no idea on how to do
> > > this, except from
> > > the stupid method of sending a large known (to A,B,C,D) random string
> > > as a parameter)
> >
> > > Other alternatives to REST would be SOA and RPC, right? from what I've
> > > just read about
> > > these architecture REST would be the best one
> >
> > > Useful linkI found around:
> > >http://code.google.com/p/appengine-rest-server/
> >
> > > Any suggestion will be appreciated !
> >
> > > 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: The sitemap file

2009-04-13 Thread 风笑雪
You need put a static file in a static dir, just like this:
- url: /robots.txt   # Note: you can change its path
  static_files: static/robots.txt
  upload: static/robots.txt

- url: /static
  static_dir: static

And put your robots.txt in the "static" folder.

2009/4/13 Nora 

>
> Hello,
> I want my application to be indexed by the google crawler quickly.  I
> used the automatic sitemap generator to produce one.  I copied my
> sitemap.xml to my account and added a static handler in my app.yaml
> file.
>
> - url: /
>  static_files: sitemap.xml
>  upload: sitemap.xml
>
>
> But still I get the  (404 error) file not found Does anyone have a
> clue why this is taking place?
>
> Thank you very much.
> >
>

--~--~-~--~~~---~--~~
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: Datastore Question

2009-04-13 Thread 'Αλκης Ευλογημένος
A batch put does one round trip to the datastore and if your entities end up
stored on different machines it will perform those in parallel.
memcache alone won't save you from timeouts. If you timeout one per hundred
db ops and you do 100 ops per sec you will see a timeout one per sec. If
memcache reduces your db ops to 10 per sec you will see a timeout once per
10 secs. To eliminate the timeouts you need to wrap your db ops with
retries.

On Mon, Apr 13, 2009 at 10:52 AM, Paul Kinlan  wrote:

> Hi,
>
> I have added some use of memcache, however I am still seeing timeouts at
> the moment - although it has just said I need a composite index for another
> part of my application.
>
> What I don't quite understand is that it appears to be "puts" of new
> entities that are timing out and I can't work out why, I do individual
> writes of 3 entities and I was thinking of batching these together in a
> db.put, but from what I remember that is only a convienince method and
> essentially performs the same task.
>
> Paul
>
> 2009/4/13 Paul Kinlan 
>
> Hi,
>>
>> I will look at using memcache again, it might help a little as I do
>> perform some http requests against a user sequentially so it might help a
>> bit.  The problem is that I see a lot of timeouts on puts at the moment and
>> I am not sure how to remedy them.
>>
>> Paul.
>>
>> 2009/4/12 Alkis Evlogimenos ('Αλκης Ευλογημένος) 
>>
>> Pervasive use of memcache + exponential backoff retries on most operations
>>> solved it for me.
>>>
>>> On Sun, Apr 12, 2009 at 11:55 PM, Paul Kinlan wrote:
>>>
 Hi Guys,

 My app is Twitterautofollow.  I have a question about the quota,
 basically my app was serving between 6-13 requests a second and jumped up 
 to
 32 requests per-second and subsequently went over the quota.  I am not sure
 where the 32 requests a second are comming from although some of them might
 come from my ping service that I am running to regularly perform some tasks
 - I wouldn't be suprised if it was a bug I created

 Additionally the DataStore CPU Time is Limited even though it is only at
 3% of quota.

 Its starting to get a bit frustrating at the moment because I am having
 Data Store Timeouts very often on reads and puts.  Nothing in my model is 
 in
 an EntityGroup, that is, there is no use of parent, however there are many
 RefernceProperties.

 The general process I have that is causing the process goes as follows


1. Get the user (User Entity) from the datastore
2. Get the current search term (Search Entity) for the user - I
don't use the refernce propery set from the user because I need to 
 filter it
   1. Query Twitter
   2. For up to 3 search results add a new entity of type "Follow"
   and reference the search and user
  1. For each result check to see if the "Follow" entity already
  exists for the user - if it does we ignore the result
  3. update the search entity with some basic stats

 Overall there are, with 5 (1 user, 1 search and 3 reads of Follow) reads
 and up to 4 puts (3 for new entities 1 for the "Search" entity).  I don't
 think this is too heavy, but it might be.

 So my question is, am I being too excessive, why would this cause a lot
 of datastore timeouts in both the reads and puts?  What tips do people have
 for DataStore performance?

 Thanks,
 Paul



>>>
>>>
>>> --
>>>
>>> Alkis
>>>
>>>
>>>
>>
>
> >
>


-- 

Alkis

--~--~-~--~~~---~--~~
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] Limit on the number of applications

2009-04-13 Thread Jeremiah Elliott

Hello All -
I am doing some research for a project that I have coming up and have
a few questions that I have not been able to find by searching the
group. This will be my first AppEngine application, so sorry if this
is a dumb question. The project is going to be a SASS model
application where our customers will have a web application that we
write made available to them. While I realize that I could have a
customer id in every object stored in the data store and write
business logic to verify that each customer sees only their data, I
would rather have each customer have their own complete appengine
application with their own tables that are totally separate. If I put
all customers in one application, i will not be able to upgrade the
application per-customer, but rather all at once.  Currently I only
have available 10 applications when I sign in.  The other advantage of
having all customers in their own application instance is that we will
know exactly what the resources for a given customer is every month.

I am hoping that Google increases the number of available applications
as i use them. So when I utilize my 9th applicaiton, it shows that I
actually have 20 or something like that. I have not found any thing on
the web that would give me any indication one way or the other if this
is the case, so I am assuming that it isn't.

If having more than 10 applications is simply not an option, are there
any good workarounds from a data store point of view? Anything like
schemas in most relational databases?


Has anyone asked google to increase this limit? If so how did that
work out?
--~--~-~--~~~---~--~~
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: The sitemap file

2009-04-13 Thread Wooble



On Apr 13, 7:55 am, Nora  wrote:
> Hello,
> I want my application to be indexed by the google crawler quickly.  I
> used the automatic sitemap generator to produce one.  I copied my
> sitemap.xml to my account and added a static handler in my app.yaml
> file.
>
> - url: /
>   static_files: sitemap.xml
>   upload: sitemap.xml

the url should be '/sitemap.xml', not '/'.  You're telling the server
to return your sitemap as the main page of your site, which you almost
certainly don't want to do.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-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: GAE inter-apps communication

2009-04-13 Thread DarkCoiote

Emphasis on REALLY QUICK  lol

Guess I searched for the wrong words then

"You can put your separate applications at different URLs of the appid
with the data. "

The problem with that is that if any of the sub-aplications
get too complicated or too much traffic, it will affect
all

and the quota will be reached really faster, although there are 'many'
sub-aplications nearly independent of each other


Thanks for the answers!

On Apr 13, 9:06 am, 风笑雪  wrote:
> It's here:
>
> http://code.google.com/appengine/terms.html
> *4. Fees for Use of the Service*
> 4.4. You may not develop multiple Applications to simulate or act as a
> single Application or otherwise access the Service in a manner intended to
> avoid incurring fees.
>
> 2009/4/12 DarkCoiote 
>
>
>
> > Humm.. Didn't remember that, and with a quick (really quick) look
> > didn't find that too...
>
> > But that make sense, as It would be a way to 'bypass' the quotas and a
> > way to do bad things (dos)...and other evil stuff too! lol
>
> > But then, with an application like I said - central database, to use
> > for score, person info,
> > 'virtual currency',etc  - what would you suggest to do?
>
> > Thanks!
> > On Apr 11, 1:15 pm, 风笑雪  wrote:
> > > There is a policy of GAE that you CAN NOT use an app to support another
> > > app.
>
> > > 2009/4/11 DarkCoiote 
>
> > > > I thinking about creating a couple of applications that have a common
> > > > data-base.
> > > > As I'm pretty new at this stuff, I don't have many ideas.
>
> > > > One possible solution would be:
>
> > > > create the applications A,B,C
> > > > create an master app. D that controls the central database:
>
> > > > Then, apps A,B,C would query app D to use the database  (get, post,
> > > > put)
>
> > > > For D I guess an REST solution would be fine (although I don't even
> > > > know for sure what
> > > > REST is), then A,B,C would use the D REST api.
>
> > > > As the database should not be public, some kind of authentication must
> > > > be done to
> > > > ensure that D processes only requests from A,B,C (no idea on how to do
> > > > this, except from
> > > > the stupid method of sending a large known (to A,B,C,D) random string
> > > > as a parameter)
>
> > > > Other alternatives to REST would be SOA and RPC, right? from what I've
> > > > just read about
> > > > these architecture REST would be the best one
>
> > > > Useful linkI found around:
> > > >http://code.google.com/p/appengine-rest-server/
>
> > > > Any suggestion will be appreciated !
>
> > > > 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: GAE inter-apps communication

2009-04-13 Thread Wooble

Yes, your quota will be reached faster.  App Engine's not a charity;
there's a reason that bit of the TOS is in the "billing" section.

On Apr 13, 10:28 am, DarkCoiote  wrote:
> Emphasis on REALLY QUICK  lol
>
> Guess I searched for the wrong words then
>
> "You can put your separate applications at different URLs of the appid
> with the data. "
>
> The problem with that is that if any of the sub-aplications
> get too complicated or too much traffic, it will affect
> all
>
> and the quota will be reached really faster, although there are 'many'
> sub-aplications nearly independent of each other
>
> Thanks for the answers!
>
> On Apr 13, 9:06 am, 风笑雪  wrote:
>
> > It's here:
>
> >http://code.google.com/appengine/terms.html
> > *4. Fees for Use of the Service*
> > 4.4. You may not develop multiple Applications to simulate or act as a
> > single Application or otherwise access the Service in a manner intended to
> > avoid incurring fees.
>
> > 2009/4/12 DarkCoiote 
>
> > > Humm.. Didn't remember that, and with a quick (really quick) look
> > > didn't find that too...
>
> > > But that make sense, as It would be a way to 'bypass' the quotas and a
> > > way to do bad things (dos)...and other evil stuff too! lol
>
> > > But then, with an application like I said - central database, to use
> > > for score, person info,
> > > 'virtual currency',etc  - what would you suggest to do?
>
> > > Thanks!
> > > On Apr 11, 1:15 pm, 风笑雪  wrote:
> > > > There is a policy of GAE that you CAN NOT use an app to support another
> > > > app.
>
> > > > 2009/4/11 DarkCoiote 
>
> > > > > I thinking about creating a couple of applications that have a common
> > > > > data-base.
> > > > > As I'm pretty new at this stuff, I don't have many ideas.
>
> > > > > One possible solution would be:
>
> > > > > create the applications A,B,C
> > > > > create an master app. D that controls the central database:
>
> > > > > Then, apps A,B,C would query app D to use the database  (get, post,
> > > > > put)
>
> > > > > For D I guess an REST solution would be fine (although I don't even
> > > > > know for sure what
> > > > > REST is), then A,B,C would use the D REST api.
>
> > > > > As the database should not be public, some kind of authentication must
> > > > > be done to
> > > > > ensure that D processes only requests from A,B,C (no idea on how to do
> > > > > this, except from
> > > > > the stupid method of sending a large known (to A,B,C,D) random string
> > > > > as a parameter)
>
> > > > > Other alternatives to REST would be SOA and RPC, right? from what I've
> > > > > just read about
> > > > > these architecture REST would be the best one
>
> > > > > Useful linkI found around:
> > > > >http://code.google.com/p/appengine-rest-server/
>
> > > > > Any suggestion will be appreciated !
>
> > > > > 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: Datastore Question

2009-04-13 Thread Paul Kinlan
Hi,

Right, I was under the impression that the batch put was a convienence  
method I.e it will sequentially put everything in the list in seperate  
transactions.  It looks like a batch put might be the best way for me  
to go for now.

Memcache will definatly help for some situations.

I think this has been brought up before, how do people profile there  
apps when in a live environment? It would be interesting for me to  
have some stats broken down by http handler.

Paul



On 13 Apr 2009, at 13:13, Alkis Evlogimenos ('Αλκης Ευλογημένος)  wrote:

> A batch put does one round trip to the datastore and if your  
> entities end up stored on different machines it will perform those  
> in parallel.
>
> memcache alone won't save you from timeouts. If you timeout one per  
> hundred db ops and you do 100 ops per sec you will see a timeout one  
> per sec. If memcache reduces your db ops to 10 per sec you will see  
> a timeout once per 10 secs. To eliminate the timeouts you need to  
> wrap your db ops with retries.
>
> On Mon, Apr 13, 2009 at 10:52 AM, Paul Kinlan  
>  wrote:
> Hi,
>
> I have added some use of memcache, however I am still seeing  
> timeouts at the moment - although it has just said I need a  
> composite index for another part of my application.
>
> What I don't quite understand is that it appears to be "puts" of new  
> entities that are timing out and I can't work out why, I do  
> individual writes of 3 entities and I was thinking of batching these  
> together in a db.put, but from what I remember that is only a  
> convienince method and essentially performs the same task.
>
> Paul
>
> 2009/4/13 Paul Kinlan 
>
> Hi,
>
> I will look at using memcache again, it might help a little as I do  
> perform some http requests against a user sequentially so it might  
> help a bit.  The problem is that I see a lot of timeouts on puts at  
> the moment and I am not sure how to remedy them.
>
> Paul.
>
> 2009/4/12 Alkis Evlogimenos ('Αλκης Ευλογημένος)  ime...@gmail.com>
>
> Pervasive use of memcache + exponential backoff retries on most  
> operations solved it for me.
>
> On Sun, Apr 12, 2009 at 11:55 PM, Paul Kinlan  
>  wrote:
> Hi Guys,
>
> My app is Twitterautofollow.  I have a question about the quota,  
> basically my app was serving between 6-13 requests a second and  
> jumped up to 32 requests per-second and subsequently went over the  
> quota.  I am not sure where the 32 requests a second are comming  
> from although some of them might come from my ping service that I am  
> running to regularly perform some tasks - I wouldn't be suprised if  
> it was a bug I created
>
> Additionally the DataStore CPU Time is Limited even though it is  
> only at 3% of quota.
>
> Its starting to get a bit frustrating at the moment because I am  
> having Data Store Timeouts very often on reads and puts.  Nothing in  
> my model is in an EntityGroup, that is, there is no use of parent,  
> however there are many RefernceProperties.
>
> The general process I have that is causing the process goes as follows
>
> Get the user (User Entity) from the datastore
> Get the current search term (Search Entity) for the user - I don't  
> use the refernce propery set from the user because I need to filter it
> Query Twitter
> For up to 3 search results add a new entity of type "Follow" and  
> reference the search and user
> For each result check to see if the "Follow" entity already exists  
> for the user - if it does we ignore the result
> update the search entity with some basic stats
> Overall there are, with 5 (1 user, 1 search and 3 reads of Follow)  
> reads and up to 4 puts (3 for new entities 1 for the "Search"  
> entity).  I don't think this is too heavy, but it might be.
>
> So my question is, am I being too excessive, why would this cause a  
> lot of datastore timeouts in both the reads and puts?  What tips do  
> people have for DataStore performance?
>
> Thanks,
> Paul
>
>
>
>
>
> -- 
>
> Alkis
>
>
>
>
>
>
>
>
>
> -- 
>
> Alkis
>
> >

--~--~-~--~~~---~--~~
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: Datastore Question

2009-04-13 Thread Paul Kinlan
I forgot to include this in the previous message.

I am reticent to do retries because the cases where I see a datastore  
timeout  is when it has taken 8000ms to do a put.

However, I might as well give it a go.

Paul



On 13 Apr 2009, at 13:13, Alkis Evlogimenos ('Αλκης Ευλογημένος)  wrote:

> A batch put does one round trip to the datastore and if your  
> entities end up stored on different machines it will perform those  
> in parallel.
>
> memcache alone won't save you from timeouts. If you timeout one per  
> hundred db ops and you do 100 ops per sec you will see a timeout one  
> per sec. If memcache reduces your db ops to 10 per sec you will see  
> a timeout once per 10 secs. To eliminate the timeouts you need to  
> wrap your db ops with retries.
>
> On Mon, Apr 13, 2009 at 10:52 AM, Paul Kinlan  
>  wrote:
> Hi,
>
> I have added some use of memcache, however I am still seeing  
> timeouts at the moment - although it has just said I need a  
> composite index for another part of my application.
>
> What I don't quite understand is that it appears to be "puts" of new  
> entities that are timing out and I can't work out why, I do  
> individual writes of 3 entities and I was thinking of batching these  
> together in a db.put, but from what I remember that is only a  
> convienince method and essentially performs the same task.
>
> Paul
>
> 2009/4/13 Paul Kinlan 
>
> Hi,
>
> I will look at using memcache again, it might help a little as I do  
> perform some http requests against a user sequentially so it might  
> help a bit.  The problem is that I see a lot of timeouts on puts at  
> the moment and I am not sure how to remedy them.
>
> Paul.
>
> 2009/4/12 Alkis Evlogimenos ('Αλκης Ευλογημένος)  ime...@gmail.com>
>
> Pervasive use of memcache + exponential backoff retries on most  
> operations solved it for me.
>
> On Sun, Apr 12, 2009 at 11:55 PM, Paul Kinlan  
>  wrote:
> Hi Guys,
>
> My app is Twitterautofollow.  I have a question about the quota,  
> basically my app was serving between 6-13 requests a second and  
> jumped up to 32 requests per-second and subsequently went over the  
> quota.  I am not sure where the 32 requests a second are comming  
> from although some of them might come from my ping service that I am  
> running to regularly perform some tasks - I wouldn't be suprised if  
> it was a bug I created
>
> Additionally the DataStore CPU Time is Limited even though it is  
> only at 3% of quota.
>
> Its starting to get a bit frustrating at the moment because I am  
> having Data Store Timeouts very often on reads and puts.  Nothing in  
> my model is in an EntityGroup, that is, there is no use of parent,  
> however there are many RefernceProperties.
>
> The general process I have that is causing the process goes as follows
>
> Get the user (User Entity) from the datastore
> Get the current search term (Search Entity) for the user - I don't  
> use the refernce propery set from the user because I need to filter it
> Query Twitter
> For up to 3 search results add a new entity of type "Follow" and  
> reference the search and user
> For each result check to see if the "Follow" entity already exists  
> for the user - if it does we ignore the result
> update the search entity with some basic stats
> Overall there are, with 5 (1 user, 1 search and 3 reads of Follow)  
> reads and up to 4 puts (3 for new entities 1 for the "Search"  
> entity).  I don't think this is too heavy, but it might be.
>
> So my question is, am I being too excessive, why would this cause a  
> lot of datastore timeouts in both the reads and puts?  What tips do  
> people have for DataStore performance?
>
> Thanks,
> Paul
>
>
>
>
>
> -- 
>
> Alkis
>
>
>
>
>
>
>
>
>
> -- 
>
> Alkis
>
> >

--~--~-~--~~~---~--~~
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 shut the server down

2009-04-13 Thread Banaticus

Vista Business, running the apps server on the old Python 2.5
version.  Thanks, WallyDD, the server didn't put out a "quit" message
until I tried to request a page from it after hitting Ctrl+C.

On Apr 10, 11:58 am, WallyDD  wrote:
> After pressing Ctrl-C, request a page from the server, then it will
> stop.
>
> On Apr 9, 10:10 pm,Banaticus wrote:
>
>
>
> > If Ctrl-C doesn't work, after closing the cmd window, apparently
> > ending the GoogleUpdater process kills the server.- 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] Integrating Google Application Engine with Google Maps

2009-04-13 Thread kernja

Hello,

I just have a question on whether or not this is possible; I would
like to make an application with Google Application Engine that allows
a user to enter in a destination and ending point, have it generate a
map, and show landmarks within a certain vicinity of the route.

Now, I know how to go about finding areas within a certain route; I
have GPs data and can sort through it by region.  The only problem I
have is generating an actual route to go through!  I have no idea - if
it is even possible that is - to interface the Google Maps route
generation interface through Google Application Engine.

I found webservices online that can generate a route, but it gives
step-by-step directions.  I like how Google Maps - through the Geopoly
(line?)- gives you points instead of street-wise direction (e.g, go
left after 10 miles).

--~--~-~--~~~---~--~~
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: Over Quota: Datastore Indices Count

2009-04-13 Thread fedestabile

Same happen to me, and I just developing the application, I don't have
any indexes defined

My app ID is: myclimbs

Thanks a lot!
Fred

On Mar 2, 5:08 am, Jose Florido  wrote:
> Hi,
>
> I also have the same message. I only use 50 indexes, so it's under the
> limit.
> The ID of my app is: museliusweb
>
> thanks!
>
> On 5 ene, 18:52, Marzia Niccolai  wrote:
>
> > Hi,
>
> > The quota limit is 100, but there is currently an issue where vacuumed
> > indexes don't get credited back when vacuumed.  I have fixed this issue with
> > your quota for now.
>
> > -Marzia
>
> > On Sat, Jan 3, 2009 at 8:09 AM, dloomer  wrote:
>
> > > Is the index quota limit actually 50?  I don't see that listed on my
> > > Quota Details page or here:
> > >http://code.google.com/appengine/articles/quotas.html.
>
> > > Anyway, just today I started seeing that warning in my dashboard even
> > > though I have only 45 indices (no more than nine for any given entity
> > > kind).  What's strange is, I had never seen this warning before in
> > > spite of the fact that up until yesterday, when I did some cleanup, I
> > > had 13 additional indices on top of the current 45.
>
> > > Incidentally, late last night I was getting 500 server errors on the
> > > index update portion of my deployments (no further details on the
> > > nature of the error were given).
>
> > > I haven't quite nailed down the security model of my app yet, so I
> > > don't want to make the app ID public here -- I can provide that in a
> > > private e-mail.
>
> > > On Dec 20 2008, 1:40 am, paptimus  wrote:
> > > > Hi, GAE team.
>
> > > > I encountered "Your application is exceeding a quota: Datastore
> > > > Indices Count" on dashboard.
>
> > > > The number of indeces is under 50, but one model has about 30 indeces.
> > > > So I think this one is the point of over quota warning and vacuumed
> > > > these indeces.
> > > > Vacuume_index was completed and there is no index of that model.
>
> > > > But the warging of over quota ramains over 24 hours and the status of
> > > > a new index remains "building".
>
> > > > I hope you check my index and change the status to "Error" if my index
> > > > has problems, please.
>
> > > > 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: Error posting to URL: http://appengine.google.com/api/appversion/create?app_id: Invalid runtime specified.

2009-04-13 Thread Dmitry V Ilyin

Do you use Google Apps-based account?

On 12 апр, 10:09, "sud...@najanaja.com"  wrote:
> Hi Jason,
> I have similar issue while publishing java app using eclipse and yes I
> did receive an email two days ago stating that my java app engine
> account had been activated.
> Any ideas?
> Thanks
> Sudeep
> On Apr 9, 1:39 pm, Jason  wrote:
>
> > Have you received an email indicating your Google App Engine for Java
> > account has been activated? In order to deploy your applications to
> > production, your account must be activated first:
>
> >http://code.google.com/appengine/kb/java.html#runtime
>
> > - Jason
>
> > On Apr 8, 1:22 pm, njaffer  wrote:
>
> > > Getting following error when attempting to upload using eclipse plugin
> > > on a mac, using eclipse 3.3.x.
>
> > > Unable to upload:
> > > java.io.IOException: Error posting to 
> > > URL:http://appengine.google.com/api/appversion/create?app_id=xxx&version=1&;
> > > 400 Bad Request
> > > Invalid runtime specified.
>
> > >         at com.google.appengine.tools.admin.ServerConnection.send
> > > (ServerConnection.java:114)
> > >         at com.google.appengine.tools.admin.ServerConnection.post
> > > (ServerConnection.java:66)
> > >         at com.google.appengine.tools.admin.AppVersionUpload.send
> > > (AppVersionUpload.java:345)
> > >         at 
> > > com.google.appengine.tools.admin.AppVersionUpload.beginTransaction
> > > (AppVersionUpload.java:159)
> > >         at com.google.appengine.tools.admin.AppVersionUpload.doUpload
> > > (AppVersionUpload.java:68)
> > >         at com.google.appengine.tools.admin.AppAdminImpl.update
> > > (AppAdminImpl.java:41)
> > >         at 
> > > com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy
> > > (AppEngineBridgeImpl.java:203)
> > >         at
> > > com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace
> > > (DeployProjectJob.java:97)
> > >         at org.eclipse.core.internal.resources.InternalWorkspaceJob.run
> > > (InternalWorkspaceJob.java:38)
> > >         at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> > > java.io.IOException: Error posting to 
> > > URL:http://appengine.google.com/api/appversion/create?app_id=&version=1&;
> > > 400 Bad Request
> > > Invalid runtime specified.

--~--~-~--~~~---~--~~
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: Sign up to use Java in appEngine

2009-04-13 Thread Russ

When did you sign up?  I signed up approximately April 11 at 3:00 AM
GMT and haven't heard back.  I've heard that the number of
registrations is limited to the first 10,000 and if you don't get a
reply then the number may be met.

On Apr 12, 3:03 am, Prashant Gupta  wrote:
> i got my approval in 3-4 hrs.
>
> On Sun, Apr 12, 2009 at 12:24 PM, Edward <061...@gmail.com> wrote:
>
> > I singed up to use Java several hours ago; how long does it take to
> > get approved?
>
> > -
> > e

--~--~-~--~~~---~--~~
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: PageContextImpl giving issues (java.lang.ClassCastException: java.security.AccessControlException) with Spring form tag?

2009-04-13 Thread Elvea

add a custom editor to the binder then i got it work
(1)
public class BindingInitializer implements WebBindingInitializer {
@Override
public void initBinder(WebDataBinder binder, WebRequest request) {
SimpleDateFormat dateFormat = new 
SimpleDateFormat("-MM-dd");
binder.registerCustomEditor(Date.class, new CustomDateEditor
(dateFormat, true));
binder.registerCustomEditor(Integer.class, new 
CustomNumberEditor
(Integer.class, true));
binder.registerCustomEditor(Double.class, new CustomNumberEditor
(Double.class, true));
binder.registerCustomEditor(Float.class, new CustomNumberEditor
(Float.class, true));
binder.registerCustomEditor(String.class, new CharacterEditor
(true));
}

}

(2) and the dispatcher-servlet,xml







--~--~-~--~~~---~--~~
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: Using app engine for iPhone message push

2009-04-13 Thread RSW

Yes, sadly, it is a binary data, one-way secure socket (no
acknowledgement), but I guess it is not too surprising as a
performance optimization. As a corporate programmer I see this for
data sets like press releases and raw stock quote data; they are often
streamed down a raw socket to ensure real-time streams. I can't even
guess what the volume of data would be, but I wonder if it is the
anticipated data flow from a popular IM service like AIM the prompted
this. Still, it is annoying.

The documentation is covered by the beta confidentiality agreement, so
you'd have to be a registered developer.

Is there a way to create a limited functionality socket (and ssl)
implementation? I assume Google doesn't support the lib because it
might allow apps to probe their data centres or support other
nefarious activity (enforcing sandboxing). For instance, would it be
possible to limit sockets to domain names, not IP addresses? And limit
the domain names that can be accessed?

As a note, I will be using Azure instead of Google App, since it does
not limit access to sockets.

-Ronald.

On Apr 12, 4:01 am, "T.J. Crowder"  wrote:
> > Sadly, it's not an HTTP-based web service, and moreover it doesn't run
> > on an HTTP/s port.
> > We need a pure socket interface to talk with Apple push server.
>
> Well, that's not good.  Do you have a reference for that?  (I believe
> you, I just want to read more.)  It seems surprising.
> --
> T.J. Crowder
> tj / crowder software / com
> Independent Software Engineer, consulting services available
>
> On Apr 11, 8:24 pm, Marco Borromeo  wrote:
>
>
>
> > Sadly, it's not an HTTP-based web service, and moreover it doesn't run
> > on an HTTP/s port.
> > We need a pure socket interface to talk with Apple push server.
>
> > 2009/4/11 T.J. Crowder :
>
> > > Hi,
>
> > > If Apple is making the notification service available as a web app or
> > > web service, could you use a cron job doing a URLFetch?  Apparently
> > > all push notifications will go through Apple servers, so they'll
> > > probably provide an HTTP-based API.
>
> > > FWIW,
> > > --
> > > T.J. Crowder
> > > tj / crowder software / com
> > > Independent Software Engineer, consulting services available
>
> > > On Apr 11, 12:57 am, RSW  wrote:
> > >> I realize that the current version of the app engine does not support
> > >> sockets at the moment. Does anyone know if this is on the roadmap?
>
> > >> I want to be able to create an app that runs a cron job that does a
> > >> periodic check on something and alert iPhone subscribers through the
> > >> new push mechanism in the iPhone OS 3.0.

--~--~-~--~~~---~--~~
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] Using the Date Range recipe with Geohashes to find Bounding Boxes

2009-04-13 Thread JDT

Hello,

I am trying to use the Date Range Recipe [1] in the App Engine
Cookbook, to find bounding boxes containing a particular point.

The method used in the recipe allows searching for events occurring on
particular days by storing the event start and end dates in a list
(date_range).

This allows the query:
 ... WHERE date_range >= :1 AND date_range <= :1, date_in_question)
to work because [2] "In a query, comparing a list property to a value
performs the test against the list members: ... list_property < value
tests if any of the members of the list are less than the given value,
and so forth."

I have taken the same method and used it for geohashes. In my case I
have many suppliers who deliver to geographical areas. These areas
overlap and are not exclusive.
I have stored the delivery areas using a bounding box defined by two
geohases, one for the NE point and one for the SW point:

delivery_area = [NEhash, SWhash]

When searching, I geohash the search position, then search in the
list, as in the recipe:

searchpositionhash = geohash.encode
(searchpositionlat,searchpositionlon)
sellers_who_deliver = db.GqlQuery("SELECT * FROM Sellers WHERE
delivery_area <= :1 AND delivery_area >= :1, searchpositionhash )

This works without any problems in the SDK, but no responses are
returned in the production environment. Understandably it is
frustrating when the SDK works differently from the production server,
but my frustration is compounded by my inability to find any posts
showing similar problems.

Has anyone used lists of geohashes to define bounding boxes, if so
what was your experience of searching?
Can anyone see anything wrong with the method I am using?
Finally, if there is a simpler method of finding bounding boxes,
matching a point please, please, please, kick me in the right
direction!

Thanks,

David

[1] http://appengine-cookbook.appspot.com/recipe/how-to-query-by-date-range/
[2] 
http://code.google.com/appengine/docs/python/datastore/typesandpropertyclasses.html#ListProperty

--~--~-~--~~~---~--~~
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] Versions issue

2009-04-13 Thread ntenev

 Hi, I need little help.

My application (facebook-playground) have two versions 0 and 1. My
problem is with version 0. When in app.yaml I set version: 0 upload
failed with last lines:

HTTPError: HTTP Error 500: Internal Server Error
Rolling back the update.
Error 500: --- begin server output ---

Server Error (500)
A server error has occurred.
--- end server output ---

In administrtion panel, under versions I set default version to 1 and
then try to remove version 0 but server said:

Server Error
A server error has occurred.
Return to Applications screen »

And if I try to access it via URL

http://0.latest.facebook-playground.appspot.com/

result is:

Error: Not Found

The requested URL / was not found on this server.

This problems are from yesterday. Before that everything was work
fine. Can somebody help me to can again upload on version 0, or to
reset it to reupload it again please.

 Regards !

--~--~-~--~~~---~--~~
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] Ordering results for a PolyModel class

2009-04-13 Thread Eric Walker

Hi everyone,

I have a beginner's question I wasn't able to find documentation on.
I'd be grateful if someone could point me to a specific page or issue
number that discusses it.

I just finished debugging a simple pager that pages over a PolyModel
subclass using the __key__ in descending order.  It works on the
development server but not in production, where an unspecified
exception is thrown (nothing appears in the log).  Here is the
offending line:

result = self.model.all().order('-__key__').fetch
(self.pagesize + 1)

The application works in production with the following modified
version of the line:

result = self.model.all().fetch(self.pagesize + 1)

One approach I've tried as a workaround is to order by an "added"
timestamp property in the PolyModel base class, which results in an
exception as well.  Another thing I've tried is to manually add the
following index to index.yaml, which wasn't being created
automatically by the development server (I assume it's not necessary):

- kind: QuestionGroup
  properties:
  - name: __key__
direction: desc

Adding this definition didn't fix the problem either.

I understand that there was a similar ordering issue that was
addressed in http://code.google.com/p/googleappengine/issues/detail?id=884.
According to a comment, the problem was fixed in 1.1.8 (I'm using
1.2.0).

Please let me know if I've left something important out.

In a different connection, the pager turned out to be pretty finicky
to debug, as I wanted both a "next" and "back" link, and I
unintentionally introduced a lot of off-by-one errors.  Has been
logged for a feature request for paging that I can follow?  I assume
this is something that most projects will need at some point.

Many thanks in advance for any help,
Eric

--~--~-~--~~~---~--~~
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] Uploading Java Application

2009-04-13 Thread Jeffery

Hi All,
I tried to upload the guestbook application to my newly created
google app account.  after run the 'appengine-java-sdk\bin\appcfg.cmd
update appengine-java-sdk\demos\guestbook\war'

i hit with with the below exception:
java.io.IOException: Error posting to URL:
http://appengine.google.com/api/appversion/create?app_id=rumahku123&version=1&;
400 Bad Request
Invalid runtime specified.

Unable to upload app: Error posting to URL:
http://appengine.google.com/api/appversion/create?app_id=rumahku123&version=1&;
400 Bad Request
Invalid runtime specified.

My application id is 'rumahku123'.  I tried to modify the appengine-
web.xml inside the guestbook war file (I changed the application id to
'rumah123.appspot.com') but after run the update command i hit the
below exception:
java.io.IOException: Error posting to URL:
http://appengine.google.com/api/appversion/create?app_id=rumahku123.appspot.com&version=1&;
403 Forbidden
You do not have permission to modify this app
(app_id=u'rumahku123.appspot.com').

Unable to upload app: Error posting to URL:
http://appengine.google.com/api/appversion/create?app_id=rumahku123.appspot.com&version=1&;
403 Forbidden
You do not have permission to modify this app
(app_id=u'rumahku123.appspot.com').

Locally I can access the guestbook application (localhost:8080/
guestbook) so i don't think it's the application.  And also I tried to
access my account in the appspot (rumahku123.appspot.com)  I am able
to see the error page.

Is the java support only enabled to certain accounts?  do i need to
activate certain things?

any comments/advice would be 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-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: Data upload: differences between bulkload_client and bulkloader ?

2009-04-13 Thread Randinn

Has anyone come up with an equivalent for the Java implementation?

On Mar 26, 2:14 pm, Julian  wrote:
> Thanks for the clarification.
>
> In the old version, the way to assign key names for uploaded data was
> to override HandleEntity() and to create a new entity there.
> With the new version(bulkloader.py), it seems you should override
> GenerateKey() instead.
>
> Maybe you can add it to the documentation.
>
> Julian
>
> On Mar 26, 7:27 am, Marzia Niccolai  wrote:
>
> > Hi,
>
> > The article is now obsolete and should be removed, it explains how to use
> > the bulk upload tool that was available at launch.
>
> > Recently, we released an improved version of the tool, which is what the
> > second document explains.
>
> > -Marzia
>
> > On Tue, Mar 24, 2009 at 4:58 AM, Julian  wrote:
>
> > > Hi,
>
> > > The following docs describe how to upload csv data to the datastore:
> > >http://code.google.com/appengine/articles/bulkload.html
> > >http://code.google.com/appengine/docs/python/tools/uploadingdata.html
>
> > > But one use the script bulkload_client.py and the other bulkloader.py.
> > > In both files it is written that their purpose is to "Imports CSV data
> > > over HTTP."
>
> > > What is the difference?? I cannot figure out.
>
> > > Julian

--~--~-~--~~~---~--~~
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] Cron Job and DeadlineExceededError

2009-04-13 Thread jorge

I guess I probably misunderstood and thought that cron jobs weren't
subject to the same 10 second request deadline for HTTP requests?  I'm
trying to run a cron job that sends out a mailer.  Unfortunately, it's
taking longer than 10 seconds so the job will fail about halfway
through.  I guess I could rewrite it to only do batches at a time.
The means extra tables in my database to keep track of who has been
mailed, etc.  Not a big deal, I guess.  It just seems that this
restriction makes cron jobs fairly limited in what they can do.  A
database cleanup job, for example, is going to take longer and longer
as tables grow and will almost certainly always hit this limit, and
create a situation where the cron scripts will have to be rewritten
and additional tables written to manage intermediate state, etc.

Is the intent that the cron jobs will remain subject to the same
restrictions as other requests?

--~--~-~--~~~---~--~~
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] DuplicatePropertyError in google-app-engine-django sample

2009-04-13 Thread Ferry Tanu
Hi,

I'm trying to follow the google-app-engine-django sample, these are steps
that I did:

1. models.py:

from appengine_django.models import BaseModel
from google.appengine.ext import db

class Poll(BaseModel):
question = db.StringProperty()
pub_date = db.DateTimeProperty('date published')

class Choice(BaseModel):
poll = db.ReferenceProperty(Poll)
choice = db.StringProperty()
votes = db.IntegerProperty()

2. python manage.py shell
3. >>> from mysite.polls.models import Poll, Choice

Then got this error:

WARNING:root:Could not initialize images API; you are likely missing the
Python
"PIL" module. ImportError: No module named _imaging
Python 2.5.4 (r254
:67916,
Dec 23 2008, 15:10:54) [MSC v.1310 32 bit
(Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from mysite.polls.models import Poll, Choice
Traceback (most recent call last):
  File "", line 1, in 
  File "D:\mysite\polls\models.py", line 9, in 
class Choice(BaseModel):
  File "D:\mysite\appengine_django\models.py", line 131, in __init__
super(PropertiedClassWithDjango, cls).__init__(name, bases, attrs)
  File "C:\Program
Files\Google\google_appengine\google\appengine\ext\db\__init_
_.py", line 319, in __init__
_initialize_properties(cls, name, bases, dct)
  File "C:\Program
Files\Google\google_appengine\google\appengine\ext\db\__init_
_.py", line 270, in _initialize_properties
attr.__property_config__(model_class, attr_name)
  File "C:\Program
Files\Google\google_appengine\google\appengine\ext\db\__init_
_.py", line 2546, in __property_config__
self.collection_name))
DuplicatePropertyError: Class Model already has property choice_set


Anyone know why ?

Thanks

~Ferry

--~--~-~--~~~---~--~~
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] Sudoku on GAE using Java

2009-04-13 Thread SohilV

Hello all
Just deployed the sudoku using java
check it out
http://bingosudoku.appspot.com/
give the feed back
thanks in advance
sohil

--~--~-~--~~~---~--~~
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] Still waiting Java activation

2009-04-13 Thread Francois

I signed up for the Java access this WE, but didn't receive an email
reply yet.
Does anybody know how long is the wait?

--~--~-~--~~~---~--~~
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: Limit on the number of applications

2009-04-13 Thread gabriel munteanu

i think you should do these 10 apps for yourself and every friend you
have with a google account [you + 3 friends = 40 apps].
i won't bet that they will increase this number any time soon.

jgabios

On Mon, Apr 13, 2009 at 3:44 PM, Jeremiah Elliott
 wrote:
>
> Hello All -
> I am doing some research for a project that I have coming up and have
> a few questions that I have not been able to find by searching the
> group. This will be my first AppEngine application, so sorry if this
> is a dumb question. The project is going to be a SASS model
> application where our customers will have a web application that we
> write made available to them. While I realize that I could have a
> customer id in every object stored in the data store and write
> business logic to verify that each customer sees only their data, I
> would rather have each customer have their own complete appengine
> application with their own tables that are totally separate. If I put
> all customers in one application, i will not be able to upgrade the
> application per-customer, but rather all at once.  Currently I only
> have available 10 applications when I sign in.  The other advantage of
> having all customers in their own application instance is that we will
> know exactly what the resources for a given customer is every month.
>
> I am hoping that Google increases the number of available applications
> as i use them. So when I utilize my 9th applicaiton, it shows that I
> actually have 20 or something like that. I have not found any thing on
> the web that would give me any indication one way or the other if this
> is the case, so I am assuming that it isn't.
>
> If having more than 10 applications is simply not an option, are there
> any good workarounds from a data store point of view? Anything like
> schemas in most relational databases?
>
>
> Has anyone asked google to increase this limit? If so how did that
> work out?
> >
>



-- 
jgabios
http://bash.editia.info

--~--~-~--~~~---~--~~
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] running external applications

2009-04-13 Thread ken

I am in the early stages of developing a new web application and
Google App Engine is looking very enticing. However, part of my web
application involves the use of Subversion as a component of the
overall solution. (Note: I am actually using a subversion repository
as part of the solution, not just hosting the app's code itself in the
repository.)  I was wondering if Google App Engine has any means for
the hosting of external programs? Given that Subversion is written in
C/C++, and not Java or Python, I didn't see any way to "run" it within
Google App Engine. With a cloud computing service like EC2, I can
install anything I want on a VM. But I don't see this capability with
Google App Engine. The subversion repository wouldn't necessarily have
to be hosted right next to my Google App Engine web application, but
the network connectivity between the two would need to be fast and
cheap. (Faster and cheaper than standard internet connectivity.)
Private, for-a-fee usage of google code hosting might be feasible in
my particular scenario, if this option is even available, but I am
also interested in the general answer to the question of: "I need to
be able to run application X written in language Y alongside my Google
App Engine web application. How can I do this?"

Thanks,
Ken


--~--~-~--~~~---~--~~
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: 500 Internal Server Error while deploying using eclipse

2009-04-13 Thread kp

Any update on this issue, or did you get it figured out? I'm having
the same problem that you are, and I can't figure out why it's
happening.

On Apr 11, 12:46 pm, "sud...@najanaja.com" 
wrote:
> I keep getting following error while deploying my java app. What could
> be the reason?
>
> Unable to upload app: Error posting to 
> URL:http://appengine.google.com/api/appversion/create?app_id=hohalla8&ver...
> 500 Internal Server Error
>
> Server Error (500)
> A server error has occurred.
>
> See the Eclipse error log for more details
> Unable to upload app: Error posting to 
> URL:http://appengine.google.com/api/appversion/create?app_id=hohalla8&ver...
> 500 Internal Server Error
>
> Server Error (500)
> A server error has occurred.

--~--~-~--~~~---~--~~
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 translate gives 302 move error

2009-04-13 Thread santa

I am getting Google translate gives 302 move error in my site.

How I recover it.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-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] Getting a Exception while Uploading an App...

2009-04-13 Thread Mujtaba

I am executing the following Command from command promp
d:\tools\server\appengine-java-sdk-1.2.0\bin\appcfg.cmd update d:\tools
\server\appengine-java-sdk-1.2.0\demos\helloworld\war

After it ask for an Email:

After then it generates the following Exception (obtained from the
log)
---
com.google.apphosting.utils.config.AppEngineConfigException: Received
IOException parsing the input stream for d:/tools/server/appengine-
java-sdk-1.2.0/demos/helloworld/war\WEB-INF/web.xml
at
com.google.apphosting.utils.config.AbstractConfigXmlReader.getTopLevelNode
(AbstractConfigXmlReader.java:198)
at com.google.apphosting.utils.config.AbstractConfigXmlReader.parse
(AbstractConfigXmlReader.java:216)
at com.google.apphosting.utils.config.WebXmlReader.processXml
(WebXmlReader.java:139)
at com.google.apphosting.utils.config.WebXmlReader.processXml
(WebXmlReader.java:22)
at
com.google.apphosting.utils.config.AbstractConfigXmlReader.readConfigXml
(AbstractConfigXmlReader.java:99)
at com.google.apphosting.utils.config.WebXmlReader.readWebXml
(WebXmlReader.java:70)
at com.google.appengine.tools.admin.Application.
(Application.java:74)
at com.google.appengine.tools.admin.Application.readApplication
(Application.java:94)
at com.google.appengine.tools.admin.AppCfg.(AppCfg.java:92)
at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:59)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient
(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity
(Unknown Source)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity
(Unknown Source)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity
(Unknown Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource
(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl
$DTDDriver.dispatch(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl
$DTDDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl
$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next
(Unknown Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument
(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse
(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse
(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl
$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.mortbay.xml.XmlParser.parse(XmlParser.java:230)
at
com.google.apphosting.utils.config.AbstractConfigXmlReader.getTopLevelNode
(AbstractConfigXmlReader.java:194)
... 9 more
---

Please Help Me To Resolve This Exception...

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

[google-appengine] Re: 500 Internal Server Error while deploying using eclipse

2009-04-13 Thread Sudeep Bhattarai
Hi,No. I gave up..It is just too frustrating.



On Mon, Apr 13, 2009 at 2:42 AM, kp  wrote:

>
> Any update on this issue, or did you get it figured out? I'm having
> the same problem that you are, and I can't figure out why it's
> happening.
>
> On Apr 11, 12:46 pm, "sud...@najanaja.com" 
> wrote:
> > I keep getting following error while deploying my java app. What could
> > be the reason?
> >
> > Unable to upload app: Error posting to URL:
> http://appengine.google.com/api/appversion/create?app_id=hohalla8&ver...
> > 500 Internal Server Error
> >
> > Server Error (500)
> > A server error has occurred.
> >
> > See the Eclipse error log for more details
> > Unable to upload app: Error posting to URL:
> http://appengine.google.com/api/appversion/create?app_id=hohalla8&ver...
> > 500 Internal Server Error
> >
> > Server Error (500)
> > A server error has occurred.
>
> >
>

--~--~-~--~~~---~--~~
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: 500 Internal Server Error while deploying using eclipse

2009-04-13 Thread Sudeep Bhattarai
And by the way, I was using google's tutorial to create and deploy app..no
fancy stuff

On Mon, Apr 13, 2009 at 11:54 AM, Sudeep Bhattarai wrote:

> Hi,No. I gave up..It is just too frustrating.
>
>
>
> On Mon, Apr 13, 2009 at 2:42 AM, kp  wrote:
>
>>
>> Any update on this issue, or did you get it figured out? I'm having
>> the same problem that you are, and I can't figure out why it's
>> happening.
>>
>> On Apr 11, 12:46 pm, "sud...@najanaja.com" 
>> wrote:
>> > I keep getting following error while deploying my java app. What could
>> > be the reason?
>> >
>> > Unable to upload app: Error posting to URL:
>> http://appengine.google.com/api/appversion/create?app_id=hohalla8&ver...
>> > 500 Internal Server Error
>> >
>> > Server Error (500)
>> > A server error has occurred.
>> >
>> > See the Eclipse error log for more details
>> > Unable to upload app: Error posting to URL:
>> http://appengine.google.com/api/appversion/create?app_id=hohalla8&ver...
>> > 500 Internal Server Error
>> >
>> > Server Error (500)
>> > A server error has occurred.
>>
>> >>
>>
>

--~--~-~--~~~---~--~~
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: SMS verification again?

2009-04-13 Thread Jeff S
Hi Marco,

What was the email address you were using? I'll look into this for you.

Thank you,

Jeff

On Fri, Apr 10, 2009 at 4:31 PM, Marco Borromeo wrote:

>
> Hello there,
>
> today, while creating a new application, i got a Sms verification
> request.
> I think this is strange, because i just validated my account, creating
> 3 applications.
>
> i was submitting a help request using the Sms problems form, but the
> submit process doesn't work (gives me back with a nonsense 'comment'
> error).
>
> Any GAE angel around here to check my account, or does anybody knows a
> communication method with GAE staff to solve my problem?
>
> thanks in advance for your help,
> marco.
>
> >
>

--~--~-~--~~~---~--~~
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: Transactions - Entity Groups

2009-04-13 Thread GMailingList

Yes, agree.  That is the right solution for deletion.  Thank you.

But what about creation of a new Game?  How can I guarantee that the
team1 and team2 are valid (still in the datastore) when I create a new
Game?

On Apr 13, 2:40 am, djidjadji  wrote:
> If a Team has a lot of Games you don't have enough time to delete them
> all in 30 seconds.
>
> You must use a method that always work, even in the event that the
> datastore is giving troubles or is in maintenance (no write or delete
> possible).
>
> What you could do is mark the Team as being deleted, add an extra
> field to the model.
> Give the operator feedback that the Team is successfully marked as
> deleted. Read the Team object back and check the deleted attribute.
>
> When you want to create a Game filter for teams not marked for delete.
>
> With a cron job:
>
> 1) Find a Team marked for delete.  markedTeam =
> Team.all().filter('deleted =',True).get()
> 2) Find Games for this Team, in team1 or team2 attribute, fetch at most 10 
> games
> 3) if Games found: delete Games
>    if no Games Found: delete Team
>
> This way you will eventually delete all the Games and the Team.
>
> 2009/4/13 GMailingList :
>
>
>
> > Ok maybe I don't absolutely need it to delete a team but what about...
>
> > 1) when I'm creating a new game - team1 or team2 could be deleted as
> > I'm creating a new game, then the game will have a team that does not
> > exist
>
> > OR
>
> > 2) for arguments sake, I need the deletion of a team (and all the
> > games it's in) to be atomic.  What you're suggesting can fail at
> > anywhere between 1 and 4.
>
> > On Apr 12, 4:35 pm, djidjadji  wrote:
> >> Start with answering the question: Do I need a transaction?
>
> >> I don't think you need it to delete a team.
>
> >> Every Team and every Game are root entities, no child objects.
>
> >> When you want to delete a Team
> >>    1) find all Games that have the Team in attribute team1
> >>    2) delete these Games, maybe delete in groups of 10 to 20 per request
> >>    3) find all Games that have the Team in attribute team2
> >>    4) delete these Games, maybe delete in groups of 10 to 20 per request
> >>    5) delete the Team object
>
> >> You can use the method from [1] to delete the Games
>
> >> [1]http://code.google.com/appengine/articles/update_schema.html
>
> >> 2009/4/13 ae :
>
> >> > Does anybody else find transactions very restricting?  How do I solve
> >> > this problem?  Here is my data model...
>
> >> > Team(db.Model):
> >> >  name = db.StringProperty()
>
> >> > Game(db.Model):
> >> >  team1 = db.ReferenceProperty(Team, collection_name='game1_set')
> >> >  team2 = db.ReferenceProperty(Team, collection_name='game2_set')
>
> >> > ... if I delete a team, I want to delete all the games associated with
> >> > it as well so I need to put the delete operation in a transaction.
> >> > But how would I setup the entity group?
>
> >> > setup 1) Team as parent of Game - but there can be only 1 parent and
> >> > team1 and team2 should both be parents - DOESN'T WORK
> >> > setup 2) Game as parent of Team - then that would mean each team can
> >> > only play 1 game?  DOESN'T WORK
> >> > setup 3) create a 3rd entity and let that be the parent of both Team
> >> > and Game - but then all teams and games would be in the same entity
> >> > group - is this my only option?
>
> >> > 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: Filesize limit?

2009-04-13 Thread Jeff S
Hello jago,

Konrad is right, you'll need a newer version of the SDK. The SDK checks the
file size before uploading, and older versions of the SDK will still think
the limit is 1MB.

Happy coding,

Jeff

On Sat, Apr 11, 2009 at 5:07 AM, Konrad Martin  wrote:

>
> Hi jago,
>
> Maybe. At least I succeded to upload a 4 MB zip of my my app engine
> patch media demo
> http://benchstat.appspot.com/fileHost/09/04/08/staticDemo.zip
> http://benchstat.appspot.com/fileHost/09/04/08/StaticDemo.jpg
> http://groups.google.com/group/app-engine-patch/msg/5f4842220dbe94de
> without difficulties.
>
>
> Perhaps you should update to the actual appEngine 1.2.0 and try again.
> Windows:
> http://googleappengine.googlecode.com/files/GoogleAppEngine_1.2.0.msi
> Linux:
> http://googleappengine.googlecode.com/files/google_appengine_1.2.0.zip
>
> Konrad
> >
>

--~--~-~--~~~---~--~~
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] Handle multi-byte url in GAE(让GAE支持中文URL处理)

2009-04-13 Thread keakon

If you know Chinese, you can visit my site for more detail:
http://www.keakon.cn/bbs/thread-1092-1-1.html

And for the rest, I'll give you a example, hope you can understand it.

BTW, all I talk about is in Python env.

1. Define app.yaml:

- url: .*  # NOTE: you need a wildcard to support multi-byte url
  script: main.py


2. Define a multi-byte url handler (handleMultibyteUrl.py):

from urllib import unquote

def handleMultibyteUrl(func):
  def handler(self, *paths):
if not paths: # no need to escape
  return func(self)

newPath = []

for path in paths: # if got several parameters, we should loop at
it
  unquotedPath = unquote(path)
  try:
path = unicode(unquotedPath, 'utf8')
  except:
try:
  path = unicode(unquotedPath, 'gbk')
except:
  try:
path = unicode(unquotedPath, 'big5')
  except:
try:
  path = unicode(unquotedPath, 'shiftjis')
except:
  try:
path = unicode(unquotedPath, 'korean')
  except:
pass
  newPath.append(path)
return func(self, *newPath)

  return handler


3. Define the url handler (main.py):

# -*- coding: utf-8 -*-

from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from handleMultibyteUrl import handleMultibyteUrl

class UrlHandler(webapp.RequestHandler):
  @handleMultibyteUrl  # NOTE: the only thing you need is add this
decorator to your url handler
  def get(self, path):
self.response.out.write(path)


class UrlHandler2(webapp.RequestHandler):
  @handleMultibyteUrl
  def get(self, path1, path2):
self.response.out.write(path1 + path2)

application = webapp.WSGIApplication([('/(.*)/(.*)', UrlHandler2), ('/
(.*)', UrlHandler)])

def main():
  run_wsgi_app(application)

if __name__ == "__main__":
  main()


OK, you can try these urls now:
http://localhost:8080/你好
http://localhost:8080/中国/欢迎你
--~--~-~--~~~---~--~~
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: Still waiting Java activation

2009-04-13 Thread keakon

I received it within one minute.

Maybe you are too late that there are already 1 Java pioneers now.

On 4月13日, 下午9时51分, Francois  wrote:
> I signed up for the Java access this WE, but didn't receive an email
> reply yet.
> Does anybody know how long is the wait?
--~--~-~--~~~---~--~~
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 set Current User in code?

2009-04-13 Thread Jeff S
Hi slatvick,

Could we see the class declaration for Player? It seems like user should be
set to a db.UserProperty.

Thank you,

Jeff

2009/4/11 slatvick 

>
> thanks guys.
>
> I do:
> os.environ['USER_EMAIL'] = "t...@example.com"
> user = users.get_current_user()
>
> and even user.nickname returns right string.
>
> BUT, when i want to create connected data in model it does not work.
> Creating model:
> ..
> player = Player(user=users.get_current_user(), ...) # <<- wrong right
> here
> player.put()
> ..
>
> it returns:
> Traceback (most recent call last):
>  File "/base/python_lib/versions/1/google/appengine/ext/webapp/
> __init__.py", line 501, in
>  __call__
>handler.get(*groups)
>  File "/base/data/home/apps/gpsball/1.332716226397017546/
> helloworld.py", line 272, in get
>player = game.Player()
>  File "/base/data/home/apps/gpsball/1.332716226397017546/
> helloworld.py", line 23, in Play
> er
>player = Player(user=users.get_current_user(), ... )
>  File "/base/python_lib/versions/1/google/appengine/ext/db/
> __init__.py", line 596, in __i
> nit__
>prop.__set__(self, value)
>  File "/base/python_lib/versions/1/google/appengine/ext/db/
> __init__.py", line 396, in __s
> et__
>value = self.validate(value)
>  File "/base/python_lib/versions/1/google/appengine/ext/db/
> __init__.py", line 2305, in va
> lidate
>value = super(UserProperty, self).validate(value)
>  File "/base/python_lib/versions/1/google/appengine/ext/db/
> __init__.py", line 423, in val
> idate
>raise BadValueError('Property %s is required' % self.name)
> BadValueError: Property user is required
> 
>
> What's wrong? is this way logining not fully?
>
> On Apr 10, 2:56 pm, Alkis Evlogimenos ('Αλκης Ευλογημένος)
>  wrote:
> > I switched to using this decorator for my test methods using webtest:
> > from nose.tools import make_decorator
> >
> > def credentials(user=False, admin=False):
> >   def _decorator(func):
> > def _wrapper(*args, **kwds):
> >   old_user = os.environ.get('USER_EMAIL', '')
> >   old_admin = os.environ.get('USER_IS_ADMIN', '0')
> >
> >   if user or admin:
> > os.environ['USER_EMAIL'] = 'u...@test.com'
> >   else:
> > os.environ['USER_EMAIL'] = ''
> >
> >   if admin:
> > os.environ['USER_IS_ADMIN'] = '1'
> >   else:
> > os.environ['USER_IS_ADMIN'] = '0'
> >
> >   try:
> > func(*args, **kwds)
> >   finally:
> > os.environ['USER_EMAIL'] = old_user
> > os.environ['USER_IS_ADMIN'] = old_admin
> >
> > _wrapper = make_decorator(func)(_wrapper)
> > return _wrapper
> >   return _decorator
> >
> > Usage is:
> >
> > class MyTest(unittest.TestCase):
> >   def setUp(self):
> > self.app = ... make your app here using webtest or any other
> webtesting
> > framework
> >
> >   @credentials
> >   def testIndexPublic(self):
> > response = self.app.get('/')
> > self.assertTrue('some string only found when noone has logged in' in
> > response)
> >
> >   @credentials(user=True)
> >   def testIndexUser(self):
> > response = self.app.get('/')
> > self.assertTrue('some string only found in user logged in rendering'
> in
> > response)
> >
> >   @credentials(admin=True)
> >   def testIndexAdmin(self):
> > response = self.app.get('/')
> > self.assertTrue('some string only found in admin rendering' in
> response)
> >
> > I hope this helps.
> >
> >
> >
> > On Fri, Apr 10, 2009 at 12:30 PM, slatvick  wrote:
> >
> > > Mahmoud:
> > > Thanks, but this method does not do loging as the standard login form
> > > does.
> > > I already have data connected to "t...@example.com"-user in my model
> > > and this:
> > > os.environ['USER_EMAIL'] ="t...@example.com"
> > > does not logins properly, but redirects to the login-form.
> >
> > > Alkis Evlogimenos:
> > > Sorry, but where is "env" contains? Because i have "global name 'env'
> > > is not defined" and cannot find in docs.
> > > thanks in advance.
> >
> > --
> >
> > Alkis
> >
>

--~--~-~--~~~---~--~~
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] Timeout: datastore timeout: operation took too long.

2009-04-13 Thread Ray Malone

I'm not sure why this occurs all of a sudden.  The same job runs in
600ms.Then once in a while this runs over 6800 MS and times out.
I can't have jobs just timeout for no reason.According to my logs
during this time the only other request was a second prior.  This
occurred at 04-13 09:13AM 29.627 today and other times at random in
the last few days.


--~--~-~--~~~---~--~~
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: Cron Job and DeadlineExceededError

2009-04-13 Thread Wooble

The request deadline is actually 30 seconds now, but yeah, as far as I
can tell cron jobs are just intended to free you from needing a cron
job on your own machine to hit a URL with wget or whatever
periodically.

Long-running processes are probably what you're looking for; hopefully
we'll see them soon.

In the meantime, the remote API might be the best solution for big
database cleanup jobs.

On Apr 12, 11:41 pm, jorge  wrote:
> I guess I probably misunderstood and thought that cron jobs weren't
> subject to the same 10 second request deadline for HTTP requests?  I'm
> trying to run a cron job that sends out a mailer.  Unfortunately, it's
> taking longer than 10 seconds so the job will fail about halfway
> through.  I guess I could rewrite it to only do batches at a time.
> The means extra tables in my database to keep track of who has been
> mailed, etc.  Not a big deal, I guess.  It just seems that this
> restriction makes cron jobs fairly limited in what they can do.  A
> database cleanup job, for example, is going to take longer and longer
> as tables grow and will almost certainly always hit this limit, and
> create a situation where the cron scripts will have to be rewritten
> and additional tables written to manage intermediate state, etc.
>
> Is the intent that the cron jobs will remain subject to the same
> restrictions as other requests?
--~--~-~--~~~---~--~~
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: I have trouble to visite my account

2009-04-13 Thread Jeff S
You account should be working now. Please let me know if you are still
having issues.

Happy coding,

Jeff

On Fri, Apr 10, 2009 at 6:40 PM, haven'tsixer  wrote:

>
> Sorry to interrupt
> I apply to try the java app engine yestoday and I have recieved the no-
> reply message note me to try it now,but when I try to login the app
> engine it shows below:
>
> "Server Error
> A server error has occurred.
>
> Return to Applications screen »"
>
> it seems to be there is an internal error happened,so I reporter the
> problem here.
>
> account is:wormlu...@gmail.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-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: Limit on the number of applications

2009-04-13 Thread Wooble

And your customers will *love* you when Google deletes all of their
data along with your apps for violating the terms of use...

On Apr 13, 9:37 am, gabriel munteanu  wrote:
> i think you should do these 10 apps for yourself and every friend you
> have with a google account [you + 3 friends = 40 apps].
> i won't bet that they will increase this number any time soon.
>
> jgabios
>
> On Mon, Apr 13, 2009 at 3:44 PM, Jeremiah Elliott
>
>
>
>  wrote:
>
> > Hello All -
> > I am doing some research for a project that I have coming up and have
> > a few questions that I have not been able to find by searching the
> > group. This will be my first AppEngine application, so sorry if this
> > is a dumb question. The project is going to be a SASS model
> > application where our customers will have a web application that we
> > write made available to them. While I realize that I could have a
> > customer id in every object stored in the data store and write
> > business logic to verify that each customer sees only their data, I
> > would rather have each customer have their own complete appengine
> > application with their own tables that are totally separate. If I put
> > all customers in one application, i will not be able to upgrade the
> > application per-customer, but rather all at once.  Currently I only
> > have available 10 applications when I sign in.  The other advantage of
> > having all customers in their own application instance is that we will
> > know exactly what the resources for a given customer is every month.
>
> > I am hoping that Google increases the number of available applications
> > as i use them. So when I utilize my 9th applicaiton, it shows that I
> > actually have 20 or something like that. I have not found any thing on
> > the web that would give me any indication one way or the other if this
> > is the case, so I am assuming that it isn't.
>
> > If having more than 10 applications is simply not an option, are there
> > any good workarounds from a data store point of view? Anything like
> > schemas in most relational databases?
>
> > Has anyone asked google to increase this limit? If so how did that
> > work out?
>
> --
> jgabioshttp://bash.editia.info
--~--~-~--~~~---~--~~
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] Dynamically generated templates

2009-04-13 Thread adelevie

Hi. I'm trying to build an a simple CRUD admin section of my
application. Basically, for a given Model, I want to have a template
loop through the model's attributes into a simple table (once I do
this, I can actually implement the CRUD part). A possible way to
accomplish this is to dynamically generate a template with all the
necessary template tags specific to that model.

Pseudocode:
def generate_tamplate(model):
 template.write("")
 template.write("")
 for attribute in model:
  template.write("%s" % attribute)
 template.write("")
 template.write("")
 for attribute in model:
  template.write("{{ %s.%s }}" % model.attribute)
 template.write("")
 template.write("")

Generating the proper text should not be difficult. I can follow my
pseudocode model and do it Python. Two things im wondering:
1) Can I do this instead using Django's templating language? that is,
use a template to generate a template
2) Once I generate the text, how can I wrote that to a file that
webapp's template loader can access?

I remember a while back seeing something about loading template from
the database. Is this possible with GAE?

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: 1st application - HELP needed

2009-04-13 Thread Jeff S
Hi Vikram,

It could be that none of the servlets to handle requests are mapped to
handle a request to the root URL of your application (/). Could we see your
web.xml file?

For example, see:

http://code.google.com/appengine/docs/java/gettingstarted/creating.html

Thank you,

Jeff

On Sat, Apr 11, 2009 at 3:18 AM, pumplove  wrote:

>
> Hi,
>I have created a simple application and uploaded it to the app
> engine and though i have given the app a unique Id (nostalgia-
> register.appspot.com) whenever i click on the link it tells me the url
> is invalid. Do i need a domain name ? becuase this is what is given in
> the docs " You can now see your application running on App Engine. If
> you set up a free appspot.com domain name, the URL for your website
> begins with your application ID:
> http://application-id.appspot.com "
>
> so ideally is shud have been able to access it ...any help on this
> would be greatly appreciated.
>
> Regards,
> Vikram
> PS: pls 4give my illiteracy about domain names et all
>
> >
>

--~--~-~--~~~---~--~~
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: App Engine Security

2009-04-13 Thread Jeff S
Hi vw,

What are some of the specific certifications you are interested in? What
would be most helpful?

Thank you,

Jeff

On Fri, Apr 10, 2009 at 3:38 PM, vij...@gmail.com  wrote:

>
> Hi
>
> I am very interested in the app engine and the cloud computing
> approach. However, I have a question regarding Google data centre
> security.
>
> I work in the insurance / financial services sector and when I have to
> pitch solutions to clients, often managers, especially ones who are
> not very technical, ask about the security at the data centre. They
> wouldn't know or probably even care or understand the answers;
> however, they look at industry certifications.
>
> Basically, I need to name-drop certifications in lieu of technical
> talk. I was wondering which certifications of the google data centres
> I could talk about.
>
> Thanks
>
> Regards
>
> vw
>
>
> >
>

--~--~-~--~~~---~--~~
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] Your application is exceeding a quota: Workflow Backend Index Task Count

2009-04-13 Thread Paul Kinlan
Hi,

I am just curious as to what the following message in the dashboard means:
Your application is exceeding a quota: Workflow Backend Index Task Count?

It doesn't appear to be affecting my app. Today I have vacuumed my indexes
(twice as I noticed that one index was had an "=" in the one of the property
names) and I have also added another index.

Paul

--~--~-~--~~~---~--~~
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: Integrating Google Application Engine with Google Maps

2009-04-13 Thread JDT

Kernja,

Here's a possible option, but it uses ajax on the client side, rather
than a direct interface to GAE:

Use the Google Maps API with ajax?
http://code.google.com/apis/maps/documentation/services.html#Directions

It looks like you can access the polyline data fairly easily.

This would involve you doing three ajax transactions:
Get the client to access the polyline data, pass it back to your app,
return the points of interest?

Just a thought, although I admit that it lacks elegance.

David

On Apr 12, 3:32 am, kernja  wrote:
> Hello,
>
> I just have a question on whether or not this is possible; I would
> like to make an application with Google Application Engine that allows
> a user to enter in a destination and ending point, have it generate a
> map, and show landmarks within a certain vicinity of the route.
>
> Now, I know how to go about finding areas within a certain route; I
> have GPs data and can sort through it by region.  The only problem I
> have is generating an actual route to go through!  I have no idea - if
> it is even possible that is - to interface the Google Maps route
> generation interface through Google Application Engine.
>
> I found webservices online that can generate a route, but it gives
> step-by-step directions.  I like how Google Maps - through the Geopoly
> (line?)- gives you points instead of street-wise direction (e.g, go
> left after 10 miles).
--~--~-~--~~~---~--~~
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: What does Model.to_xml() returns?

2009-04-13 Thread Marcelo de Sena Lacerda
Yes, I needed to set the headers. Thanks!
However I still don't know what should I do to convert the exit of to_xml()
from the model class into something useful. Any ideas?

On Tue, Mar 24, 2009 at 10:41 AM, Gijsbert wrote:

>
> You could use Live HTTP Headers in Firefox (for instance) to make sure
> that the browser is getting valid data.
> Maybe you need to set the content-type of the response to 'text/xml'
> for the browser to initialize responseXML:
>
>  self.response.headers['Content-Type'] = 'text/xml'
>
> On Mar 23, 11:10 am, Marcelo Sena  wrote:
> > So I tried a more direct approach to this problem:
> >
> > function stateChanged()
> > {
> > if (xmlHttp.readyState==4)
> > {
> > if (xmlHttp.responseXML==null)alert("Null");
> > var xmlDoc=xmlHttp.responseXML.documentElement;
> > document.getElementById("companyname").innerHTML=
> > xmlDoc.getElementsByTagName("compname")[0].childNodes[0].nodeValue;
> > document.getElementById("contactname").innerHTML=
> > xmlDoc.getElementsByTagName("contname")[0].childNodes[0].nodeValue;
> > document.getElementById("address").innerHTML=
> > xmlDoc.getElementsByTagName("address")[0].childNodes[0].nodeValue;
> > document.getElementById("city").innerHTML=
> > xmlDoc.getElementsByTagName("city")[0].childNodes[0].nodeValue;
> > document.getElementById("country").innerHTML=
> > xmlDoc.getElementsByTagName("country")[0].childNodes[0].nodeValue;
> >
> > }
> > }
> >
> > The responseXML is always null so the line after the alert box always
> > crashes.
> >
> > Here is the response handler I'm using:
> >
> > class getANote(webapp.RequestHandler):
> > def get(self):
> > #query=Models.NoteModel.all()
> > #fnote=query.get()
> >
> > self.response.out.write(''' > encoding='ISO-8859-1'?>
> > 
> > Foo
> > bar
> > ball
> > bwal
> > XD
> > 
> > ''')
> >
> > The xml is said well formatted using w3c validator. Now what I'm doing
> > wrong, is this a app engine error? Help please!
> >
> > On Mar 20, 9:53 pm, Marcelo Sena  wrote:
> >
> > > Here is my model:
> > > class NoteModel(db.Model):
> > > title = db.StringProperty(multiline=False)
> > > content = db.ListProperty(type('string'))
> > > And the values are:
> > > title:'Foo'
> > > content: ['bar']
> >
> > > And the result of:
> >
> > > class getANote(webapp.RequestHandler):
> > > def get(self):
> > > query=Models.NoteModel.all()
> > > fnote=query.get()
> > > xmlrep=fnote.to_xml()
> >
> > > self.response.out.write(xmlrep)
> >
> > > called from:
> >
> > > function stateChanged()
> > > {
> > > if (xmlHttp.readyState==4)
> > > {
> > > var xmlDoc=xmlHttp.responseXML;
> > > document.getElementById("txtHint").innerHTML=xmlDoc;
> >
> > > }
> >
> > > }
> >
> > > But the result is:
> >
> > > Exactly, nothing. What am I doing wrong?
> >
> > > On Mar 20, 4:25 pm, Marcelo Sena  wrote:
> >
> > > > I know what the docs say, but what kind of xml is that, is a string
> or
> > > > a object and what is the type of that object? I tried  using type()
> on
> > > > it and it returned nothing.
> > > > I need to turn my model into a XML to use it in a javascript.
> > > > Regards,
> > > > Marcelo Sena.
> >
> >
> >
>


-- 
Marcelo Sena

--~--~-~--~~~---~--~~
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: Limit on the number of applications

2009-04-13 Thread Jeremiah Elliott
The TOS will only be violated if the purpose of using multiple accounts is
to get around paying. We full expect to pay for every application we have.
Why would google delete an account that is paying them money every month?
If, however, I had an application that cross-talked between applications and
did so in a manner that completely eliminated the need to pay, then I could
see google not liking that. This application will have no data being shared
between applications. Therefor, will not be in violation of the TOS.

---Jeremiah


On Mon, Apr 13, 2009 at 12:59 PM, Wooble  wrote:

>
> And your customers will *love* you when Google deletes all of their
> data along with your apps for violating the terms of use...
>
> On Apr 13, 9:37 am, gabriel munteanu  wrote:
> > i think you should do these 10 apps for yourself and every friend you
> > have with a google account [you + 3 friends = 40 apps].
> > i won't bet that they will increase this number any time soon.
> >
> > jgabios
> >
> > On Mon, Apr 13, 2009 at 3:44 PM, Jeremiah Elliott
> >
> >
> >
> >  wrote:
> >
> > > Hello All -
> > > I am doing some research for a project that I have coming up and have
> > > a few questions that I have not been able to find by searching the
> > > group. This will be my first AppEngine application, so sorry if this
> > > is a dumb question. The project is going to be a SASS model
> > > application where our customers will have a web application that we
> > > write made available to them. While I realize that I could have a
> > > customer id in every object stored in the data store and write
> > > business logic to verify that each customer sees only their data, I
> > > would rather have each customer have their own complete appengine
> > > application with their own tables that are totally separate. If I put
> > > all customers in one application, i will not be able to upgrade the
> > > application per-customer, but rather all at once.  Currently I only
> > > have available 10 applications when I sign in.  The other advantage of
> > > having all customers in their own application instance is that we will
> > > know exactly what the resources for a given customer is every month.
> >
> > > I am hoping that Google increases the number of available applications
> > > as i use them. So when I utilize my 9th applicaiton, it shows that I
> > > actually have 20 or something like that. I have not found any thing on
> > > the web that would give me any indication one way or the other if this
> > > is the case, so I am assuming that it isn't.
> >
> > > If having more than 10 applications is simply not an option, are there
> > > any good workarounds from a data store point of view? Anything like
> > > schemas in most relational databases?
> >
> > > Has anyone asked google to increase this limit? If so how did that
> > > work out?
> >
> > --
> > jgabioshttp://bash.editia.info
> >
>

--~--~-~--~~~---~--~~
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: 500 Internal Server Error while deploying using eclipse

2009-04-13 Thread kp

I agree, this is very frustrating. This happens on both my gmail
account, and my google apps domain account. Here is the Eclipse error
log, if anybody else has any ideas (app id removed):

Unable to upload app: Error posting to URL:
http://appengine.google.com/api/appversion/clonefiles?app_id=(myappid)&version=1&
500 Internal Server Error
Server Error (500)
A server error has occurred.

at com.google.appengine.tools.admin.AppAdminImpl.update
(AppAdminImpl.java:47)
at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy
(AppEngineBridgeImpl.java:203)
at
com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace
(DeployProjectJob.java:97)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run
(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Caused by: java.io.IOException: Error posting to URL:
http://appengine.google.com/api/appversion/clonefiles?app_id=(myappid)&version=1&
500 Internal Server Error
Server Error (500)
A server error has occurred.

at com.google.appengine.tools.admin.ServerConnection.send
(ServerConnection.java:114)
at com.google.appengine.tools.admin.ServerConnection.post
(ServerConnection.java:66)
at com.google.appengine.tools.admin.AppVersionUpload.send
(AppVersionUpload.java:345)
at com.google.appengine.tools.admin.AppVersionUpload.cloneFiles
(AppVersionUpload.java:211)
at com.google.appengine.tools.admin.AppVersionUpload.beginTransaction
(AppVersionUpload.java:174)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload
(AppVersionUpload.java:68)
at com.google.appengine.tools.admin.AppAdminImpl.update
(AppAdminImpl.java:41)

On Apr 13, 11:55 am, Sudeep Bhattarai  wrote:
> And by the way, I was using google's tutorial to create and deploy app..no
> fancy stuff
>
> On Mon, Apr 13, 2009 at 11:54 AM, Sudeep Bhattarai wrote:
>
> > Hi,No. I gave up..It is just too frustrating.
>
> > On Mon, Apr 13, 2009 at 2:42 AM, kp  wrote:
>
> >> Any update on this issue, or did you get it figured out? I'm having
> >> the same problem that you are, and I can't figure out why it's
> >> happening.
>
> >> On Apr 11, 12:46 pm, "sud...@najanaja.com" 
> >> wrote:
> >> > I keep getting following error while deploying my java app. What could
> >> > be the reason?
>
> >> > Unable to upload app: Error posting to URL:
> >>http://appengine.google.com/api/appversion/create?app_id=hohalla8&ver...
> >> > 500 Internal Server Error
>
> >> > Server Error (500)
> >> > A server error has occurred.
>
> >> > See the Eclipse error log for more details
> >> > Unable to upload app: Error posting to URL:
> >>http://appengine.google.com/api/appversion/create?app_id=hohalla8&ver...
> >> > 500 Internal Server Error
>
> >> > Server Error (500)
> >> > A server error has occurred.
--~--~-~--~~~---~--~~
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: Integrating Google Application Engine with Google Maps

2009-04-13 Thread adelevie

I'm working on a bus tracking application for mobile phones that uses
Google's Static Maps api. Let me know if there's any functionality of
my site that you think I could help you replicate on yours.

On Apr 13, 2:51 pm, JDT  wrote:
> Kernja,
>
> Here's a possible option, but it uses ajax on the client side, rather
> than a direct interface to GAE:
>
> Use the Google Maps API with 
> ajax?http://code.google.com/apis/maps/documentation/services.html#Directions
>
> It looks like you can access the polyline data fairly easily.
>
> This would involve you doing three ajax transactions:
> Get the client to access the polyline data, pass it back to your app,
> return the points of interest?
>
> Just a thought, although I admit that it lacks elegance.
>
> David
>
> On Apr 12, 3:32 am, kernja  wrote:
>
> > Hello,
>
> > I just have a question on whether or not this is possible; I would
> > like to make an application with Google Application Engine that allows
> > a user to enter in a destination and ending point, have it generate a
> > map, and show landmarks within a certain vicinity of the route.
>
> > Now, I know how to go about finding areas within a certain route; I
> > have GPs data and can sort through it by region.  The only problem I
> > have is generating an actual route to go through!  I have no idea - if
> > it is even possible that is - to interface the Google Maps route
> > generation interface through Google Application Engine.
>
> > I found webservices online that can generate a route, but it gives
> > step-by-step directions.  I like how Google Maps - through the Geopoly
> > (line?)- gives you points instead of street-wise direction (e.g, go
> > left after 10 miles).
--~--~-~--~~~---~--~~
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 set Current User in code?

2009-04-13 Thread slatvick

Yeah, sure.  How to set it?

On Apr 13, 8:31 pm, Jeff S  wrote:
> Hi slatvick,
>
> Could we see the class declaration for Player? It seems like user should be
> set to a db.UserProperty.
>
> Thank you,
>
> Jeff
>
> 2009/4/11 slatvick 
>
>
>
> > thanks guys.
>
> > I do:
> > os.environ['USER_EMAIL'] = "t...@example.com"
> > user = users.get_current_user()
>
> > and even user.nickname returns right string.
>
> > BUT, when i want to create connected data in model it does not work.
> > Creating model:
> > ..
> > player = Player(user=users.get_current_user(), ...) # <<- wrong right
> > here
> > player.put()
> > ..
>
> > it returns:
> > Traceback (most recent call last):
> >  File "/base/python_lib/versions/1/google/appengine/ext/webapp/
> > __init__.py", line 501, in
> >  __call__
> >    handler.get(*groups)
> >  File "/base/data/home/apps/gpsball/1.332716226397017546/
> > helloworld.py", line 272, in get
> >    player = game.Player()
> >  File "/base/data/home/apps/gpsball/1.332716226397017546/
> > helloworld.py", line 23, in Play
> > er
> >    player = Player(user=users.get_current_user(), ... )
> >  File "/base/python_lib/versions/1/google/appengine/ext/db/
> > __init__.py", line 596, in __i
> > nit__
> >    prop.__set__(self, value)
> >  File "/base/python_lib/versions/1/google/appengine/ext/db/
> > __init__.py", line 396, in __s
> > et__
> >    value = self.validate(value)
> >  File "/base/python_lib/versions/1/google/appengine/ext/db/
> > __init__.py", line 2305, in va
> > lidate
> >    value = super(UserProperty, self).validate(value)
> >  File "/base/python_lib/versions/1/google/appengine/ext/db/
> > __init__.py", line 423, in val
> > idate
> >    raise BadValueError('Property %s is required' % self.name)
> > BadValueError: Property user is required
> > 
>
> > What's wrong? is this way logining not fully?
>
> > On Apr 10, 2:56 pm, Alkis Evlogimenos ('Αλκης Ευλογημένος)
> >  wrote:
> > > I switched to using this decorator for my test methods using webtest:
> > > from nose.tools import make_decorator
>
> > > def credentials(user=False, admin=False):
> > >   def _decorator(func):
> > >     def _wrapper(*args, **kwds):
> > >       old_user = os.environ.get('USER_EMAIL', '')
> > >       old_admin = os.environ.get('USER_IS_ADMIN', '0')
>
> > >       if user or admin:
> > >         os.environ['USER_EMAIL'] = 'u...@test.com'
> > >       else:
> > >         os.environ['USER_EMAIL'] = ''
>
> > >       if admin:
> > >         os.environ['USER_IS_ADMIN'] = '1'
> > >       else:
> > >         os.environ['USER_IS_ADMIN'] = '0'
>
> > >       try:
> > >         func(*args, **kwds)
> > >       finally:
> > >         os.environ['USER_EMAIL'] = old_user
> > >         os.environ['USER_IS_ADMIN'] = old_admin
>
> > >     _wrapper = make_decorator(func)(_wrapper)
> > >     return _wrapper
> > >   return _decorator
>
> > > Usage is:
>
> > > class MyTest(unittest.TestCase):
> > >   def setUp(self):
> > >     self.app = ... make your app here using webtest or any other
> > webtesting
> > > framework
>
> > >   @credentials
> > >   def testIndexPublic(self):
> > >     response = self.app.get('/')
> > >     self.assertTrue('some string only found when noone has logged in' in
> > > response)
>
> > >   @credentials(user=True)
> > >   def testIndexUser(self):
> > >     response = self.app.get('/')
> > >     self.assertTrue('some string only found in user logged in rendering'
> > in
> > > response)
>
> > >   @credentials(admin=True)
> > >   def testIndexAdmin(self):
> > >     response = self.app.get('/')
> > >     self.assertTrue('some string only found in admin rendering' in
> > response)
>
> > > I hope this helps.
>
> > > On Fri, Apr 10, 2009 at 12:30 PM, slatvick  wrote:
>
> > > > Mahmoud:
> > > > Thanks, but this method does not do loging as the standard login form
> > > > does.
> > > > I already have data connected to "t...@example.com"-user in my model
> > > > and this:
> > > > os.environ['USER_EMAIL'] ="t...@example.com"
> > > > does not logins properly, but redirects to the login-form.
>
> > > > Alkis Evlogimenos:
> > > > Sorry, but where is "env" contains? Because i have "global name 'env'
> > > > is not defined" and cannot find in docs.
> > > > thanks in advance.
>
> > > --
>
> > > Alkis
>
>
--~--~-~--~~~---~--~~
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: GAE inter-apps communication

2009-04-13 Thread Josh Steiner

I'm not so certain that this means that the idea he describes is
against the TOS.  I put the emphasis on "intended to avoid incurring
fees", which is not what he's talking about.

In fact, this exact idea was discussed at the GAE/Cloud Computing
Meetup in Palo Alto last month which had several of the core GAE team
members in attendance.  It was proposed as a valid solution to have
one backend REST app server 3 different world facing web apps.

It would be good to see some clarification from Google on this point.

-Josh

2009/4/13 风笑雪 :
> It's here:
> http://code.google.com/appengine/terms.html
>
> 4. Fees for Use of the Service
>
> 4.4. You may not develop multiple Applications to simulate or act as a
> single Application or otherwise access the Service in a manner intended to
> avoid incurring fees.
> 2009/4/12 DarkCoiote 
>>
>> Humm.. Didn't remember that, and with a quick (really quick) look
>> didn't find that too...
>>
>> But that make sense, as It would be a way to 'bypass' the quotas and a
>> way to do bad things (dos)...and other evil stuff too! lol
>>
>> But then, with an application like I said - central database, to use
>> for score, person info,
>> 'virtual currency',etc  - what would you suggest to do?
>>
>> Thanks!
>> On Apr 11, 1:15 pm, 风笑雪  wrote:
>> > There is a policy of GAE that you CAN NOT use an app to support another
>> > app.
>> >
>> > 2009/4/11 DarkCoiote 
>> >
>> >
>> >
>> > > I thinking about creating a couple of applications that have a common
>> > > data-base.
>> > > As I'm pretty new at this stuff, I don't have many ideas.
>> >
>> > > One possible solution would be:
>> >
>> > > create the applications A,B,C
>> > > create an master app. D that controls the central database:
>> >
>> > > Then, apps A,B,C would query app D to use the database  (get, post,
>> > > put)
>> >
>> > > For D I guess an REST solution would be fine (although I don't even
>> > > know for sure what
>> > > REST is), then A,B,C would use the D REST api.
>> >
>> > > As the database should not be public, some kind of authentication must
>> > > be done to
>> > > ensure that D processes only requests from A,B,C (no idea on how to do
>> > > this, except from
>> > > the stupid method of sending a large known (to A,B,C,D) random string
>> > > as a parameter)
>> >
>> > > Other alternatives to REST would be SOA and RPC, right? from what I've
>> > > just read about
>> > > these architecture REST would be the best one
>> >
>> > > Useful linkI found around:
>> > >http://code.google.com/p/appengine-rest-server/
>> >
>> > > Any suggestion will be appreciated !
>> >
>> > > 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: would multiple filters in a single query on the *same* StringListProperty result in an exploding index

2009-04-13 Thread Jeff S
Hi S. Sriram,

Great question. For the query that you've listed above, no, exploding
indexes should not be a problem. Since you are using = filters, the query
can be done using single property indexes and merge join (which is handled
for you). Note that if the data is too sparse (too many rows scanned without
finding results), the merge-join query may quit and instruct you to use a
custom index instead.

http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html#Defining_Indexes_With_Configuration

This specific query would not require it's own composite index. However, if
this query also had an oder clause or an inequality filter, a composite
index would be required. In a composite index, multiple equality filters on
the same property require multiple columns in the index for the property (so
"words=1, words=3, words=5" will match a single row), and therefore the
index will explode.
Thank you,

Jeff

On Sat, Apr 11, 2009 at 12:21 PM, molicule  wrote:

>
> Hi,
>
> If I have
>
> class MyModel(db.Model):
> field1 = db.StringProperty()
> field2 = db.StringProperty()
> ..
> words = db.StringListProperty()
>
> and one of the rows has
> field1 = "f1"
> field2" = "f2"
> words =["list", "with", "five", "hundred", "words"]
>
> and query (a)
> query = MyModel.all().filter("field1 =", "f1").filter("field2 =",
> "f2").filter("words =", "with").filter("words =", "five").filter
> ("words =", "words").fetch(10)
> which should return the row above
>
> or query (b)
> query = MyModel.all().filter("field1 =", "f1").filter("field2 =",
> "f2").filter("words =", "with").filter("words =", "five").filter
> ("words =", "notinlist").fetch(10)
> which should return no rows.
>
> Would such a query result in an "exploding index" ?
>
>
> Thanks
> S. Sriram
> >
>

--~--~-~--~~~---~--~~
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: Fastest way to upload huge data on GAE

2009-04-13 Thread Josh Steiner

So lets see, I need to import 12 million records...

83.33 days to import.

On the latest GAE blog posting it says:

"Database import: move GBs of data easily into your App Engine app.
Matching export capabilities are coming soon, hopefully within a
month."

Clearly this is going to have to be something other than bulkloader.py
, anyone have any more info on this new capability?

-josh

On Sun, Apr 12, 2009 at 5:26 AM, 风笑雪  wrote:
> You should do it this way:
> http://code.google.com/appengine/docs/python/tools/uploadingdata.html
> It will take about 1 second to insert 100 records, so I think 4000+ record
> will be uploaded in 1 minute.
>
> 2009/4/12 sevenstar 
>>
>> hi all,
>> I have some 4000+ records to be uploaded on the appengine.
>> Does GAE allow to upload so much data, if yes then i have some
>> questions?
>> 1) How to upload that data?
>> 2) How much time will it take to complete this thing?
>> 3) What is the fastest method to upload it.
>>
>> Please reply ASAP. I have been reading about it but couldn't find a
>> solution.
>>
>
>
> >
>

--~--~-~--~~~---~--~~
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: Fastest way to upload huge data on GAE

2009-04-13 Thread 'Αλκης Ευλογημένος
If you are using bulkloader you might want to tune some flags from:

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

The particular ones that might interest you are:

--num_threads
--batch_size
--bandwidth_limit
--rps_limit
--http_limit

Running with the defaults will probably lead to really slow uploads
especially with very small entities that can be batched 1000 at a time. That
would give you a 100x speedup right off the bat.

2009/4/13 Josh Steiner 

>
> So lets see, I need to import 12 million records...
>
> 83.33 days to import.
>
> On the latest GAE blog posting it says:
>
> "Database import: move GBs of data easily into your App Engine app.
> Matching export capabilities are coming soon, hopefully within a
> month."
>
> Clearly this is going to have to be something other than bulkloader.py
> , anyone have any more info on this new capability?
>
> -josh
>
> On Sun, Apr 12, 2009 at 5:26 AM, 风笑雪  wrote:
> > You should do it this way:
> > http://code.google.com/appengine/docs/python/tools/uploadingdata.html
> > It will take about 1 second to insert 100 records, so I think 4000+
> record
> > will be uploaded in 1 minute.
> >
> > 2009/4/12 sevenstar 
> >>
> >> hi all,
> >> I have some 4000+ records to be uploaded on the appengine.
> >> Does GAE allow to upload so much data, if yes then i have some
> >> questions?
> >> 1) How to upload that data?
> >> 2) How much time will it take to complete this thing?
> >> 3) What is the fastest method to upload it.
> >>
> >> Please reply ASAP. I have been reading about it but couldn't find a
> >> solution.
> >>
> >
> >
> > >
> >
>
> >
>


-- 

Alkis

--~--~-~--~~~---~--~~
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: DuplicatePropertyError in google-app-engine-django sample

2009-04-13 Thread theillustratedlife

Try killing your local datastore.  Sometimes it gets corrupted and
these sort of errors come up.
--~--~-~--~~~---~--~~
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: Odd problem with urlfetch from picasa servers

2009-04-13 Thread Jeff S
Hi Ken,

Yes the Picasa Web Albums Data API allows you to display thumbnails of your
images in a web page, whether that page happens to be on App Engine or not.
It seems like this should be doable, the thumbnail size may need to be
specified in the img URL.

Happy coding,

Jeff

On Sun, Apr 12, 2009 at 9:26 AM, notcourage  wrote:

>
> Jeff, thx for answering.
>
> I can research the upload method you suggest. However, if I cannot
> access the uploaded images (thumb & underlying) later to display it in
> my appengine app, there's no point. It would be helpful if you told us
> whether the photo API allows this. Thx. -Ken
>
> On Mar 25, 11:29 am, Jeff S  wrote:
> > On Mar 22, 4:10 pm, notcourage  wrote:
> >
> > > Did you ever find the solution?
> >
> > > Is photo.media.thumbnail[1].url the URL for the actual image? Or a
> > > page containing it?
> >
> > Great question, it would help if we could see URL being requested. The
> > reason I most often see for not being able to retrieve an image is
> > that the imgmax parameter is not being included.
> >
> > http://code.google.com/apis/picasaweb/faq.html#embed_image
> >
> >
> >
> > > I don't understand how to upload an image topicasasince
> > > gd_client.InsertPhotoSimple requires a filename and an appengine app
> > > doesn't have access to the file system, does it?
> >
> > Good point. You could use the lower-level Post method found in
> > gdata.service.GDataService along with a gdata.MediaSource object to
> > simulate a file. This might look something like:
> >
> > media_source = gdata.MediaSource(
> > file_handle=StringIO.StringIO(your_image_data),
> > content_type='image/jpeg',
> > content_length=len(your_image_data),
> > file_name='example.jpg')
> >
> > Then look at the implementation for InsertPhoto(Simple) for ideas on
> > how to use the client.Post method.
> >
> > Thank you,
> >
> > Jeff
> >
> >
> >
> > > Thx.
> >
> > > On Feb 26, 3:32 am, "G. Nyman"  wrote:
> >
> > > > Hello everybody,
> >
> > > > I have been banging my head against this problem for a while now and
> I
> > > > can't seem to understand why it does what it does.
> >
> > > > I am trying to import pictures fromPicasausing the code appended at
> > > > the end of this post. It works fine in the dev environment but for
> > > > some reasonpicasareturns 404 when i try to run it online.
> >
> > > > The devserver-logs say:
> > > > INFO 2009-02-26 10:24:35,093 svgae.py] Got the following url:
> http://lh6.ggpht.com/_mUcXljy1w9g/SaQ-uXbkY4I/ACE/DJtdqCz6u50...,
> > > > data was truncated? 0
> > > > INFO 2009-02-26 10:24:35,093 svgae.py] Big thumb got status 200
> > > > and lenght: 99720
> > > > INFO 2009-02-26 10:24:35,108 dev_appserver.py] "GET /
> > > > no_go_with_picasa HTTP/1.1" 200 -
> >
> > > > The real thing says:
> > > > 02-26 02:25AM 24.551 /no_go_with_picasa 200 927ms 951ms-cpu 0kb
> > > > 130.232.90.98 - - [26/Feb/2009:02:25:25 -0800] "GET
> /no_go_with_picasa
> > > > HTTP/1.1" 200 104 - -
> > > > I 02-26 02:25AM 25.473
> > > > Got the following url:
> http://lh6.ggpht.com/_mUcXljy1w9g/SaQ-uXbkY4I/ACE/DJtdqCz6u50...,
> > > > data was truncated? 0
> > > > I 02-26 02:25AM 25.474
> > > > Big thumb got status 404 and lenght: 1421
> >
> > > > This might be apicasaproblem but I tought I'll try here first. The
> > > > url to the photo works in both cases so I don't understand the 404.
> > > > The most interesting thing is that urlfetch on photo.media.thumbnail
> > > > [0].url works fine.
> >
> > > > Thankfull for all assistance
> >
> > > > /G. Nyman
> >
> > > > Code to replicate the problem:
> > > > ---
> > > > class PicasaProblem(webapp.RequestHandler):
> > > > def get(self):
> > > > gd_client = gdata.photos.service.PhotosService()
> > > > gdata.alt.appengine.run_on_appengine(gd_client)
> > > > username = 'tehviu'
> > > > albumid = 'SigmaTest'
> > > > photos = gd_client.GetFeed(
> > > > '/data/feed/api/user/%s/album/%s?
> > > > kind=photo&thumbsize=64,1024&imgmax=d' % (
> > > > username, albumid))
> > > > for photo in photos.entry:
> > > > img_thumb_big = None
> > > > try:
> > > > img_thumb_big =
> urlfetch.fetch(photo.media.thumbnail[1].url)
> > > > except Exception, e:
> > > > logging.exception(e)
> > > > error = 'Image importing error'
> >
> > > > logging.info("Got the following url: " +
> photo.media.thumbnail
> > > > [1].url + ", data was truncated? " + str
> > > > (img_thumb_big.content_was_truncated))
> > > > logging.info("Big thumb got status "+ str
> > > > (img_thumb_big.status_code) + " and lenght: " + img_thumb_big.headers
> > > > ['content-length'])
> > > >

[google-appengine] Re: Timeout: datastore timeout: operation took too long.

2009-04-13 Thread DarkCoiote

Looks like my and others problem... posted a few days ago:

http://groups.google.com/group/google-appengine/browse_thread/thread/83b45cb3f90a2a3f/740e922de7d0b33b?q=#740e922de7d0b33b

Random datastore timeouts in totally unexpected places...

On Apr 13, 2:36 pm, Ray Malone  wrote:
> I'm not sure why this occurs all of a sudden.  The same job runs in
> 600ms.    Then once in a while this runs over 6800 MS and times out.
> I can't have jobs just timeout for no reason.    According to my logs
> during this time the only other request was a second prior.  This
> occurred at 04-13 09:13AM 29.627 today and other times at random in
> the last few days.
--~--~-~--~~~---~--~~
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: 500 error for static files today April 12 5:23am

2009-04-13 Thread Jason (Google)
I'm sorry for the inconvenience. Has this been resolved or are you still
experiencing this issue?

- Jason

On Sun, Apr 12, 2009 at 3:29 AM, iceanfire  wrote:

>
> Hi there,
>
> I've been encountering this problem @ around 5:23am Central Time.
>
> Two of my static files for my page (a .css and a .js) seem to
> consistently give a 500 error. The .css file sometimes loads (30% of
> the time) as I refresh.
>
> I wasn't sure where else to report this. I know its kinda early in the
> morning, but I got kinda worried, since my entire app could break if
> the server can't consistently serve a .js file!
>
> I've checked the down-time group and the dashboard system status.
>
>
> >
>

--~--~-~--~~~---~--~~
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: Eclipse Configuration Error

2009-04-13 Thread Jason (Google)
Please see this FAQ:
http://code.google.com/eclipse/docs/faq.html#jspneedsjdk

- Jason

On Fri, Apr 10, 2009 at 9:30 PM, palaniappan chellappan
wrote:

>
> I just started using Java SDK for appengine. When i added first jsp
> page on the project, Eclipse showed up an error
>
> "Your Web Application Project must be configured to use a JDK in order
> to use JSPs"
>
> jsp page is compiling and working perfectly, but i like to fix this
> problem on eclipse.
>
> Screenshot: http://imgur.com/1W5GK.png
>
> regards,
> palani
>
> >
>

--~--~-~--~~~---~--~~
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: Application-specific User Data

2009-04-13 Thread Jason (Google)
For the time being, your best bet is to map the data to the email address
which you can retrieve from the User object. There might be a better
identifier exposed in the future, but email address is works for now.

- Jason

On Fri, Apr 10, 2009 at 6:33 PM, Paul Lambert wrote:

>
> What is best practice for storing application-specific user data using
> the User api? The docs say that there is no stable identifier exposed
> for a user account - so how am I supposed to map the Google user
> account to my application's user data?
>
> I'm sure this is a very common question, but I've read the docs and
> done some searches and can't seem to find the answer. 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: Ordering results for a PolyModel class

2009-04-13 Thread Eric Walker

I figured out the solution to the problem I was asking about below.
It was more of a beginner's question than I thought.  The solution was
to add the following index to index.yaml:

- kind: assessment_item
  properties:
  - name: class
  - name: __key__
direction: desc

The problem was that I didn't really know how to find the exception
stack traces and was assuming that they weren't being logged.  In fact
exceptions are being logged.  I had two versions of the application
uploaded, and there is a dropdown box in the log viewer that allows
you to select the version.  I didn't know about the box and was
looking at logs for an earlier version of the application.

Eric

On Apr 12, 3:01 pm, Eric Walker  wrote:
> Hi everyone,
>
> I have a beginner's question I wasn't able to find documentation on.
> I'd be grateful if someone could point me to a specific page or issue
> number that discusses it.
>
> I just finished debugging a simple pager that pages over aPolyModel
> subclass using the __key__ in descendingorder.  It works on the
> development server but not in production, where an unspecified
> exception is thrown (nothing appears in the log).  Here is the
> offending line:
>
>         result = self.model.all().order('-__key__').fetch
> (self.pagesize + 1)
>
> The application works in production with the following modified
> version of the line:
>
>         result = self.model.all().fetch(self.pagesize + 1)
>
> One approach I've tried as a workaround is toorderby an "added"
> timestamp property in thePolyModelbase class, which results in an
> exception as well.  Another thing I've tried is to manually add the
> following index to index.yaml, which wasn't being created
> automatically by the development server (I assume it's not necessary):
>
> - kind: QuestionGroup
>   properties:
>   - name: __key__
>     direction: desc
>
> Adding this definition didn't fix the problem either.
>
> I understand that there was a similar ordering issue that was
> addressed inhttp://code.google.com/p/googleappengine/issues/detail?id=884.
> According to a comment, the problem was fixed in 1.1.8 (I'm using
> 1.2.0).
>
> Please let me know if I've left something important out.
>
> In a different connection, the pager turned out to be pretty finicky
> to debug, as I wanted both a "next" and "back" link, and I
> unintentionally introduced a lot of off-by-one errors.  Has been
> logged for a feature request for paging that I can follow?  I assume
> this is something that most projects will need at some point.
>
> Many thanks in advance for any help,
> Eric
--~--~-~--~~~---~--~~
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: Sudden Issues: Datastore timeout and

2009-04-13 Thread Jason (Google)
Hi Paul. Can you provide an example of an entity you're attempting to write?
Does it only have simple properties like strings and integers, or does it
also have multiple List properties that could be causing exploding indexes?

http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html#Big_Entities_and_Exploding_Indexes

- Jason

On Sun, Apr 12, 2009 at 12:03 PM, Paul Kinlan  wrote:

> Hi,
>
> Its weird, I am still seeing lots of timeouts for puts and reads at the
> moment.  The app does a lot of writes, but I wouldn't expect these to cause
> too much of an issue, saying that I am starting to see a lot of contention
> issues too.
>
> Paul.
>
> 2009/4/11 Alkis Evlogimenos ('Αλκης Ευλογημένος) 
>
> There was a short outage last night:
>>
>> http://code.google.com/status/appengine/
>>
>>
>> On Sat, Apr 11, 2009 at 9:41 AM, Paul Kinlan wrote:
>>
>>> Hi,
>>>
>>> I solved the issue with "the build-in indicies" problem,
>>>
>>> The problem that I have is that I see a very very large number of
>>> DataStore Timeouts with what appear to be simple puts (an update to an
>>> existing object).
>>>
>>> Is anyone else experiencing these?
>>>
>>> Paul.
>>>
>>> 2009/4/9 Paul Kinlan 
>>>
>>> Hi,

 Application: twitterautofollow.

 My application www.twollo.com has all of a sudden started to get
 DataStore timeouts and the following error:

 The built-in indices are not efficient enough for this query and your 
 data. Please add a composite index for this query.

 Now, I would understand this if I had made any changes but I have not made 
 any significant changes in months, and the last change I did upload last 
 week was a change to a template.





 The Query in question has two filters on and a count as follows.
 db.Query(Follow).filter("usernameLc =", user_a.lower()).filter("user =", 
 user).count()

 Any insight would be greatly appreciated.

 Paul

>>>
>>>
>>>
>>>
>>
>>
>> --
>>
>> Alkis
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
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: GAE inter-apps communication

2009-04-13 Thread Bill

> The problem with that is that if any of the sub-aplications
> get too complicated or too much traffic, it will affect
> all

The main point of App Engine is that your apps will scale regardless
of the traffic (if written correctly).  All your sub-applications can
reside under one GAE app and scale appropriately.

> and the quota will be reached really faster, although there are 'many'
> sub-aplications nearly independent of each other

The TOS prevent developers from aggregating the free quotas across
apps to serve a web app.  There's a gray area here which only Google
can decide.  For example, if you did a Google Docs app would that be
"independent" of a Google Spreadsheet app?

>From the technical standpoint, you could use versioning to have
multiple code bases operating at different urls and yet have access to
a single datastore.  This would also let you mix languages like have a
java app under one url and a python app on another.

-Bill
--~--~-~--~~~---~--~~
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: deployment issues - HELP

2009-04-13 Thread Jason (Google)
Yes, I would verify you have a root handler first or try hitting a handler
that you know is defined to see whether you see any content.

- Jason

On Mon, Apr 13, 2009 at 3:45 AM, 风笑雪  wrote:

> You should check whether you have handled the root path ('/') in your app.
> If your app id is nostalgia-register, you will got this domain:
> nostalgia-register.appspot.com, and need no settings.
>
> 2009/4/13 pumplove 
>
>
>> Hi,
>>I have created a simple application and uploaded it to the app
>> engine and though i have given the app a unique Id (nostalgia-
>> register.appspot.com) whenever i click on the link it tells me the url
>> is invalid. Do i need a domain name ? becuase this is what is given in
>> the docs " You can now see your application running on App Engine. If
>> you set up a free appspot.com domain name, the URL for your website
>> begins with your application ID:
>> http://application-id.appspot.com "
>>
>> so ideally is shud have been able to access it ...any help on this
>> would be greatly appreciated.
>>
>> Regards,
>> Vikram
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
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: Datastore Question

2009-04-13 Thread Jason (Google)
Hi. Is this 5 reads and 4 writes per request? It's worth your time and
effort during the design stage to minimize your writes where possible since
they are substantially more expensive than reads and, if the same entity is
being written too quickly (e.g. you have a shared entity for many users who
are all trying to update it at once), can cause write contention and high
resource consumption.

If the Follow entities are transient, i.e. only useful if the user makes
several consecutive searches, I'd second the recommendation to use Memcache
instead. That should definitely speed up your request time and hopefully
eliminate some of the timeouts you've been seeing.

- Jason

On Sun, Apr 12, 2009 at 2:55 PM, Paul Kinlan  wrote:

> Hi Guys,
>
> My app is Twitterautofollow.  I have a question about the quota, basically
> my app was serving between 6-13 requests a second and jumped up to 32
> requests per-second and subsequently went over the quota.  I am not sure
> where the 32 requests a second are comming from although some of them might
> come from my ping service that I am running to regularly perform some tasks
> - I wouldn't be suprised if it was a bug I created
>
> Additionally the DataStore CPU Time is Limited even though it is only at 3%
> of quota.
>
> Its starting to get a bit frustrating at the moment because I am having
> Data Store Timeouts very often on reads and puts.  Nothing in my model is in
> an EntityGroup, that is, there is no use of parent, however there are many
> RefernceProperties.
>
> The general process I have that is causing the process goes as follows
>
>
>1. Get the user (User Entity) from the datastore
>2. Get the current search term (Search Entity) for the user - I don't
>use the refernce propery set from the user because I need to filter it
>   1. Query Twitter
>   2. For up to 3 search results add a new entity of type "Follow" and
>   reference the search and user
>  1. For each result check to see if the "Follow" entity already
>  exists for the user - if it does we ignore the result
>  3. update the search entity with some basic stats
>
> Overall there are, with 5 (1 user, 1 search and 3 reads of Follow) reads
> and up to 4 puts (3 for new entities 1 for the "Search" entity).  I don't
> think this is too heavy, but it might be.
>
> So my question is, am I being too excessive, why would this cause a lot of
> datastore timeouts in both the reads and puts?  What tips do people have for
> DataStore performance?
>
> Thanks,
> Paul
>
> >
>

--~--~-~--~~~---~--~~
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: Error posting to URL: http://appengine.google.com/api/appversion/create?app_id: Invalid runtime specified.

2009-04-13 Thread Jason (Google)
Right, if you're using a Google Apps account to upload your application,
that might be the issue. If you have a non-Google Apps account, e.g. a Gmail
address, try getting this account activated for the Java runtime use it to
deploy your applications.

- Jason

2009/4/11 Dmitry V Ilyin 

>
> Do you use Google Apps-based account?
>
> On 12 апр, 10:09, "sud...@najanaja.com"  wrote:
> > Hi Jason,
> > I have similar issue while publishing java app using eclipse and yes I
> > did receive an email two days ago stating that my java app engine
> > account had been activated.
> > Any ideas?
> > Thanks
> > Sudeep
> > On Apr 9, 1:39 pm, Jason  wrote:
> >
> > > Have you received an email indicating your Google App Engine for Java
> > > account has been activated? In order to deploy your applications to
> > > production, your account must be activated first:
> >
> > >http://code.google.com/appengine/kb/java.html#runtime
> >
> > > - Jason
> >
> > > On Apr 8, 1:22 pm, njaffer  wrote:
> >
> > > > Getting following error when attempting to upload using eclipse
> plugin
> > > > on a mac, using eclipse 3.3.x.
> >
> > > > Unable to upload:
> > > > java.io.IOException: Error posting to URL:
> http://appengine.google.com/api/appversion/create?app_id=xxx&version=1&;
> > > > 400 Bad Request
> > > > Invalid runtime specified.
> >
> > > > at com.google.appengine.tools.admin.ServerConnection.send
> > > > (ServerConnection.java:114)
> > > > at com.google.appengine.tools.admin.ServerConnection.post
> > > > (ServerConnection.java:66)
> > > > at com.google.appengine.tools.admin.AppVersionUpload.send
> > > > (AppVersionUpload.java:345)
> > > > at
> com.google.appengine.tools.admin.AppVersionUpload.beginTransaction
> > > > (AppVersionUpload.java:159)
> > > > at com.google.appengine.tools.admin.AppVersionUpload.doUpload
> > > > (AppVersionUpload.java:68)
> > > > at com.google.appengine.tools.admin.AppAdminImpl.update
> > > > (AppAdminImpl.java:41)
> > > > at
> com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy
> > > > (AppEngineBridgeImpl.java:203)
> > > > at
> > > >
> com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace
> > > > (DeployProjectJob.java:97)
> > > > at
> org.eclipse.core.internal.resources.InternalWorkspaceJob.run
> > > > (InternalWorkspaceJob.java:38)
> > > > at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> > > > java.io.IOException: Error posting to URL:
> http://appengine.google.com/api/appversion/create?app_id=&version=1&;
> > > > 400 Bad Request
> > > > Invalid runtime specified.
>
> >
>

--~--~-~--~~~---~--~~
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: PageContextImpl giving issues (java.lang.ClassCastException: java.security.AccessControlException) with Spring form tag?

2009-04-13 Thread Jason (Google)
It looks like his question was answered here:

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

- Jason

On Sat, Apr 11, 2009 at 10:23 PM, Elvea  wrote:

>
> add a custom editor to the binder then i got it work
> (1)
> public class BindingInitializer implements WebBindingInitializer {
>@Override
>public void initBinder(WebDataBinder binder, WebRequest request) {
>SimpleDateFormat dateFormat = new
> SimpleDateFormat("-MM-dd");
>binder.registerCustomEditor(Date.class, new CustomDateEditor
> (dateFormat, true));
>binder.registerCustomEditor(Integer.class, new
> CustomNumberEditor
> (Integer.class, true));
>binder.registerCustomEditor(Double.class, new
> CustomNumberEditor
> (Double.class, true));
>binder.registerCustomEditor(Float.class, new
> CustomNumberEditor
> (Float.class, true));
>binder.registerCustomEditor(String.class, new
> CharacterEditor
> (true));
>}
>
> }
>
> (2) and the dispatcher-servlet,xml
> 
> 
> class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
>
>
>
> 
>
> >
>

--~--~-~--~~~---~--~~
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: Fastest way to upload huge data on GAE

2009-04-13 Thread Tom Wu
bulkloader.py

1. multi-threads   --> so fast.
2. unicode --> ??  haha !


Regards
Tom Wu


2009/4/14 Alkis Evlogimenos ('Αλκης Ευλογημένος) 

> If you are using bulkloader you might want to tune some flags from:
>
>
> http://code.google.com/appengine/docs/python/tools/uploadingdata.html#Command_Line_Arguments
>
> The particular ones that might interest you are:
>
> --num_threads
> --batch_size
> --bandwidth_limit
> --rps_limit
> --http_limit
>
> Running with the defaults will probably lead to really slow uploads
> especially with very small entities that can be batched 1000 at a time. That
> would give you a 100x speedup right off the bat.
>
> 2009/4/13 Josh Steiner 
>
>>
>> So lets see, I need to import 12 million records...
>>
>> 83.33 days to import.
>>
>> On the latest GAE blog posting it says:
>>
>> "Database import: move GBs of data easily into your App Engine app.
>> Matching export capabilities are coming soon, hopefully within a
>> month."
>>
>> Clearly this is going to have to be something other than bulkloader.py
>> , anyone have any more info on this new capability?
>>
>> -josh
>>
>> On Sun, Apr 12, 2009 at 5:26 AM, 风笑雪  wrote:
>> > You should do it this way:
>> > http://code.google.com/appengine/docs/python/tools/uploadingdata.html
>> > It will take about 1 second to insert 100 records, so I think 4000+
>> record
>> > will be uploaded in 1 minute.
>> >
>> > 2009/4/12 sevenstar 
>> >>
>> >> hi all,
>> >> I have some 4000+ records to be uploaded on the appengine.
>> >> Does GAE allow to upload so much data, if yes then i have some
>> >> questions?
>> >> 1) How to upload that data?
>> >> 2) How much time will it take to complete this thing?
>> >> 3) What is the fastest method to upload it.
>> >>
>> >> Please reply ASAP. I have been reading about it but couldn't find a
>> >> solution.
>> >>
>> >
>> >
>> > >
>> >
>>
>>
>>
>
>
> --
>
> Alkis
>
> >
>

--~--~-~--~~~---~--~~
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 deal with "Your application is exceeding a quota: Datastore Indices Count" ?

2009-04-13 Thread Jeff S
Hi T.J. Crowder,

The limit of 100 indexes is per app, but if your app needs more please let
us know.

Thank you,

Jeff

2009/4/11 T.J. Crowder 

>
> @Jeff:
>
> I'm not seeing any documented limit on indices on the quotas page.[1]
> Is there somewhere else I should be looking?  According to one of your
> collegues in January[2], the limit is 100 -- but is that per entity
> type (seems very generous), per app (seems a bit low), what?
>
> @All:
>
> FWIW, there's an open bug on this, issue #1161[2], reported the middle
> of last month.  Status "defect", priority "medium".
>
> [1] http://code.google.com/appengine/docs/quotas.html
> [2]
> http://groups.google.com/group/google-appengine/browse_thread/thread/4f98d2c04fac0fb9
> [3] http://code.google.com/p/googleappengine/issues/detail?id=1161
> --
> T.J. Crowder
> tj / crowder software / com
> Independent Software Engineer, consulting services available
>
> On Apr 10, 9:42 pm, Jeff S  wrote:
> > Hi Tom,
> >
> > Could you send me the app ID? I'll investigate further.
> >
> > Thank you,
> >
> > Jeff
> >
> > 2009/4/10 Tom Wu 
> >
> >
> >
> > > Sorry,
> >
> > > My app is billing enabled.
> > > The indexes still in "building" status even the kind is empty.
> >
> > > Best Regards
> > > Tom Wu
> >
> > > On 4月10日, 上午2時09分, Jeff S  wrote:
> > > > Hi Tom,
> >
> > > > I would start by editing the index.yaml file then use
> >
> > > > appcfg.py vacuum_indexes
> >
> > > > to remove indexes from the app which are no longer specified in your
> > > > index.yaml. You might have tried this already, so please let me know
> if
> > > this
> > > > fixes the issue. If not, could you email me your app ID?
> >
> > > > Thank you,
> >
> > > > Jeff
> >
> > > > On Wed, Apr 8, 2009 at 1:43 AM, Tom Wu 
> wrote:
> >
> > > > > How to deal with  "Your application is exceeding a quota: Datastore
> > > > > Indices Count" ?
> >
> > > > > Best Regards
> > > > > Tom Wu
> >
> >
> >
>

--~--~-~--~~~---~--~~
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: Uploading Java Application

2009-04-13 Thread Jason (Google)
Did you receive an email indicating that your newly created account has been
activated for the Java runtime? For now, you need to sign up to deploy your
Java-based apps to App Engine.

- Jason

On Sun, Apr 12, 2009 at 11:40 AM, Jeffery  wrote:

>
> Hi All,
>I tried to upload the guestbook application to my newly created
> google app account.  after run the 'appengine-java-sdk\bin\appcfg.cmd
> update appengine-java-sdk\demos\guestbook\war'
>
> i hit with with the below exception:
> java.io.IOException: Error posting to URL:
>
> http://appengine.google.com/api/appversion/create?app_id=rumahku123&version=1&;
> 400 Bad Request
> Invalid runtime specified.
>
> Unable to upload app: Error posting to URL:
>
> http://appengine.google.com/api/appversion/create?app_id=rumahku123&version=1&;
> 400 Bad Request
> Invalid runtime specified.
>
> My application id is 'rumahku123'.  I tried to modify the appengine-
> web.xml inside the guestbook war file (I changed the application id to
> 'rumah123.appspot.com') but after run the update command i hit the
> below exception:
> java.io.IOException: Error posting to URL:
>
> http://appengine.google.com/api/appversion/create?app_id=rumahku123.appspot.com&version=1&;
> 403 Forbidden
> You do not have permission to modify this app
> (app_id=u'rumahku123.appspot.com').
>
> Unable to upload app: Error posting to URL:
>
> http://appengine.google.com/api/appversion/create?app_id=rumahku123.appspot.com&version=1&;
> 403 Forbidden
> You do not have permission to modify this app
> (app_id=u'rumahku123.appspot.com').
>
> Locally I can access the guestbook application (localhost:8080/
> guestbook) so i don't think it's the application.  And also I tried to
> access my account in the appspot (rumahku123.appspot.com)  I am able
> to see the error page.
>
> Is the java support only enabled to certain accounts?  do i need to
> activate certain things?
>
> any comments/advice would be 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-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] Cron and app versions

2009-04-13 Thread William Shallum
Hi, when using cron in an app with multiple versions, shouldn't the cron job 
run on the version that has the cron.yaml? It seems that currently the cron job 
is run on the default version.

I changed the version in the admin console using the dropdown box but my cron 
jobs (that are only in the latest version) are still displayed. The cron job 
itself is marked as "failed" while a manual GET using a browser to the 
versioned address does not result in an error. The cron requests show up as 404 
errors in the request logs of the default version. Bug?

Thanks,
William

--~--~-~--~~~---~--~~
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 deal with "Your application is exceeding a quota: Datastore Indices Count" ?

2009-04-13 Thread Jeff S
Hi Tom,

The building indexes should no longer be stuck. Were you planning to delete
some of the old-unneeded indexes, or did your app need more than 100?

Thank you,

Jeff

2009/4/10 service G2100 

> Hi Jeff,
>
> My app ID  is gae0081. Thanks in advance.
>
>
> Best Regards
> Tom Wu
>
>
> 2009/4/11 Jeff S 
>
> Hi Tom,
>>
>> Could you send me the app ID? I'll investigate further.
>>
>> Thank you,
>>
>> Jeff
>>
>> 2009/4/10 Tom Wu 
>>
>>
>>> Sorry,
>>>
>>> My app is billing enabled.
>>> The indexes still in "building" status even the kind is empty.
>>>
>>>
>>> Best Regards
>>> Tom Wu
>>>
>>>
>>> On 4月10日, 上午2時09分, Jeff S  wrote:
>>> > Hi Tom,
>>> >
>>> > I would start by editing the index.yaml file then use
>>> >
>>> > appcfg.py vacuum_indexes
>>> >
>>> > to remove indexes from the app which are no longer specified in your
>>> > index.yaml. You might have tried this already, so please let me know if
>>> this
>>> > fixes the issue. If not, could you email me your app ID?
>>> >
>>> > Thank you,
>>> >
>>> > Jeff
>>> >
>>> > On Wed, Apr 8, 2009 at 1:43 AM, Tom Wu 
>>> wrote:
>>> >
>>> > > How to deal with  "Your application is exceeding a quota: Datastore
>>> > > Indices Count" ?
>>> >
>>> > > Best Regards
>>> > > Tom Wu
>>> >
>>> >
>>>
>>>
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
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: DuplicatePropertyError in google-app-engine-django sample

2009-04-13 Thread Ferry Tanu
Sorry for the silly question, but how to kill ?

using dev_appserver.py -c ?
thanks

On Tue, Apr 14, 2009 at 6:41 AM, theillustratedlife
wrote:

>
> Try killing your local datastore.  Sometimes it gets corrupted and
> these sort of errors come up.
> >
>

--~--~-~--~~~---~--~~
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 deal with "Your application is exceeding a quota: Datastore Indices Count" ?

2009-04-13 Thread Tom Wu
Hi Jeff,

Already delete unneeded indexes by vacuum_indexes.
But the msg in the index Control panel still building  and the datastore
quota didn't come back.

Thanks.

Best Regards
Tom Wu



2009/4/14 Jeff S 

> Hi Tom,
>
> The building indexes should no longer be stuck. Were you planning to delete
> some of the old-unneeded indexes, or did your app need more than 100?
>
> Thank you,
>
> Jeff
>
> 2009/4/10 service G2100 
>
> Hi Jeff,
>>
>> My app ID  is gae0081. Thanks in advance.
>>
>>
>> Best Regards
>> Tom Wu
>>
>>
>> 2009/4/11 Jeff S 
>>
>> Hi Tom,
>>>
>>> Could you send me the app ID? I'll investigate further.
>>>
>>> Thank you,
>>>
>>> Jeff
>>>
>>> 2009/4/10 Tom Wu 
>>>
>>>
 Sorry,

 My app is billing enabled.
 The indexes still in "building" status even the kind is empty.


 Best Regards
 Tom Wu


 On 4月10日, 上午2時09分, Jeff S  wrote:
 > Hi Tom,
 >
 > I would start by editing the index.yaml file then use
 >
 > appcfg.py vacuum_indexes
 >
 > to remove indexes from the app which are no longer specified in your
 > index.yaml. You might have tried this already, so please let me know
 if this
 > fixes the issue. If not, could you email me your app ID?
 >
 > Thank you,
 >
 > Jeff
 >
 > On Wed, Apr 8, 2009 at 1:43 AM, Tom Wu 
 wrote:
 >
 > > How to deal with  "Your application is exceeding a quota: Datastore
 > > Indices Count" ?
 >
 > > Best Regards
 > > Tom Wu
 >
 >


>>>
>>>
>>>
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
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] Estimating cost for iPhone app backend

2009-04-13 Thread Thomas Fors

Hello,

I've been doing some tests to see if GAE is feasible as a backend for
an iPhone app I'm working on.  So far, it appears that CPU Time is
going to drive the cost up to beyond Amazon EC2+S3 costs.  If I've
made a mistake in my math, I'd appreciate any corrections.

I have an app with a single "producer" and single "consumer" running
on my local machine.  The producer uses remote_api to perform
datastore puts and the consumer performs datastore gets.  I've run
them over the past 17 hours, and the Quota Details page shows 0.2GB
incoming and 0.2GB outgoing bandwidth.  CPU Time has been 0.84 CPU-
hours with 6608 requests.  That says I'm using about 458 CPU-
milliseconds per request.

Google claims in May, their new free quota of 6.5 CPU-hours per day
will support 5 million page views per month which means they're
estimating 142 CPU-milliseconds per request.

If I stick with the 458 CPU-milliseconds per request number, and
assume my iPhone app is very popular and I do get 5 million requests
per month, I'll consume 21 CPU-hours per day which is close enough to
24 CPU-hours per day that I decided to compare GAE to a dedicated
Amazon EC2 instance.

I'm going to give Google the benefit of the doubt and assume that I
don't exceed the free limits of 1GB data in and 1GB data out per day
and that my storage never exceeds the free limit of 1GB.

With GAE, I'll get 6.5 CPU-hours / day for free and have to pay for
the remaining 17.5 hours / day at $0.10 / h.  Over a year, this
amounts to $638.75.  Since data in, out, and storage are free, my
total annual cost with Google is $638.75.

With Amazon EC2, I can pay $500 for a 3-year reservation for a CPU
instance.  This comes out to a fixed annual cost of $166.67 / year.
In addition to that, I have to pay for 24h / day of CPU time at a rate
of $0.03 / h for the year.  This comes out to $262.80.

Assuming I actually consume Google's free bandwidth limits of 1GB data
in and out, Amazon would charge:
1GB in / day = 365 GB in / year * $0.10 / GB in = $36.50 for bandwidth
in / year
1GB out / day = 365 GB out / year * $0.14 / GB out = $51.10 for
bandwidth out / year

In addition, assuming I store Google's free storage limit of 1GB for
the year, with Amazon S3 this would cost:
1GB / day = 30.4 GB/month * $0.15 / GB / month = $4.56 / month =
$54.75 for storage / year

Amazon total annual cost: $166.67 + $262.80 + $36.50 + $51.10 + $54.75
= $571.82

So, GAE would cost $638.75 per year where Amazon would cost $571.82.
Despite all the freebies Google's throwing in, Amazon is still
cheaper.

In addition, I can't send iPhone push notices from GAE where I can
from EC2.  I really like the GAE concept, but I just can't seem to
make the math work out.

I realize there are lots of assumptions in here and 5 million page
hits per month may be a gross assumption, but in my testing, it
doesn't take much to send CPU Time though the roof.  My "producer" was
originally a cron task that did an urlfetch and performed several
datastore puts.  I was getting timeouts and CPU times up to 30s /
request.  I converted it to use remote_api and did some optimization
on the code and now I have it down to something more reasonable
(occasionally, peaking to 2s / request), but still, my "consumer" task
is just a simple get that performs a query on the datastore returning
between 10 and 20 entities.  The log confirms that it's taking around
400 CPU-milliseconds per request.

What am I missing?

--~--~-~--~~~---~--~~
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: Estimating cost for iPhone app backend

2009-04-13 Thread Josh Steiner

Thanks very much for this analysis, I've been putting off drawing up
some numbers of my own for a week or so now ;)

One thing that you are missing (unfortunately a more qualitative
distinction rather than quantitative) is that appengine handles all
the scaling for you.  Ec2 doesn't do anything to help you autoscale
out of the box, and scaling a LAMP app is not exactly an easy ride if
your growth curve is steep and sudden.

I suppose you could to factor in how much your time is worth and build
an estimate of how much more work you would need to do to get your app
scalable to that level of traffic.  My immediate guess would be that
its going to be way more than the $70 price difference between the two
services.

I'd wager you'd need to setup master/slave db's if your service is DB
heavy at all, which will completely explode your numbers here as you'd
need at least 2 fulltime EC2 instances.

-Josh

On Mon, Apr 13, 2009 at 6:36 PM, Thomas Fors  wrote:
>
> Hello,
>
> I've been doing some tests to see if GAE is feasible as a backend for
> an iPhone app I'm working on.  So far, it appears that CPU Time is
> going to drive the cost up to beyond Amazon EC2+S3 costs.  If I've
> made a mistake in my math, I'd appreciate any corrections.
>
> I have an app with a single "producer" and single "consumer" running
> on my local machine.  The producer uses remote_api to perform
> datastore puts and the consumer performs datastore gets.  I've run
> them over the past 17 hours, and the Quota Details page shows 0.2GB
> incoming and 0.2GB outgoing bandwidth.  CPU Time has been 0.84 CPU-
> hours with 6608 requests.  That says I'm using about 458 CPU-
> milliseconds per request.
>
> Google claims in May, their new free quota of 6.5 CPU-hours per day
> will support 5 million page views per month which means they're
> estimating 142 CPU-milliseconds per request.
>
> If I stick with the 458 CPU-milliseconds per request number, and
> assume my iPhone app is very popular and I do get 5 million requests
> per month, I'll consume 21 CPU-hours per day which is close enough to
> 24 CPU-hours per day that I decided to compare GAE to a dedicated
> Amazon EC2 instance.
>
> I'm going to give Google the benefit of the doubt and assume that I
> don't exceed the free limits of 1GB data in and 1GB data out per day
> and that my storage never exceeds the free limit of 1GB.
>
> With GAE, I'll get 6.5 CPU-hours / day for free and have to pay for
> the remaining 17.5 hours / day at $0.10 / h.  Over a year, this
> amounts to $638.75.  Since data in, out, and storage are free, my
> total annual cost with Google is $638.75.
>
> With Amazon EC2, I can pay $500 for a 3-year reservation for a CPU
> instance.  This comes out to a fixed annual cost of $166.67 / year.
> In addition to that, I have to pay for 24h / day of CPU time at a rate
> of $0.03 / h for the year.  This comes out to $262.80.
>
> Assuming I actually consume Google's free bandwidth limits of 1GB data
> in and out, Amazon would charge:
> 1GB in / day = 365 GB in / year * $0.10 / GB in = $36.50 for bandwidth
> in / year
> 1GB out / day = 365 GB out / year * $0.14 / GB out = $51.10 for
> bandwidth out / year
>
> In addition, assuming I store Google's free storage limit of 1GB for
> the year, with Amazon S3 this would cost:
> 1GB / day = 30.4 GB/month * $0.15 / GB / month = $4.56 / month =
> $54.75 for storage / year
>
> Amazon total annual cost: $166.67 + $262.80 + $36.50 + $51.10 + $54.75
> = $571.82
>
> So, GAE would cost $638.75 per year where Amazon would cost $571.82.
> Despite all the freebies Google's throwing in, Amazon is still
> cheaper.
>
> In addition, I can't send iPhone push notices from GAE where I can
> from EC2.  I really like the GAE concept, but I just can't seem to
> make the math work out.
>
> I realize there are lots of assumptions in here and 5 million page
> hits per month may be a gross assumption, but in my testing, it
> doesn't take much to send CPU Time though the roof.  My "producer" was
> originally a cron task that did an urlfetch and performed several
> datastore puts.  I was getting timeouts and CPU times up to 30s /
> request.  I converted it to use remote_api and did some optimization
> on the code and now I have it down to something more reasonable
> (occasionally, peaking to 2s / request), but still, my "consumer" task
> is just a simple get that performs a query on the datastore returning
> between 10 and 20 entities.  The log confirms that it's taking around
> 400 CPU-milliseconds per request.
>
> What am I missing?
>
> >
>

--~--~-~--~~~---~--~~
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: Error posting to URL: http://appengine.google.com/api/appversion/create?app_id: Invalid runtime specified.

2009-04-13 Thread Sudeep Bhattarai
Thanks Jason.That was it..It worked after I used gmail account.
Sudeep

2009/4/13 Jason (Google) 

> Right, if you're using a Google Apps account to upload your application,
> that might be the issue. If you have a non-Google Apps account, e.g. a Gmail
> address, try getting this account activated for the Java runtime use it to
> deploy your applications.
>
> - Jason
>
> 2009/4/11 Dmitry V Ilyin 
>
>
>> Do you use Google Apps-based account?
>>
>> On 12 апр, 10:09, "sud...@najanaja.com"  wrote:
>> > Hi Jason,
>> > I have similar issue while publishing java app using eclipse and yes I
>> > did receive an email two days ago stating that my java app engine
>> > account had been activated.
>> > Any ideas?
>> > Thanks
>> > Sudeep
>> > On Apr 9, 1:39 pm, Jason  wrote:
>> >
>> > > Have you received an email indicating your Google App Engine for Java
>> > > account has been activated? In order to deploy your applications to
>> > > production, your account must be activated first:
>> >
>> > >http://code.google.com/appengine/kb/java.html#runtime
>> >
>> > > - Jason
>> >
>> > > On Apr 8, 1:22 pm, njaffer  wrote:
>> >
>> > > > Getting following error when attempting to upload using eclipse
>> plugin
>> > > > on a mac, using eclipse 3.3.x.
>> >
>> > > > Unable to upload:
>> > > > java.io.IOException: Error posting to URL:
>> http://appengine.google.com/api/appversion/create?app_id=xxx&version=1&;
>> > > > 400 Bad Request
>> > > > Invalid runtime specified.
>> >
>> > > > at com.google.appengine.tools.admin.ServerConnection.send
>> > > > (ServerConnection.java:114)
>> > > > at com.google.appengine.tools.admin.ServerConnection.post
>> > > > (ServerConnection.java:66)
>> > > > at com.google.appengine.tools.admin.AppVersionUpload.send
>> > > > (AppVersionUpload.java:345)
>> > > > at
>> com.google.appengine.tools.admin.AppVersionUpload.beginTransaction
>> > > > (AppVersionUpload.java:159)
>> > > > at
>> com.google.appengine.tools.admin.AppVersionUpload.doUpload
>> > > > (AppVersionUpload.java:68)
>> > > > at com.google.appengine.tools.admin.AppAdminImpl.update
>> > > > (AppAdminImpl.java:41)
>> > > > at
>> com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy
>> > > > (AppEngineBridgeImpl.java:203)
>> > > > at
>> > > >
>> com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace
>> > > > (DeployProjectJob.java:97)
>> > > > at
>> org.eclipse.core.internal.resources.InternalWorkspaceJob.run
>> > > > (InternalWorkspaceJob.java:38)
>> > > > at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>> > > > java.io.IOException: Error posting to URL:
>> http://appengine.google.com/api/appversion/create?app_id=&version=1&;
>> > > > 400 Bad Request
>> > > > Invalid runtime specified.
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
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: Cron Job and DeadlineExceededError

2009-04-13 Thread jorge

Thanks, Wooble, that cleared things up.  I was a little confused by
the following log entries:

04-12 07:58PM 50.107 /mailer 500 28785ms 10749ms-cpu 0kb
See details
0.1.0.1 - - [12/Apr/2009:19:59:18 -0700] "GET /mailer HTTP/1.1" 500 0
- -
04-12 07:59PM 18.778
:

So the 28785ms is where the problem is (not the 10749ms cpu)...this is
consistent with the recent post on the AppEngine blog about the
removal of the high CPU errors.

I guess my next concern is the fact that what I consider to be a
fairly simple script is taking so long to run.  It is basically doing
a query of a user table that has ~500 rows and about 4 columns.  From
this, it sends out an HTML email (usually about 3-4k in size) to each
user.  This would take 2-3 seconds tops when I used to run it in a
Perl script when I was hosting my site elsewhere.

I did offload some of the Django template work on to Python.  Since
there is some minor custom info in each email (user name, user id), I
was using the Django templates to format each message as I iterated
over the user list.  Although there were only 3 variables that were
being substituted in the template, it seems to me that this is the
only possible place that could be causing such a huge performance
bottleneck.  I haven't taken the time to profile it yet so I'll have
to do that whenever time allows.

Thanks again.

On Apr 13, 10:57 am, Wooble  wrote:
> The request deadline is actually 30 seconds now, but yeah, as far as I
> can tell cron jobs are just intended to free you from needing a cron
> job on your own machine to hit a URL with wget or whatever
> periodically.
>
> Long-running processes are probably what you're looking for; hopefully
> we'll see them soon.
>
> In the meantime, the remote API might be the best solution for big
> database cleanup jobs.
>
> On Apr 12, 11:41 pm, jorge  wrote:
>
> > I guess I probably misunderstood and thought that cron jobs weren't
> > subject to the same 10 second request deadline for HTTP requests?  I'm
> > trying to run a cron job that sends out a mailer.  Unfortunately, it's
> > taking longer than 10 seconds so the job will fail about halfway
> > through.  I guess I could rewrite it to only do batches at a time.
> > The means extra tables in my database to keep track of who has been
> > mailed, etc.  Not a big deal, I guess.  It just seems that this
> > restriction makes cron jobs fairly limited in what they can do.  A
> > database cleanup job, for example, is going to take longer and longer
> > as tables grow and will almost certainly always hit this limit, and
> > create a situation where the cron scripts will have to be rewritten
> > and additional tables written to manage intermediate state, etc.
>
> > Is the intent that the cron jobs will remain subject to the same
> > restrictions as other requests?
--~--~-~--~~~---~--~~
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: (RESOLVED) 500 Internal Server Error while deploying using eclipse

2009-04-13 Thread Sudeep Bhattarai
Hi kp,
I was using account associated with "apps for business/domain" and hence the
error. Apparently you have to use "@gmail.com" account. Now it is working
for me.

Thank you
Sudeep

On Mon, Apr 13, 2009 at 3:11 PM, kp  wrote:

>
> I agree, this is very frustrating. This happens on both my gmail
> account, and my google apps domain account. Here is the Eclipse error
> log, if anybody else has any ideas (app id removed):
>
> Unable to upload app: Error posting to URL:
>
> http://appengine.google.com/api/appversion/clonefiles?app_id=(myappid)&version=1&
> 500 Internal Server Error
> Server Error (500)
> A server error has occurred.
>
> at com.google.appengine.tools.admin.AppAdminImpl.update
> (AppAdminImpl.java:47)
>at
> com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy
> (AppEngineBridgeImpl.java:203)
>at
> com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace
> (DeployProjectJob.java:97)
>at org.eclipse.core.internal.resources.InternalWorkspaceJob.run
> (InternalWorkspaceJob.java:38)
>at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>
> Caused by: java.io.IOException: Error posting to URL:
>
> http://appengine.google.com/api/appversion/clonefiles?app_id=(myappid)&version=1&
> 500 Internal Server Error
> Server Error (500)
> A server error has occurred.
>
> at com.google.appengine.tools.admin.ServerConnection.send
> (ServerConnection.java:114)
>at com.google.appengine.tools.admin.ServerConnection.post
> (ServerConnection.java:66)
>at com.google.appengine.tools.admin.AppVersionUpload.send
> (AppVersionUpload.java:345)
>at com.google.appengine.tools.admin.AppVersionUpload.cloneFiles
> (AppVersionUpload.java:211)
>at
> com.google.appengine.tools.admin.AppVersionUpload.beginTransaction
> (AppVersionUpload.java:174)
>at com.google.appengine.tools.admin.AppVersionUpload.doUpload
> (AppVersionUpload.java:68)
>at com.google.appengine.tools.admin.AppAdminImpl.update
> (AppAdminImpl.java:41)
>
> On Apr 13, 11:55 am, Sudeep Bhattarai  wrote:
> > And by the way, I was using google's tutorial to create and deploy
> app..no
> > fancy stuff
> >
> > On Mon, Apr 13, 2009 at 11:54 AM, Sudeep Bhattarai  >wrote:
> >
> > > Hi,No. I gave up..It is just too frustrating.
> >
> > > On Mon, Apr 13, 2009 at 2:42 AM, kp  wrote:
> >
> > >> Any update on this issue, or did you get it figured out? I'm having
> > >> the same problem that you are, and I can't figure out why it's
> > >> happening.
> >
> > >> On Apr 11, 12:46 pm, "sud...@najanaja.com" 
> > >> wrote:
> > >> > I keep getting following error while deploying my java app. What
> could
> > >> > be the reason?
> >
> > >> > Unable to upload app: Error posting to URL:
> > >>http://appengine.google.com/api/appversion/create?app_id=hohalla8&ver.
> ..
> > >> > 500 Internal Server Error
> >
> > >> > Server Error (500)
> > >> > A server error has occurred.
> >
> > >> > See the Eclipse error log for more details
> > >> > Unable to upload app: Error posting to URL:
> > >>http://appengine.google.com/api/appversion/create?app_id=hohalla8&ver.
> ..
> > >> > 500 Internal Server Error
> >
> > >> > Server Error (500)
> > >> > A server error has occurred.
> >
>

--~--~-~--~~~---~--~~
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] Get values by unique ID

2009-04-13 Thread Wiiboy

I've got a site running on app-engine-patch and Django.  I need to
know how to get one row from the DB when I know a certain value, like
a primary key.

I've tried the pk:
Newsletter.all().filter('pk', 'PK VALUE').get()

But that returns None, although when I do (something just like):
y = Newsletter.all().fetch(100)
if 'PK_VALUE' in y:
   return HttpResponse('Pk correct')

It returns 'Pk correct'.
--~--~-~--~~~---~--~~
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: Get values by unique ID

2009-04-13 Thread Wiiboy

Correction: The code above is wrong in the second chunk.  But the
concept is the same: there is a value in the database with that PK,
but App Engine won't return it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-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: Get values by unique ID

2009-04-13 Thread Wiiboy

H
I've got a Blob in that DB.  Blobs aren't indexed, right?  Could that
be causing the 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: Get values by unique ID

2009-04-13 Thread Tim Hoffman

Hi

Your filter should read

Newsletter.all().filter('pk = ', 'PK VALUE').get()

T

On Apr 14, 11:20 am, Wiiboy  wrote:
> I've got a site running on app-engine-patch and Django.  I need to
> know how to get one row from the DB when I know a certain value, like
> a primary key.
>
> I've tried the pk:
> Newsletter.all().filter('pk', 'PK VALUE').get()
>
> But that returns None, although when I do (something just like):
> y = Newsletter.all().fetch(100)
> if 'PK_VALUE' in y:
>    return HttpResponse('Pk correct')
>
> It returns 'Pk correct'.
--~--~-~--~~~---~--~~
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: DuplicatePropertyError in google-app-engine-django sample

2009-04-13 Thread Tim Hoffman

HI

This won't be the datastore, at this point your not even trying to
access it.

Notice the reference to choice_set in the stacktrace.

What you will find is that the BaseModel and django is possibly doing
some metaclass work
and/or the google code is (it generates accessors) is clashing.

As an example if you have a reference_property pointing to a target
class, the target class
will get the an method automatically created for it called
_set

You should rename the class Choice or the method choice and see which
causes the error to go away
(or burrow down into the code ;-)

See ya

T

On Apr 13, 4:52 pm, Ferry Tanu  wrote:
> Hi,
>
> I'm trying to follow the google-app-engine-django sample, these are steps
> that I did:
>
> 1. models.py:
>
> from appengine_django.models import BaseModel
> from google.appengine.ext import db
>
> class Poll(BaseModel):
>     question = db.StringProperty()
>     pub_date = db.DateTimeProperty('date published')
>
> class Choice(BaseModel):
>     poll = db.ReferenceProperty(Poll)
>     choice = db.StringProperty()
>     votes = db.IntegerProperty()
>
> 2. python manage.py shell
> 3. >>> from mysite.polls.models import Poll, Choice
>
> Then got this error:
>
> WARNING:root:Could not initialize images API; you are likely missing the
> Python
> "PIL" module. ImportError: No module named _imaging
> Python 2.5.4 (r254
> :67916,
> Dec 23 2008, 15:10:54) [MSC v.1310 32 bit
> (Intel)] on
> win32
> Type "help", "copyright", "credits" or "license" for more information.
> (InteractiveConsole)>>> from mysite.polls.models import Poll, Choice
>
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "D:\mysite\polls\models.py", line 9, in 
>     class Choice(BaseModel):
>   File "D:\mysite\appengine_django\models.py", line 131, in __init__
>     super(PropertiedClassWithDjango, cls).__init__(name, bases, attrs)
>   File "C:\Program
> Files\Google\google_appengine\google\appengine\ext\db\__init_
> _.py", line 319, in __init__
>     _initialize_properties(cls, name, bases, dct)
>   File "C:\Program
> Files\Google\google_appengine\google\appengine\ext\db\__init_
> _.py", line 270, in _initialize_properties
>     attr.__property_config__(model_class, attr_name)
>   File "C:\Program
> Files\Google\google_appengine\google\appengine\ext\db\__init_
> _.py", line 2546, in __property_config__
>     self.collection_name))
> DuplicatePropertyError: Class Model already has property choice_set
>
> Anyone know why ?
>
> Thanks
>
> ~Ferry
--~--~-~--~~~---~--~~
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: DuplicatePropertyError in google-app-engine-django sample

2009-04-13 Thread Tim Hoffman

Also you need to install PIL in your development env,

something in Django or elsewhere in your app is trying to import it
(default gae base code doesn't)

See ya

T

On Apr 13, 4:52 pm, Ferry Tanu  wrote:
> Hi,
>
> I'm trying to follow the google-app-engine-django sample, these are steps
> that I did:
>
> 1. models.py:
>
> from appengine_django.models import BaseModel
> from google.appengine.ext import db
>
> class Poll(BaseModel):
>     question = db.StringProperty()
>     pub_date = db.DateTimeProperty('date published')
>
> class Choice(BaseModel):
>     poll = db.ReferenceProperty(Poll)
>     choice = db.StringProperty()
>     votes = db.IntegerProperty()
>
> 2. python manage.py shell
> 3. >>> from mysite.polls.models import Poll, Choice
>
> Then got this error:
>
> WARNING:root:Could not initialize images API; you are likely missing the
> Python
> "PIL" module. ImportError: No module named _imaging
> Python 2.5.4 (r254
> :67916,
> Dec 23 2008, 15:10:54) [MSC v.1310 32 bit
> (Intel)] on
> win32
> Type "help", "copyright", "credits" or "license" for more information.
> (InteractiveConsole)>>> from mysite.polls.models import Poll, Choice
>
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "D:\mysite\polls\models.py", line 9, in 
>     class Choice(BaseModel):
>   File "D:\mysite\appengine_django\models.py", line 131, in __init__
>     super(PropertiedClassWithDjango, cls).__init__(name, bases, attrs)
>   File "C:\Program
> Files\Google\google_appengine\google\appengine\ext\db\__init_
> _.py", line 319, in __init__
>     _initialize_properties(cls, name, bases, dct)
>   File "C:\Program
> Files\Google\google_appengine\google\appengine\ext\db\__init_
> _.py", line 270, in _initialize_properties
>     attr.__property_config__(model_class, attr_name)
>   File "C:\Program
> Files\Google\google_appengine\google\appengine\ext\db\__init_
> _.py", line 2546, in __property_config__
>     self.collection_name))
> DuplicatePropertyError: Class Model already has property choice_set
>
> Anyone know why ?
>
> Thanks
>
> ~Ferry
--~--~-~--~~~---~--~~
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] Need Index Quota Reset

2009-04-13 Thread Devel63

I have an app that's giving me a Number Indexes Exceeds Quota message.

My understanding is that vacuumed indexes are not automatically
credited back.

Can someone at Google reset my accounting?  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] Can't open a link that specifies the ID

2009-04-13 Thread ke...@kanno.com

Hi,

I'm developping Django application on GAE but I have a problem.

I made a link to jump to the specified place of the page with "ID". The 
link works if I open it in new window, but If I just click the link, 
nothing happen. Do you have any idea?

Here is the page where I have a problem.
http://123.latest.ibibleapps.appspot.com/strongssearch/i/verselist?book=1&chapter=1


Thanks,
Keiya Kanno

--~--~-~--~~~---~--~~
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: Get values by unique ID

2009-04-13 Thread Wiiboy

Are you referring to the filter('pk ='?

If so,
Quote from 
http://code.google.com/appengine/docs/python/datastore/queryclass.html#Query_filter
"If the operator is omitted from the string (the argument is just the
property name), the filter uses the = operator."
--~--~-~--~~~---~--~~
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: Need Index Quota Reset

2009-04-13 Thread Tom Wu
me too.


2009/4/14 Devel63 

>
> I have an app that's giving me a Number Indexes Exceeds Quota message.
>
> My understanding is that vacuumed indexes are not automatically
> credited back.
>
> Can someone at Google reset my accounting?  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] GAE+OAuth

2009-04-13 Thread pkeane

I know the question of GAE + OAuth has come up before.  In case it is
useful to anyone, here is the code I used to get access to GMail inbox
with OAuth.  I use the base OAuth client classes from
http://oauth.googlecode.com/svn/code/python/, but unlike the example
code (which uses httplib) I use urlfetch.

I use the GAE webapp framework, and I have left out the code not
directly related to OAuth:

REQUEST_TOKEN_URL = 'https://www.google.com/accounts/
OAuthGetRequestToken'
ACCESS_TOKEN_URL = 'https://www.google.com/accounts/
OAuthGetAccessToken'
AUTHORIZATION_URL = 'https://www.google.com/accounts/
OAuthAuthorizeToken'
CALLBACK_URL = 'http://.appspot.com/oauth/token_ready'
RESOURCE_URL = 'https://mail.google.com/mail/feed/atom'
SCOPE = 'https://mail.google.com/mail/feed/atom'
CONSUMER_KEY = 
CONSUMER_SECRET = '

class OAuthToken(db.Model):
user = db.UserProperty()
token_key = db.StringProperty(required=True)
token_secret = db.StringProperty(required=True)
type = db.StringProperty(required=True)
scope = db.StringProperty(required=True)

# the home page displays the nwest messages from the users inbox
# it looks for a saved access token, and if there is not one,
redirects
# to /oauth to begin the dance...
class HomePage(BaseRequestHandler):
  @login_required
  def get(self):
  mail_feed = ''
  t = OAuthToken.all()
  t.filter("user =",users.GetCurrentUser())
  t.filter("scope =", SCOPE)
  t.filter("type =", 'access')
  results = t.fetch(1)
  for oauth_token in results:
  if oauth_token.token_key:
  key = oauth_token.token_key
  mail_feed = oauth_token.token_key
  secret = oauth_token.token_secret
  token = oauth.OAuthToken(key,secret)
  consumer = oauth.OAuthConsumer(CONSUMER_KEY,
CONSUMER_SECRET)
  oauth_request =
oauth.OAuthRequest.from_consumer_and_token(consumer,
 
token=token,
 
http_url=SCOPE)
  signature_method = oauth.OAuthSignatureMethod_HMAC_SHA1
()
  oauth_request.sign_request(signature_method, consumer,
token)
  result = urlfetch.fetch(url=SCOPE,
  method=urlfetch.GET,
  headers=oauth_request.to_header
())
  # I use a custom atom wrapper for displaying the feed
  mail_feed = atomlib.atom03.Atom.from_text
(result.content)
  if not mail_feed:
self.redirect('/oauth')
  self.generate('index.html', {
  'mail_feed' : mail_feed,
  })

# this class (probably should not be called a "page")
# gets a request token and authorizes it
class OAuthPage(BaseRequestHandler):
  def get(self):
scope = {'scope':SCOPE}
consumer = oauth.OAuthConsumer(CONSUMER_KEY, CONSUMER_SECRET)
oauth_request = oauth.OAuthRequest.from_consumer_and_token
(consumer,
 
token=None,
 
http_url=REQUEST_TOKEN_URL,parameters=scope)
signature_method = oauth.OAuthSignatureMethod_HMAC_SHA1()
oauth_request.sign_request(signature_method, consumer, None)
url = oauth_request.to_url()
result = urlfetch.fetch(url)
if result.status_code == 200:
token = oauth.OAuthToken.from_string(result.content)
#persist token
saved_token = OAuthToken(user=users.GetCurrentUser(),
 token_key = token.key,
 token_secret = token.secret,
 scope = SCOPE,
 type = 'request',
)
saved_token.put()
#now authorize token
oauth_request = oauth.OAuthRequest.from_token_and_callback
(token=token,
 
callback=CALLBACK_URL,
 
http_url=AUTHORIZATION_URL)
url = oauth_request.to_url()
self.redirect(url)
else:
  self.response.out.write('no request token')

#this class is where we exchange the request token
# for an access token
class OAuthReadyPage(BaseRequestHandler):
  def get(self):
  t = OAuthToken.all()
  t.filter("user =",users.GetCurrentUser())
  t.filter("token_key =", self.request.get('oauth_token'))
  t.filter("scope =", SCOPE)
  t.filter("type =", 'request')
  results = t.fetch(1)
  for oauth_token in results:
  if oauth_token.token_key:
  key = oauth_token.token_key
  secret = oauth_token.token_secret
  token = oauth.OAuthToken(key,secret)
  #get access token
  consumer = oauth.OAuthConsumer(CONSUMER_KEY,
CONSUMER_SECRET)
 oauth_request = oauth.OAuthRequest.from_consumer_and_token
(consumer,
 
token=token,
 
http_url=ACCESS_TOKEN_URL)
  signature_method = oauth.OAuthSignatureMethod_HMAC_SHA1
()
  oauth_request.sign_request(signature_method, consumer,
token)
  url = oauth_request.to_url()
  result = urlfetch.fetch(url)
  if result.status_code == 200:
  toke

[google-appengine] Re: How to deal with "Your application is exceeding a quota: Datastore Indices Count" ?

2009-04-13 Thread T.J. Crowder

Hi Jeff,

Thanks for that.  Where is it documented?  I'm having trouble pulling
together a complete list of all the various quotas, limits, etc.:
http://groups.google.com/group/google-appengine/browse_thread/thread/91310c5ac58058b1

Having a full picture is vital to deciding whether an application is
appropriate for building with AppEngine.  Any pointers on where this
stuff is (probably best in that other thread) would be great.

Thanks,
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available


On Apr 14, 2:01 am, Jeff S  wrote:
> Hi T.J. Crowder,
>
> The limit of 100 indexes is per app, but if your app needs more please let
> us know.
>
> Thank you,
>
> Jeff
>
> 2009/4/11 T.J. Crowder 
>
>
>
> > @Jeff:
>
> > I'm not seeing any documented limit on indices on the quotas page.[1]
> > Is there somewhere else I should be looking?  According to one of your
> > collegues in January[2], the limit is 100 -- but is that per entity
> > type (seems very generous), per app (seems a bit low), what?
>
> > @All:
>
> > FWIW, there's an open bug on this, issue #1161[2], reported the middle
> > of last month.  Status "defect", priority "medium".
>
> > [1]http://code.google.com/appengine/docs/quotas.html
> > [2]
> >http://groups.google.com/group/google-appengine/browse_thread/thread/...
> > [3]http://code.google.com/p/googleappengine/issues/detail?id=1161
> > --
> > T.J. Crowder
> > tj / crowder software / com
> > Independent Software Engineer, consulting services available
>
> > On Apr 10, 9:42 pm, Jeff S  wrote:
> > > Hi Tom,
>
> > > Could you send me the app ID? I'll investigate further.
>
> > > Thank you,
>
> > > Jeff
>
> > > 2009/4/10 Tom Wu 
>
> > > > Sorry,
>
> > > > My app is billing enabled.
> > > > The indexes still in "building" status even the kind is empty.
>
> > > > Best Regards
> > > > Tom Wu
>
> > > > On 4月10日, 上午2時09分, Jeff S  wrote:
> > > > > Hi Tom,
>
> > > > > I would start by editing the index.yaml file then use
>
> > > > > appcfg.py vacuum_indexes
>
> > > > > to remove indexes from the app which are no longer specified in your
> > > > > index.yaml. You might have tried this already, so please let me know
> > if
> > > > this
> > > > > fixes the issue. If not, could you email me your app ID?
>
> > > > > Thank you,
>
> > > > > Jeff
>
> > > > > On Wed, Apr 8, 2009 at 1:43 AM, Tom Wu 
> > wrote:
>
> > > > > > How to deal with  "Your application is exceeding a quota: Datastore
> > > > > > Indices Count" ?
>
> > > > > > Best Regards
> > > > > > Tom Wu
>
>
--~--~-~--~~~---~--~~
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: Estimating cost for iPhone app backend

2009-04-13 Thread 'Αλκης Ευλογημένος
You are comparing AppEngine's indexed/queryable storage with S3's blobstore.
To do a fairer comparison you would want to compare with SimpleDB instead:
http://aws.amazon.com/simpledb/#pricing

On Tue, Apr 14, 2009 at 3:36 AM, Thomas Fors  wrote:

>
> Hello,
>
> I've been doing some tests to see if GAE is feasible as a backend for
> an iPhone app I'm working on.  So far, it appears that CPU Time is
> going to drive the cost up to beyond Amazon EC2+S3 costs.  If I've
> made a mistake in my math, I'd appreciate any corrections.
>
> I have an app with a single "producer" and single "consumer" running
> on my local machine.  The producer uses remote_api to perform
> datastore puts and the consumer performs datastore gets.  I've run
> them over the past 17 hours, and the Quota Details page shows 0.2GB
> incoming and 0.2GB outgoing bandwidth.  CPU Time has been 0.84 CPU-
> hours with 6608 requests.  That says I'm using about 458 CPU-
> milliseconds per request.
>
> Google claims in May, their new free quota of 6.5 CPU-hours per day
> will support 5 million page views per month which means they're
> estimating 142 CPU-milliseconds per request.
>
> If I stick with the 458 CPU-milliseconds per request number, and
> assume my iPhone app is very popular and I do get 5 million requests
> per month, I'll consume 21 CPU-hours per day which is close enough to
> 24 CPU-hours per day that I decided to compare GAE to a dedicated
> Amazon EC2 instance.
>
> I'm going to give Google the benefit of the doubt and assume that I
> don't exceed the free limits of 1GB data in and 1GB data out per day
> and that my storage never exceeds the free limit of 1GB.
>
> With GAE, I'll get 6.5 CPU-hours / day for free and have to pay for
> the remaining 17.5 hours / day at $0.10 / h.  Over a year, this
> amounts to $638.75.  Since data in, out, and storage are free, my
> total annual cost with Google is $638.75.
>
> With Amazon EC2, I can pay $500 for a 3-year reservation for a CPU
> instance.  This comes out to a fixed annual cost of $166.67 / year.
> In addition to that, I have to pay for 24h / day of CPU time at a rate
> of $0.03 / h for the year.  This comes out to $262.80.
>
> Assuming I actually consume Google's free bandwidth limits of 1GB data
> in and out, Amazon would charge:
> 1GB in / day = 365 GB in / year * $0.10 / GB in = $36.50 for bandwidth
> in / year
> 1GB out / day = 365 GB out / year * $0.14 / GB out = $51.10 for
> bandwidth out / year
>
> In addition, assuming I store Google's free storage limit of 1GB for
> the year, with Amazon S3 this would cost:
> 1GB / day = 30.4 GB/month * $0.15 / GB / month = $4.56 / month =
> $54.75 for storage / year
>
> Amazon total annual cost: $166.67 + $262.80 + $36.50 + $51.10 + $54.75
> = $571.82
>
> So, GAE would cost $638.75 per year where Amazon would cost $571.82.
> Despite all the freebies Google's throwing in, Amazon is still
> cheaper.
>
> In addition, I can't send iPhone push notices from GAE where I can
> from EC2.  I really like the GAE concept, but I just can't seem to
> make the math work out.
>
> I realize there are lots of assumptions in here and 5 million page
> hits per month may be a gross assumption, but in my testing, it
> doesn't take much to send CPU Time though the roof.  My "producer" was
> originally a cron task that did an urlfetch and performed several
> datastore puts.  I was getting timeouts and CPU times up to 30s /
> request.  I converted it to use remote_api and did some optimization
> on the code and now I have it down to something more reasonable
> (occasionally, peaking to 2s / request), but still, my "consumer" task
> is just a simple get that performs a query on the datastore returning
> between 10 and 20 entities.  The log confirms that it's taking around
> 400 CPU-milliseconds per request.
>
> What am I missing?
>
> >
>


-- 

Alkis

--~--~-~--~~~---~--~~
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: Using app engine for iPhone message push

2009-04-13 Thread Marco Borromeo

Would be cool if GAE team could setup a new API to let us interface
with iPhone push service.

I created a feature request for this, star it if you want ;)

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

2009/4/12 RSW :
>
> Yes, sadly, it is a binary data, one-way secure socket (no
> acknowledgement), but I guess it is not too surprising as a
> performance optimization. As a corporate programmer I see this for
> data sets like press releases and raw stock quote data; they are often
> streamed down a raw socket to ensure real-time streams. I can't even
> guess what the volume of data would be, but I wonder if it is the
> anticipated data flow from a popular IM service like AIM the prompted
> this. Still, it is annoying.
>
> The documentation is covered by the beta confidentiality agreement, so
> you'd have to be a registered developer.
>
> Is there a way to create a limited functionality socket (and ssl)
> implementation? I assume Google doesn't support the lib because it
> might allow apps to probe their data centres or support other
> nefarious activity (enforcing sandboxing). For instance, would it be
> possible to limit sockets to domain names, not IP addresses? And limit
> the domain names that can be accessed?
>
> As a note, I will be using Azure instead of Google App, since it does
> not limit access to sockets.
>
> -Ronald.
>
> On Apr 12, 4:01 am, "T.J. Crowder"  wrote:
>> > Sadly, it's not an HTTP-based web service, and moreover it doesn't run
>> > on an HTTP/s port.
>> > We need a pure socket interface to talk with Apple push server.
>>
>> Well, that's not good.  Do you have a reference for that?  (I believe
>> you, I just want to read more.)  It seems surprising.
>> --
>> T.J. Crowder
>> tj / crowder software / com
>> Independent Software Engineer, consulting services available
>>
>> On Apr 11, 8:24 pm, Marco Borromeo  wrote:
>>
>>
>>
>> > Sadly, it's not an HTTP-based web service, and moreover it doesn't run
>> > on an HTTP/s port.
>> > We need a pure socket interface to talk with Apple push server.
>>
>> > 2009/4/11 T.J. Crowder :
>>
>> > > Hi,
>>
>> > > If Apple is making the notification service available as a web app or
>> > > web service, could you use a cron job doing a URLFetch?  Apparently
>> > > all push notifications will go through Apple servers, so they'll
>> > > probably provide an HTTP-based API.
>>
>> > > FWIW,
>> > > --
>> > > T.J. Crowder
>> > > tj / crowder software / com
>> > > Independent Software Engineer, consulting services available
>>
>> > > On Apr 11, 12:57 am, RSW  wrote:
>> > >> I realize that the current version of the app engine does not support
>> > >> sockets at the moment. Does anyone know if this is on the roadmap?
>>
>> > >> I want to be able to create an app that runs a cron job that does a
>> > >> periodic check on something and alert iPhone subscribers through the
>> > >> new push mechanism in the iPhone OS 3.0.
>
> >
>

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



  1   2   >