Re: [google-appengine] Strange import errors in logs (fatal)

2012-06-25 Thread Ian Lewis
Pamela,

Specifically Takashi is probably asking if you have any naked except blocks:

try:
# Do something
except:
# Do a dance


People often do stuff like:

try:
import json
except:
import simplejson

If you have some of these, then you could be catching
DeadlineExceededErrors that occured
(they can occur basically anywhere on appengine). The instance should
get killed if one of
these errors occurs but it's best to handle it correctly in your code.

That kind of thing can cause problems. You need to do this instead.

try:
   ...
except Exception:
   ...

Some libraries are known to have these kinds of try except blocks.
Older versions of Jinja2 and werkzeug for example.

Ian

On Mon, Jun 25, 2012 at 3:37 PM, Takashi Matsuo tmat...@google.com wrote:
 Hi Pamela-

 I have not heard any similar issues for now, and there was no outage
 at that time period.
 I found that the instance which had continuously threw that exception
 initially encountered DeadlineExceededError.

 Could you tell me how you're handling exceptions? There might be a
 culprit that caused that instance got into the weird state.

 -- Takashi

 On Sat, Jun 23, 2012 at 10:59 AM, Pamela Fox pamela...@eatdifferent.com 
 wrote:
 My app went down for 10 minutes, and when I look at the logs, I see a lot
 of:

 Traceback (most recent call last):
   File
 /base/python27_runtime/python27_lib/versions/1/google/appengine/runtime/wsgi.py,
 line 187, in Handle
     handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
   File
 /base/python27_runtime/python27_lib/versions/1/google/appengine/runtime/wsgi.py,
 line 225, in _LoadHandler
     handler = __import__(path[0])
   File
 /base/data/home/apps/s~everyday-app/3.359804434352768230/application/__init__.py,
 line 21, in module
     import urls
   File
 /base/data/home/apps/s~everyday-app/3.359804434352768230/application/urls.py,
 line 6, in module
     from application import app, views, util
 ImportError: cannot import name views

 But then it stopped happening and is fine now. Was this an app engine issue
 where it didn't have all the files available for some reason? Or is this
 something that I need to be changing on my end?

 My app runs on Python 2.7 with the Flask framework, and this is the first
 I've seen of this error.

 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.



 --
 Takashi Matsuo | Developer Advocate | tmat...@google.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.




-- 
Ian

http://www.ianlewis.org/

-- 
You 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] DeadlineExceededError in the mail API

2011-09-29 Thread Ian Lewis
Hi,

I'm seeing a lot of errors in one of my applications when making
requests to the email RPC.

I am getting DeadlineExceededErrors being throw about half of the time
the api is called. The full error
is as follows.

...
File /base/python_runtime/python_lib/versions/1/google/appengine/api/mail.py,
line 390, in send_mail
message.send(make_sync_call)
  File 
/base/python_runtime/python_lib/versions/1/google/appengine/api/mail.py,
line 891, in send
make_sync_call('mail', self._API_CALL, message, response)
  File 
/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py,
line 94, in MakeSyncCall
return stubmap.MakeSyncCall(service, call, request, response)
  File 
/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py,
line 308, in MakeSyncCall
rpc.CheckSuccess()
  File 
/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_rpc.py,
line 133, in CheckSuccess
raise self.exception
DeadlineExceededError: The API call mail.Send() took too long to
respond and was cancelled.

Is anyone else seeing this?

-- 
Ian

http://www.ianlewis.org/

-- 
You 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] Kay 1.1 final released!

2011-03-06 Thread Ian Lewis
Hi everyone,

We just released Kay 1.1 and 1.0.1 final!

Kay 1.1 is the next minor release of the Kay Framework for Appengine.
It includes new features as well as bug fixes.

Kay 1.0.1 includes bug fixes in Kay 1.1 backported to the 1.0.x branch
of Kay. It is for users of Kay who do not want to
upgrade to the new version and would prefer to only upgrade to fix
bugs and avoid backwards incompatibility problems.

Kay 1.1 release doesn't include any backwards incompatible changes but
has some loud warnings for several deprecated features
based on Kay's deprecation policy:
http://code.google.com/p/kay-framework/wiki/ReleasePolicy#Minor_releases
See Kay's deprecation timeline here:
http://code.google.com/p/kay-framework/wiki/KayDeprecationTimeline

Download the new releases here:
http://code.google.com/p/kay-framework/downloads/list
Please test and file bugs here:
http://code.google.com/p/kay-framework/issues/list

You can see the release notes for both releases here:
http://code.google.com/p/kay-framework/wiki/ReleaseNotes

Changes in 1.1

* Improved exception and error handling.
* Added a new kay.ext.ereporter application for managing error reporting.
* Added a new kay.ext.live_settings application for managing global
settings without having to reploy.
* Added a new AppStatsMiddleware? which can be used to enable appstats.
* Added a new Pagination API
* Added the COOKIE_SECURE setting to support secure session cookies (
Issue #90 )
* Added a new timezone_functions context processor.
* Added a new cron_only view decorator for securing cron views.
* Lazy load jinja2 so that requests that don't require jinja2 can return faster.
* Updated google SDK taskqueue imports to import from the new package name.
* Fixed an issue where the django module could not be loaded.

Changes in 1.0.1

* Fixed an issue where error mails could not be sent to email
addresses that were not specified as a developer in the admin console.
( Issue #50 )
* Fixed an issue were the django module could not be imported after
upgrading to the Appengine SDK 1.4.2 ( Issue #92 )
* Fixed an issue where kay returned instances of the
InternalServerError? exception rather than an object that subclasses
BaseResponse? ( Issue #54 ,#56)
* Fixed an issue with the remote API and the HR datastore.
* Updated imports to the taskqueue API so they use the new import path
( Issue #73 )

Happy Coding!!

-- 
Ian

http://www.ianlewis.org/

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



Re: [google-appengine] High Replication or Master/Slave?

2011-03-01 Thread Ian Lewis
Hi,

I think that the Appengine team is recommending that folks use the HR
datastore for new applications.

That said the only benefit seems to be that you can write to the
datastore even during maintenance so if that is not important to you,
and your data is likely to be very large then master/slave might be a
better choice.

If I were you I would probably go with HR.

Ian

On Tue, Mar 1, 2011 at 8:41 PM, mscwd01 mscw...@gmail.com wrote:
 I've done my research but still cant fully decide whether to use the
 High Replication or Master/Slave datastore. Hypothetically speaking,
 if my app were to become popular it would require many reads and
 writes (it's an advert serving platform).

 I realise the High Replication datastore uses more resources, is
 slower reading and writing and would be more costly, but it does have
 the reliability I need. On the contrary the Master/Slave is faster
 which is important to me.

 Basically, what is the opinion of people who have used both in a
 production environment? Should I stick with Master/Slave or make the
 change before it's too late?

 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.





-- 
Ian

http://www.ianlewis.org/

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



Re: [google-appengine] Google App Engine datastore supports only 200 indexes..

2011-02-26 Thread Ian Lewis
Hi,

The number if indexes isn't affected by the number of properties on an
entity. It only has to do with the number of indexes for complex queries
that are needed in your application (i.e. Those in index.yaml). So the
number of indexes created automatically (by properties on indexes) are
probably only limited by your available storage and doesn't limit the number
of entities or properties on entities.

See:
http://code.google.com/appengine/docs/python/config/indexconfig.html
http://code.google.com/appengine/docs/python/datastore/propertyclass.html

On Sat, Feb 26, 2011 at 7:19 PM, piplayan nayak pipla...@gmail.com wrote:

 I am a newbie to app engine datastore. I am currently evaluating migrate my
 existing webapp to app engine.
 I found that the hard limit for indexes is 200 for an application.
 So, i am really confused whether this constraint forces many limitations on
 the app engine datastore design.[ for eg. no of entity kinds, no of
 properties in an entity] etc.

 Please advice me on this

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




-- 
Ian

http://www.ianlewis.org/

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



Re: [google-appengine] Re: memcache.flush_all() failed without error

2011-02-26 Thread Ian Lewis
Speaking from experience, when the datastore is in maintenance mode,
memcache has also always been in maintenance mode. Given that it supports
namespacing the same way the datastore does and is almost always in
maintenance mode at the same time it's likely that memcache is tied to the
datastore in some way.

That said they may only put one in maintenance so the only way to really
check is to use the capabilities API.
http://code.google.com/intl/en/appengine/docs/python/capabilities/overview.html

Ian

On Sat, Feb 26, 2011 at 9:35 PM, pdknsk pdk...@googlemail.com wrote:

 I meant the other way around: scenario where memcache is in
 maintenance but database isn't.

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




-- 
Ian

http://www.ianlewis.org/

-- 
You 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] Kay 1.0.1 rc1 Released!

2011-02-26 Thread Ian Lewis
Hi!

The Kay team just released Kay 1.0.1 rc1!

This is a release candidate for users running Kay 1.0.0 and includes
bug fixes backported from the 1.1 series. We would love for Kay users
to test it out and report any bugs you may find.

Download here: http://code.google.com/p/kay-framework/downloads/list
Please test and file bugs here:
http://code.google.com/p/kay-framework/issues/list

You can see the release notes here:
http://code.google.com/p/kay-framework/wiki/ReleaseNotes#Kay-1.0.1_rc1_-_February_27th_2011

* Fixed an issue where error mails could not be sent to email
addresses that were not specified as a developer in the admin console.
( Issue #50 )
* Fixed an issue were the django module could not be imported after
upgrading to the Appengine SDK 1.4.2 ( Issue #92 )
* Fixed an issue where kay returned instances of the
InternalServerError? exception rather than an object that subclasses
BaseResponse? ( Issue #54 , Issue #56 )
* Fixed an issue with the remote API and the HR datastore.
* Updated imports to the taskqueue API so they use the new import path
( Issue #73 )

Happy Coding!!

-- 
Ian

http://www.ianlewis.org/

-- 
You 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] Kay 1.1rc1 Released!

2011-02-22 Thread Ian Lewis
Hi!

We just released Kay 1.1 rc1!

Kay is a web framework made specifically for Google App Engine. The basic
design of Kay is based on the Django framework, like middleware, settings,
pluggable applications, etc.
Kay uses Werkzeug as a lower level framework, Jinja2 as template engine, and
babel for handling language translations.

http://code.google.com/p/kay-framework/

This is a release candidate so we would like to get as much testing on it as
possible before the release which will be next
Monday barring any unexpected problems.

Download here: http://code.google.com/p/kay-framework/downloads/list
Please test and file bugs here:
http://code.google.com/p/kay-framework/issues/list

You can see the release notes here:
http://code.google.com/p/kay-framework/wiki/ReleaseNotes#Kay-1.1.0rc1_-_February_22_2011

   - Improved exception and error handling.
  - Added a new kay.ext.ereporter application for managing error
  reporting. See:
  http://kay-docs.shehas.net/extensions.html#module-kay.ext.ereporter
   - Added a new kay.ext.live_settings application for managing global
   settings without having to reploy. See:
   http://kay-docs.shehas.net/extensions.html#module-kay.ext.live_settings
   - Added a new
AppStatsMiddleware?http://code.google.com/p/kay-framework/w/edit/AppStatsMiddleware
which
   can be used to enable appstats. See:
   http://kay-docs.shehas.net/extensions.html#module-kay.ext.appstats
   - Added a new Pagination API. See:
   http://kay-docs.shehas.net/pagination.html
   - Added a new timezone_functions context processor. See:
   
http://kay-docs.shehas.net/templates.html#kay.context_processors.timezone_functions
   - Added a new cron_only view decorator for securing cron views. See:
   http://kay-docs.shehas.net/decorators.html#kay.utils.decorators.cron_only
   - Lazy load jinja2 so that requests that don't require jinja2 can return
   faster.
   - Updated google SDK taskqueue imports to import from the new package
   name.
   - Fixed an issue where the django module could not be loaded.


Happy Coding!!

-- 
Ian

http://www.ianlewis.org/

-- 
You 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] Errors on the Admin Console

2010-11-24 Thread Ian Lewis
Hey all,

We currently can't view the admin console is currently returning Server
Errors. It's also very slow to respond. This is happening with our apps
domain as well as personal accounts. Are the recent problems with the admin
console and deploy solved or ongoing?


Thanks,
Ian


-- 
===
株式会社ビープラウド  Ian Lewis
〒150-0021
東京都渋谷区恵比寿西2-3-2 NSビル6階
email: i...@beproud.jp
TEL:03-6416-9836
FAX:03-6416-9837
http://www.beproud.jp/
===

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



Re: [google-appengine] Errors on the Admin Console

2010-11-24 Thread Ian Lewis
Thanks, Ikai. It seems to be working.

2010/11/25 Ikai Lan (Google)
ikai.l+gro...@google.comikai.l%2bgro...@google.com


 Okay, it should be working fine now.


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



 On Wed, Nov 24, 2010 at 5:22 PM, Ikai Lan (Google) 
 ikai.l+gro...@google.com ikai.l%2bgro...@google.com wrote:

 We're looking into it.

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



 On Wed, Nov 24, 2010 at 5:21 PM, Ian Lewis i...@beproud.jp wrote:

 Hey all,

 We currently can't view the admin console is currently returning Server
 Errors. It's also very slow to respond. This is happening with our apps
 domain as well as personal accounts. Are the recent problems with the admin
 console and deploy solved or ongoing?


 Thanks,
 Ian


 --
 ===
 株式会社ビープラウド  Ian Lewis
 〒150-0021
 東京都渋谷区恵比寿西2-3-2 NSビル6階
 email: i...@beproud.jp
 TEL:03-6416-9836
 FAX:03-6416-9837
 http://www.beproud.jp/
 ===

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



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




-- 
Ian

http://www.ianlewis.org/

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



Re: [google-appengine] Re: Chaining tasks forever and checking enqueued tasks

2010-11-21 Thread Ian Lewis
While the task name thing should generally work, they don't provide a
guarantee that inserting the task
won't succeed more than once. Also, I don't particularly want to have to add
a task to check if it is inserted.
There is also the problem of tombstoning names, so I would need to come up
with unique task names that
could be computed by the cron job.

http://code.google.com/appengine/docs/python/taskqueue/overview.html#Worker_URLs_and_Task_Names

I thought about using a heartbeat to check but I'm a bit afraid of
contention issues. The heartbeat option
seems like it would be the most straight forward though.

Ian

On Mon, Nov 22, 2010 at 8:27 AM, vlad vlad.troyan...@gmail.com wrote:

 Agree with Robert named tasks are the way to go. I have a similar
 requirements - have a long running state machine implemented as
 chained tasks. Once I worked out transactional issues and added
 choke points to prevent fork bomb it has been running ok for over 1
 week now. Clarification, by running ok I meant that task flow is
 sustained in presence of occasional datastore and memcache errors. You
 task handlers and app as a whole should still deal with idempotancy
 issues arising from errors.

 On Nov 21, 5:07 am, Remigius remigius.stal...@gmail.com wrote:
  Ian,
 
  It does not look like there's a facility to look up queued tasks in
  the task queue API. Instead you could use a heartbeat in the data
  store (i.e. save an entity with a timestamp each time the task queue
  task runs) that is checked by the cron job.
 
  Cheers, Remigius.

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




-- 
Ian

http://www.ianlewis.org/

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



Re: [google-appengine] Re: Chaining tasks forever and checking enqueued tasks

2010-11-21 Thread Ian Lewis
On Mon, Nov 22, 2010 at 9:14 AM, Nick Johnson (Google) 
nick.john...@google.com wrote:

 Hi Ian,

 On Mon, Nov 22, 2010 at 11:10 AM, Ian Lewis ianmle...@gmail.com wrote:

 While the task name thing should generally work, they don't provide a
 guarantee that inserting the task
 won't succeed more than once.


 A named task will never be duplicated - that's the point of task names -
 though any task at all may be executed more than once.


It may not actually get added to the queue but the program getting a
response that it succeeded might be bad for me. I suppose I
can just log this and move on though.


 Also, I don't particularly want to have to add a task to check if it is
 inserted.


 Supposing there was a way to check if a task exists, what would you do if
 you perform the check and it does not exist?


Sure, I would probably insert the task but I would also want to know how
many times the task was being kicked from the queue
and/or be notified about it as it could indicate bugs or issues with the
task queue. Not that I don't trust it but I'm trying to be as
robust as possible here. I suppose that simply logging it when tasks can be
inserted by the cron job
would be the best solution if I used task names.


 There is also the problem of tombstoning names, so I would need to come up
 with unique task names that
 could be computed by the cron job.


 http://code.google.com/appengine/docs/python/taskqueue/overview.html#Worker_URLs_and_Task_Names


 You should always do this anyway - naming your tasks after the time
 interval or iteration number they're for - because doing otherwise
 introduces race conditions.


Understood. I wasn't suggesting that it shouldn't be done if I use task
names. If the task is guaranteed not to be duplicated then I could use the
time the task was to be run in the name and calculate that in the cron job.
A bit fragile but doable. I was worried about having to calculate the task
name with the time interval in the cron job and possibly getting it wrong.


-- 
Ian

http://www.ianlewis.org/

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



[google-appengine] Chaining tasks forever and checking enqueued tasks

2010-11-20 Thread Ian Lewis
Hi all,

I've written an application that does some work every X minutes/seconds for
each entity of an entity type in the datastore. Currently this is done by
running an cron job and calculating the next runtime for each entity and
enqueing tasks with delays so that they are run at the appropriate time. But
it's hard to be flexible about the interval that tasks can be run when the
cron intervals are hard coded. Also, cron sometimes fails to run and I'd
like the application to be more robust.

It would be easy to chain the tasks for each entity forever and simply not
run and die if the entity is removed from the datastore, but I'm worried
about a situation where the task would get dequeued for some reason. In that
case all subsequent tasks for that entity wouldn't be run.

I'd like to combine the task queue and cron and chain tasks but have cron
check every so often to make sure the tasks are still enqueued. Is there a
way for the application to check if a task is enqueued in the task queue?

-- 
Ian

http://www.ianlewis.org/

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



Re: [google-appengine] Urgent: 1 minute cron jobs are still not getting executed

2010-11-11 Thread Ian Lewis
On Fri, Nov 12, 2010 at 8:27 AM, dflorey daniel.flo...@gmail.com wrote:

 Hi,
 please have a look at trecontacts, the 1-minute cron jobs are still
 not getting executed.
 ~500 apps of our customers are affected and stopped working ~12 hours
 ago.

 Daniel


It seems it was out for us as well from  22:17 to 08:12 Japan time. About 10
hours.
It seems it started working again about 15 minutes before your message
arrived.

-- 
Ian

http://www.ianlewis.org/

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



Re: [google-appengine] Datastore

2010-06-13 Thread Ian Lewis
Ben,

With non-relational databases like appengine's datastore you need to
create data based on the way you will query it rather than the way you
want to store it.

In your case it looks like you would need to create a model to store
the data you want to query (essentially an index that you manage). A
model something like the following might work.

PeopleOwnItemsIndex {
person (reference to the person owning the items/people)
owner (reference to the person owning the item)
item (reference to the item owned)
}

You'll be querying on the person field so the query will need to go in
your datastore-indexes.xml or index.yaml

When you change owners or add items you'll need to update the data for
this model. If you want to consolidate models you could also get only
your own items by creating an index on person+owner and query it with
person = me, owner = me. That would be instead of using PersonOwnItem,
but the difference would be you would have a record for each person
that can see the item rather than only one for the person owning the
item.

Ian

On Sun, Jun 13, 2010 at 4:10 AM, Ben Woodhead benwoodhead1...@gmail.com wrote:
 Hello Everybody,

 I am very comfortable with SQL and relational databases and I am
 trying to wrap my head around GAE. Below is an example of how I would
 tackle my problem in SQL and it would be really great if someone could
 give me some hints on how to accomplish something similar in GAE. Its
 basically a hierarchy of ownership.

 The 2 base tables:

 table People {
   int personId;
   string name;
 }

 table items {
int itemId;
string itemName;
 }

 The 2 relational tables:
 table PeopleOwnPeople {
int ownersId;
int personId;
 }

 table PeopleOwnItems {
int personId;
int itemId;
 }

 So now that we have a basic structure I can start to explain the idea
 or problem. I want to be able to search for all items owned by me and
 the people i own:

 select items.* from Items, PeopleOwnPeople, PeopleOwnItems where
 (PeopleOwnPeople.ownersId=234 and
 PeopleOwnPeople.personId=PeopleownItems.personId) or
 PeopleOwnItems.personId = 234 ;

 I am looking to use GWT as my frontend to this project so I am likely
 going to be using Java for the backend but that isn't set in stone
 yet.

 Thanks any and all help.
 Ben

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





-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0021
東京都渋谷区恵比寿西2-3-2 NSビル6階
email: ianmle...@beproud.jp
TEL:03-6416-9836
FAX:03-6416-9837
http://www.beproud.jp/
===

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



Re: [google-appengine] When chaining tasks with the task queue, what if one task fails before queuing the next task?

2010-06-09 Thread Ian Lewis
Ryan,

Tasks are repeated until they return a HTTP success code. So your task
need to be indepotent in that if they should still do the right thing
(not write things twice etc.) if your task gets run more than once
because of failure.

So if one task in the chain has an error, then that task will be run
again and can complete the chain. You just have to make sure that if
it runs twice, it can continue processing where it left off.

Ian

On Thu, Jun 10, 2010 at 12:45 PM, Ryan ryeterr...@gmail.com wrote:
 I have a task I want to perform over and over.  If I chain tasks in
 the task queue, how can I make sure that the chain wont be broken by
 some error?

 Thanks for any help!

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





-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0021
東京都渋谷区恵比寿西2-3-2 NSビル6階
email: ianmle...@beproud.jp
TEL:03-6416-9836
FAX:03-6416-9837
http://www.beproud.jp/
===

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



[google-appengine] Re: google-app-engine-django

2009-08-12 Thread Ian Lewis

Andy,

I believe the project's goal was to support django 1.0 on appengine
but since 1.0 is now available there isn't much point to continuing
the project. I think that the appengine folks plan to have django
available on appengine without using google-app-engine-django

Ian

On Wed, Aug 12, 2009 at 7:31 PM, Andya...@robotlovesyou.com wrote:

 Hello

 Does anyone know what the current status of the google-app-engine-
 django project at http://code.google.com/p/google-app-engine-django/

 All the downloads have been deprecated for a few weeks now, though it
 is possible to get more recent releases from subversion.

 Thanks

 Andy
 




-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: Fetch with limit returning more results than limit

2009-07-15 Thread Ian Lewis
Ben,

It looks like filter will add a filter to the existing query object (instead
of creating a new query object like django does) but the fetch method will
retrieve the objects and return them immediately without modifying the
query. You should do something like:

items_list = items.fetch(10)

and then pass the items_list to your template.

Ian

On Wed, Jul 15, 2009 at 9:02 AM, Ben bhym...@gmail.com wrote:


 Hi, i am trying to limit the number of results returned on a query to
 10, but i seem to be getting all results back instead of just 10.  Am
 i missing something with the fetch syntax?

 -code-
items = Item.all()
items.filter('adminOnly = ', False)
items.filter('status = ', 2)
items.order('-wins')
items.fetch(limit=10)


template_values = {
  'userInfo': userInfo,
  'appDetails': appConfig.details,
  'items': items,
  'links': links,
  }

 -/code

 when i iterate through the results via django in the template it
 appears the query is properly applying the filters, and the order, but
 is returning all results that meet that criteria instead of just the
 first 10.
 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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] Smipple - Social Code Snippets

2009-06-29 Thread Ian Lewis
Hi all,

I just wanted to let everyone know about a site I created for sharing code
snippets in a social way. You can check it out at http://www.smipple.net/.
Smipple allows you to save, organize, and share snippets with others easily.
The best part though is that you can follow other people who have
interesting snippets and see the snippets that users you are following in
one place. You can also favorite any snippet that you find interesting so
you can retrieve it easily later.

Smipple is implemented using Google Appengine, Django, and appengine-patch
but that shouldn't stop anyone from contributing any kind of snippets that
they want. We'd love it if Ruby, PHP, Java, JavaScript or Perl developers
would use the site as well! What kind of social sharing site would it be if
there were only certain types of developers using it after all!

Happy Coding,

Ian

--~--~-~--~~~---~--~~
You 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: Smipple - Social Code Snippets

2009-06-29 Thread Ian Lewis
Nick,

Thanks for the suggestions. I really appreciate that you spent the time to
write them out. I could track them better if you left them as feedback
though. That's what the link is there for !!

Putting that aside I'll try to address your thoughts below:

On Mon, Jun 29, 2009 at 11:59 PM, Nick Johnson (Google) 
nick.john...@google.com wrote:


 Very nice! A few suggestions, if I may:


Thanks! You most certainly may.


 - It could use a tag cloud page.


Couldn't we all. I have a tag cloud on each user's profile (the look of
which undoubtably could be improved). What kind of cloud are you looking
for?


 - In FF2, the snippet page info box overlaps the code box on some
 pages. I think this is due to unavoidable wrapping issues with pre
 tags. Example:
 http://www.smipple.net/snippet/tmatsuo/LanguageChoiceFIeld%20for%20Kay


This will be the cause of many lost hairs. I'll do my best to fix the design
or get the designer to fix them.


 http://www.smipple.net/snippet/tmatsuo/LanguageChoiceFIeld%20for%20Kay -
 The info box could use more emphasis on the difference between
 headers and information. I quite like rietveld's approach, here.


By info box do you mean the yellowish box on the right side of user/snippet
detail pages?


 - Versioning and the ability to fork someone else's snippet (and track
 who's forked it) would really make my day, and cause me to switch from
 using gist.github.com.


There is already a piece of feedback about this.

http://smipple.uservoice.com/pages/21705-general/suggestions/239779-revision-history

Feel free to vote on it and add some comments. I don't think it specifically
mentions forking.


 - The ability to add my own tags to other peoples' snippets, or
 otherwise mark collections in a way that I can link someone to a
 collection I've made would be great.


Interesting. I'll consider it.


 - Are you considering releasing the source code?


Yes. Probably in the next month or so. It's currently maintained on
bitbucket.


 -Nick Johnson

 On Mon, Jun 29, 2009 at 7:37 AM, Ian Lewisianmle...@gmail.com wrote:
  Hi all,
 
  I just wanted to let everyone know about a site I created for sharing
 code
  snippets in a social way. You can check it out at
 http://www.smipple.net/.
  Smipple allows you to save, organize, and share snippets with others
 easily.
  The best part though is that you can follow other people who have
  interesting snippets and see the snippets that users you are following in
  one place. You can also favorite any snippet that you find interesting so
  you can retrieve it easily later.
 
  Smipple is implemented using Google Appengine, Django, and
 appengine-patch
  but that shouldn't stop anyone from contributing any kind of snippets
 that
  they want. We'd love it if Ruby, PHP, Java, JavaScript or Perl developers
  would use the site as well! What kind of social sharing site would it be
 if
  there were only certain types of developers using it after all!
 
  Happy Coding,
 
  Ian
 
  
 



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

 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: Smipple - Social Code Snippets

2009-06-29 Thread Ian Lewis
2009/6/30 Nick Johnson (Google) nick.john...@google.com


 2009/6/29 Ian Lewis ianmle...@gmail.com:
  Nick,
 
  Thanks for the suggestions. I really appreciate that you spent the time
 to
  write them out. I could track them better if you left them as feedback
  though. That's what the link is there for !!

 Good point. :)

  - It could use a tag cloud page.
 
  Couldn't we all. I have a tag cloud on each user's profile (the look of
  which undoubtably could be improved). What kind of cloud are you looking
  for?

 A site-wide one is what I was thinking of, though to be honest they're
 more for entertainment than to be helpful. If you haven't already,
 though, tag suggestions when submitting a new snippet are essential
 for reducing the number of variations of a single tag exist. See how
 stackoverflow does it, for example.


Will do.


  - In FF2, the snippet page info box overlaps the code box on some
   pages. I think this is due to unavoidable wrapping issues with pre
  tags. Example:
  http://www.smipple.net/snippet/tmatsuo/LanguageChoiceFIeld%20for%20Kay
 
  This will be the cause of many lost hairs. I'll do my best to fix the
 design
  or get the designer to fix them.

 As far as I know, no modern browsers handle this very well. Putting it
 to the left may be the better option.


I'll figure something out.


  - The info box could use more emphasis on the difference between
  headers and information. I quite like rietveld's approach, here.
 
  By info box do you mean the yellowish box on the right side of
 user/snippet
  detail pages?

 Yup.


By how rietveld's approach do you mean putting it at the top like here?
http://codereview.appspot.com/87067/patch/1/4

or on the left like here?:
http://codereview.appspot.com/87067/show


   - Versioning and the ability to fork someone else's snippet (and track
  who's forked it) would really make my day, and cause me to switch from
  using gist.github.com.
 
  There is already a piece of feedback about this.
 
 
 http://smipple.uservoice.com/pages/21705-general/suggestions/239779-revision-history
 
  Feel free to vote on it and add some comments. I don't think it
 specifically
  mentions forking.
 
 
  - The ability to add my own tags to other peoples' snippets, or
  otherwise mark collections in a way that I can link someone to a
  collection I've made would be great.
 
  Interesting. I'll consider it.

 My use-case here is a desire to accumulate a collection of useful
 datastore property classes I can link people to, even if I didn't
 write them all myself.


Something like a user tag feature would be interesting. It would kind of
make favorites obsolete as favorites are only a kind of user tag.

--~--~-~--~~~---~--~~
You 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: best away to know numbers of rows in a entities

2009-06-24 Thread Ian Lewis
If you used numeric keys then you can do pagination by key in order to get
all items from the datastore and count them. Basically this involves
querying the datastore several times, each time filtering on keys that are
greater than the highest key from the results of the previous query. You
won't want to do this often as it will likely take to long to do it in a
single request so you'll probably only want to do it once and store the
value in a counter for later use.

If you are using key names and don't have a way of pulling unique data, say
via a create time DateTimeProperty, then I'm afraid you're kind of out of
luck. You could try different filters and pull the data locally and compare
the keys to get unique entities but that sounds like a serious pain. Someone
else might have a better idea in this case.

Ian

On Wed, Jun 24, 2009 at 6:52 AM, alf alberto@gmail.com wrote:


 hi,

 assuming you have more than 1000 rows and you have no counter store in
 a entities what is the best away to know how many rows has a entitie.

 I think is better time to time request numbers of rows per entity to
 has a incremental counter and always have in mind insert and delete

 many thaks.
 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: Model with key_name not have key().id

2009-06-24 Thread Ian Lewis
Ritesh,

Keys can either have a numeric id or a key_name. In order to access the key
name for entities that you saved with a key_name you need to use the
key_name() method.

instead of obj.key().id(),  try obj.key().name()

Incedentally you can also use obj.key().id_or_name() to get either the id or
the name depending on which you are using.

On Wed, Jun 24, 2009 at 3:08 PM, Ritesh Nadhani rite...@gmail.com wrote:


 Hi

 When I save a model with (key_name=...) value, the key does not seem
 to have an id.

 Eg.

 Mode1(key_name='xxx').put()

 obj.key().id() - None

 Model2()

 obj2.key().id() - 1

 Is this intented?

 Can I have both key_name and id in a mode?

 --
 Ritesh
 http://www.riteshn.com

 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: Model with key_name not have key().id

2009-06-24 Thread Ian Lewis
Ritesh,

Also, BTW, The reason that obj1 and obj2 can have different types of keys is
because the key is not saved on a model level. It is saved at the entity
level. Each entity can have id or key_names.

Apparently obj2 was saved without a key name and was given a numeric key.
obj1 was saved with a key_name.

So to answer your question, yes, within a model/Kind you can have some
entities that have a numeric id and some that have key names.

Ian

2009/6/24 Ian Lewis ianmle...@gmail.com

 Ritesh,

 Keys can either have a numeric id or a key_name. In order to access the key
 name for entities that you saved with a key_name you need to use the
 key_name() method.

 instead of obj.key().id(),  try obj.key().name()

 Incedentally you can also use obj.key().id_or_name() to get either the id
 or the name depending on which you are using.


 On Wed, Jun 24, 2009 at 3:08 PM, Ritesh Nadhani rite...@gmail.com wrote:


 Hi

 When I save a model with (key_name=...) value, the key does not seem
 to have an id.

 Eg.

 Mode1(key_name='xxx').put()

 obj.key().id() - None

 Model2()

 obj2.key().id() - 1

 Is this intented?

 Can I have both key_name and id in a mode?

 --
 Ritesh
 http://www.riteshn.com

 



 --
 ===
 株式会社ビープラウド  イアン・ルイス
 〒150-0012
 東京都渋谷区広尾1-11-2アイオス広尾ビル604
 email: ianmle...@beproud.jp
 TEL:03-5795-2707
 FAX:03-5795-2708
 http://www.beproud.jp/
 ===




-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: Model with key_name not have key().id

2009-06-24 Thread Ian Lewis
Yes, that is correct.

2009/6/24 Ritesh Nadhani rite...@gmail.com


 Actually, what I meant was:

 I cannot have an entity with both key_name and id.

 They seem to be mutually exclusive for an entity.

 2009/6/23 Ian Lewis ianmle...@gmail.com:
  Ritesh,
 
  Also, BTW, The reason that obj1 and obj2 can have different types of keys
 is
  because the key is not saved on a model level. It is saved at the entity
  level. Each entity can have id or key_names.
 
  Apparently obj2 was saved without a key name and was given a numeric key.
  obj1 was saved with a key_name.
 
  So to answer your question, yes, within a model/Kind you can have some
  entities that have a numeric id and some that have key names.
 
  Ian
 
  2009/6/24 Ian Lewis ianmle...@gmail.com
 
  Ritesh,
 
  Keys can either have a numeric id or a key_name. In order to access the
  key name for entities that you saved with a key_name you need to use the
  key_name() method.
 
  instead of obj.key().id(),  try obj.key().name()
 
  Incedentally you can also use obj.key().id_or_name() to get either the
 id
  or the name depending on which you are using.
 
  On Wed, Jun 24, 2009 at 3:08 PM, Ritesh Nadhani rite...@gmail.com
 wrote:
 
  Hi
 
  When I save a model with (key_name=...) value, the key does not seem
  to have an id.
 
  Eg.
 
  Mode1(key_name='xxx').put()
 
  obj.key().id() - None
 
  Model2()
 
  obj2.key().id() - 1
 
  Is this intented?
 
  Can I have both key_name and id in a mode?
 
  --
  Ritesh
  http://www.riteshn.com
 
 
 
 
 
  --
  ===
  株式会社ビープラウド  イアン・ルイス
  〒150-0012
  東京都渋谷区広尾1-11-2アイオス広尾ビル604
  email: ianmle...@beproud.jp
  TEL:03-5795-2707
  FAX:03-5795-2708
  http://www.beproud.jp/
  ===
 
 
 
  --
  ===
  株式会社ビープラウド  イアン・ルイス
  〒150-0012
  東京都渋谷区広尾1-11-2アイオス広尾ビル604
  email: ianmle...@beproud.jp
  TEL:03-5795-2707
  FAX:03-5795-2708
  http://www.beproud.jp/
  ===
 
  
 



 --
 Ritesh
 http://www.riteshn.com

 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: best away to know numbers of rows in a entities

2009-06-24 Thread Ian Lewis
2009/6/24 Nick Johnson (Google) nick.john...@google.com

 Pagination by key works regardless of if you're using key names or IDs.


Good to know. Sorry about the misinformation. I had forgotten that entities
are ordered in the datastore by their key.

BTW, here is an article in the documentation about pagination:
http://code.google.com/appengine/articles/paging.html

Read the part called Paging without a property for information on how to
paginate by key.

Here is information about queries on keys and contains the info about how
keys are sorted by id/keyname:
http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html#Queries_on_Keys





-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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 do I limit searchable_text_index using SearchableModel?

2009-06-23 Thread Ian Lewis
ogterran,

It should do one for the search and then one for each item in the search
result. If you are worried performance on the calls to the datastore you can
modify this code to make the ProductSearchIndex entity be a child of the
Product entity and  use a key only query to retrieve only the keys for the
search index entities (since we only really care about the Products anyway).

This will still to the same number of queries but will avoid the overhead of
deserializing the ProductSearchIndex objects (and the associated index list
property which might be long).

Something like the following should work:

class Product(db.Model):
   pid = db.StringProperty(required=True)
   title = db.StringProperty(required=True)
   site = db.StringProperty(required=True)
   url = db.LinkProperty(required=True)

class ProductSearchIndex(search.SearchableModel):
   # parent == Product
   title = db.StringProperty(required=True)

...
# where you write the Product
product = Product(pid = pid, title=title, site=site, url=url)
product.put()
index = ProductSearchIndex(parent=product, title=title)
index.put()

...
# where you search
keys = ProductSearchIndex.all(keys_only=True).search(query).fetch(100)
for key in keys:
product = Product.get(key.parent())
print product.url


On Tue, Jun 23, 2009 at 5:59 PM, ogterran jonathanh...@gmail.com wrote:


 Hi Ian,

 Thanks for the response.
 I have one question on number of datastore calls.
 How many datastore calls is the query below making?
 Is it 1 or 100?

  class Product(db.Model):
 pid = db.StringProperty(required=True)
 title = db.StringProperty(required=True)
 site = db.StringProperty(required=True)
 url = db.LinkProperty(required=True)
 
  class ProductSearchIndex(search.SearchableModel):
 product = db.ReferenceProperty(Product)
 title = db.StringProperty(required=True)

 query = ProductSearchIndex.all().search(searchtext)
 results = query.fetch(100)
 for i, v in enumerate(results):
print v.product.url

 Thanks
 Jon

 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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 do I limit searchable_text_index using SearchableModel?

2009-06-23 Thread Ian Lewis
Nick,

But he is also doing v.product which will do a get() by key for each Product
entity will it not?

On Tue, Jun 23, 2009 at 7:14 PM, Nick Johnson (Google) 
nick.john...@google.com wrote:

 Hi ogterran,

 On Tue, Jun 23, 2009 at 9:59 AM, ogterran jonathanh...@gmail.com wrote:


 Hi Ian,

 Thanks for the response.
 I have one question on number of datastore calls.
 How many datastore calls is the query below making?
 Is it 1 or 100?

  class Product(db.Model):
 pid = db.StringProperty(required=True)
 title = db.StringProperty(required=True)
 site = db.StringProperty(required=True)
 url = db.LinkProperty(required=True)
 
  class ProductSearchIndex(search.SearchableModel):
 product = db.ReferenceProperty(Product)
 title = db.StringProperty(required=True)

 query = ProductSearchIndex.all().search(searchtext)
 results = query.fetch(100)
 for i, v in enumerate(results):
print v.product.url


 Only one query - your search terms are ANDed together.

 -Nick Johnson



 Thanks
 Jon





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


 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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 Item Keys and Indexing with a Constant Prefix

2009-06-23 Thread Ian Lewis
The longer the keys are the worse performance is so I would just add a
single known character prefix to your keys.

A single character shouldn't have any noticable impact on performance.

On Tue, Jun 23, 2009 at 7:14 PM, Koen Bok k...@madebysofa.com wrote:


 I want my datastore keys to be uuid's (hex presentation), but they can
 start with a digit which is not allowed. So I figured I'd add a
 constant prefix.

 Could that have a negative impact on the index the datastore builds?
 It shouldn't right? Just double checking :-)
 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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 do I limit searchable_text_index using SearchableModel?

2009-06-23 Thread Ian Lewis
Argh, I didn't test it to make sure it actually worked. Is there a bug I can
star for this issue?

2009/6/23 Nick Johnson (Google) nick.john...@google.com

 You're quite right. This will be fixed in a future release.

 -Nick Johnson

 2009/6/23 acuth adrian.cuthb...@gmail.com


 Whenever I've tried doing a SearchableModelDescendant.all
 (keys_only=True).search(query) construction, it has failed saying it
 doesn't understand the keys_only parameter - see 'Using __key__ and
 SearchableModel
 http://groups.google.com/group/google-appengine/browse_thread/thread/73dc1dc31bfd497b

 Do you know if this was fixed in a recent release?

 Adrian


 On Jun 23, 11:33 am, Nick Johnson (Google) nick.john...@google.com
 wrote:
  2009/6/23 Ian Lewis ianmle...@gmail.com
 
   ogterran,
 
   It should do one for the search and then one for each item in the
 search
   result.
 
  Not quite - it will do one _query_, and multiple gets. A get is much,
 much
  cheaper than a query. You're right about the number of round-trips,
 though.
 
   If you are worried performance on the calls to the datastore you can
 modify
   this code to make the ProductSearchIndex entity be a child of the
 Product
   entity and  use a key only query to retrieve only the keys for the
 search
   index entities (since we only really care about the Products anyway).
 
  Good idea!
 
 
 
 
 
   This will still to the same number of queries but will avoid the
 overhead
   of deserializing the ProductSearchIndex objects (and the associated
 index
   list property which might be long).
 
   Something like the following should work:
 
   class Product(db.Model):
  pid = db.StringProperty(required=True)
  title = db.StringProperty(required=True)
  site = db.StringProperty(required=True)
  url = db.LinkProperty(required=True)
 
   class ProductSearchIndex(search.SearchableModel):
  # parent == Product
  title = db.StringProperty(required=True)
 
   ...
   # where you write the Product
   product = Product(pid = pid, title=title, site=site, url=url)
   product.put()
   index = ProductSearchIndex(parent=product, title=title)
   index.put()
 
   ...
   # where you search
   keys = ProductSearchIndex.all(keys_only=True).search(query).fetch(100)
   for key in keys:
   product = Product.get(key.parent())
   print product.url
 
  This can be done much more efficiently:
keys = ProductSearchIndex.all(keys_only=True).search(query).fetch(100)
products = db.get(x.parent() for x in keys)
 
  Now you're down to just two round-trips!
 
  -Nick Johnson
 
 
 
 
 
   On Tue, Jun 23, 2009 at 5:59 PM, ogterran jonathanh...@gmail.com
 wrote:
 
   Hi Ian,
 
   Thanks for the response.
   I have one question on number of datastore calls.
   How many datastore calls is the query below making?
   Is it 1 or 100?
 
class Product(db.Model):
   pid = db.StringProperty(required=True)
   title = db.StringProperty(required=True)
   site = db.StringProperty(required=True)
   url = db.LinkProperty(required=True)
 
class ProductSearchIndex(search.SearchableModel):
   product = db.ReferenceProperty(Product)
   title = db.StringProperty(required=True)
 
   query = ProductSearchIndex.all().search(searchtext)
   results = query.fetch(100)
   for i, v in enumerate(results):
  print v.product.url
 
   Thanks
   Jon
 
   --
   ===
   株式会社ビープラウド  イアン・ルイス
   〒150-0012
   東京都渋谷区広尾1-11-2アイオス広尾ビル604
   email: ianmle...@beproud.jp
   TEL:03-5795-2707
   FAX:03-5795-2708
  http://www.beproud.jp/
   ===
 
  --
  Nick Johnson, App Engine Developer Programs Engineer
  Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration
 Number:
  368047




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

 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: Inconsistent memcache behaviour

2009-06-18 Thread Ian Lewis
While memcache data is volitile and there is no guarantee that the data that
you put into the cache will be there, memcache shouldn't be giving you
different values for different requests. Are you sure the key is the same
and that it's not being set somewhere else in your code?

On Fri, Jun 19, 2009 at 5:09 AM, morten mor...@fusemail.com wrote:


 If that interpretation is correct then we think that there is a
 problem somewhere, because we are seeing very inconsistent behaviour
 on memcache (i.e. different values coming back for different requests
 for the same memcache key)




-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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 do I limit searchable_text_index using SearchableModel?

2009-06-10 Thread Ian Lewis
ogterran,

Unfortunately the SearchableModel indexes all StringProperties and
TextProperties in the model. You will need to create another model that
contains only the items you want to index. Something like:

class Product(db.Model):
   pid = db.StringProperty(required=True)
   title = db.StringProperty(required=True)
   site = db.StringProperty(required=True)
   url = db.LinkProperty(required=True)

class ProductSearchIndex(search.SearchableModel):
   product = db.ReferenceProperty(Product)
   title = db.StringProperty(required=True)

On Wed, Jun 10, 2009 at 6:11 PM, ogterran jonathanh...@gmail.com wrote:


 Hi,

 When I create a datastore model using SearchableModel, it creates a
 __searchable_text_index column, for full text search.
 If I don't want all the columns to be part of the index for search,
 how do I exclude columns for full text search?

 i.e.
 I don't want pid, site, and url to be part of the full text search.

 class Product(search.SearchableModel):
pid = db.StringProperty(required=True)
title = db.StringProperty(required=True)
site = db.StringProperty(required=True)
url = db.LinkProperty(required=True)

 Thanks
 Jon
 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: Auditing mechanism using BigTable

2009-06-09 Thread Ian Lewis
Pranav,

The only way I can think of is to use the date/time in your key names in
some way. That would allow you to save the same items in a completely time
separate space. You could also use an indexed property on the entity to
allow you to filter by time.

On Tue, Jun 9, 2009 at 11:13 AM, Pranny pra...@gmail.com wrote:


 Hi folks,

 I need some kind of auditing mechanism in my app. What i want is data
 storage on a 'time axis' too. I read that BigTable stores data in many
 dimensions, one of which is time. Is there some way we can use this
 feature of BigTable in our apps?
 If not, can someone suggest me an alternative, that is not so hungry
 in terms of datastore limits and quotas?

 --
 Pranav Prakash

 This life is more than ordinary
 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: can pyamf run on app-engine-patch?

2009-06-09 Thread Ian Lewis
What kind of exceptions are you getting?

On Tue, Jun 9, 2009 at 7:34 PM, capoista stewyma...@yahoo.co.uk wrote:


 I am trying to set up a simple 'hello world' test of pyamf working on
 the app-engine-patch but my simple gateway.py file causes major
 exceptions.

 Does anyone know if it is possible to use pyamf on the app-engine-
 patch. Any example links would be greatly appreciated.

 Many thanks in advance
 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: Low Overhead CapabilityDisabledError Check

2009-06-08 Thread Ian Lewis
Greg,

Please star this issue.
http://code.google.com/p/googleappengine/issues/detail?id=1116

One person noted in the comments that you could cache a system wide value
when the first put request fails so that you don't have to do a test put()
on every request to your application.

It would be interesting if run_in_transaction throws this exception even
with dummy functions but I would guess that it doesn't throw the error
unless it actually tries to a write.

Ian

On Mon, Jun 8, 2009 at 2:58 PM, Greg g.fawc...@gmail.com wrote:


 With the upcoming maintenance, I want to add a check at the start of
 the handler to see if I should display a maintenance notice. This will
 run on every request, so it would be good to use as lightweight a
 check as possible. The documentation says CapabilityDisabledError is
 thrown by db.Model.put(), db.Model.delete(), and
 db.run_in_transaction().

 My question is this: can I use run_in_transaction() with a dummy
 function - testing without the overhead of actually doing a put()?

 I realise that in this case memcache is also being disabled, so I can
 test by doing a memcache.set() instead, but it would be nice to
 develop a function that can be called to test both, for cases when
 maintenance only affects one or the other. Also could a Googler
 comment on how syncronised the disabling of datastore and memcache
 are? Milliseconds, seconds, or minutes?

 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: Uneven response time between connection to server to first byte sent

2009-06-08 Thread Ian Lewis
Anders,

For ajax calls you might consider creating a very simple handler that uses
as few modules as possible when performing ajax calls. Then put that as a
separate url in your app.yaml. In that case appengine would only load the
modules it needs to serve that request and would hopefully not take as long
(as say to load a whole framework like django). That might help reduce the
latency of some of your ajax calls.

Ian

On Mon, Jun 8, 2009 at 3:04 PM, Anders i...@blabline.com wrote:


 Ok, just one more comment. Both serious and tongue-in-cheek style.

 To use a metaphor, I hope that Google App Engine will become like a
 real car and not be a plastic toy car for kids. Maybe someone from
 Microsoft or Amazon has managed to infiltrate the management of App
 Engine at Google. Not only do (did) the sometimes exceedingly long
 start-up times for application instances suck, there is also (at least
 was) a lack of clock synchronization between GAE servers. This means
 that an application like Twitter is not possible to implement using
 Google App Engine. For example, the Twitter API allows max 50
 something calls per minute in some cases. That's impossible to
 implement reliably without predictable clock synchronization between
 servers.
 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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 reference model property with a variable?

2009-06-08 Thread Ian Lewis
AFAIK you could just do this instead of doing an eval and setting the
properties using setattr:

m = p_model(**kwargs)

where kwargs is the dictionary of properties that you are using to create
your model instance.

On Mon, Jun 8, 2009 at 2:33 PM, Ethan Post post.et...@gmail.com wrote:

 I figured this out, so no need to continue using copy. Been a while since I
 looked at Python. Sorry if these questions are obvious. Everything is
 working like a charm now.

 m = eval(p_model + '()')



 On Sun, Jun 7, 2009 at 5:45 PM, Ethan Post post.et...@gmail.com wrote:

 Now that I have the solution to my original problem I am trying to make a
 few improvements. I want to be able to pass a list of dictionaries or a
 single dictionary and multiple records in a single put. The code is working
 but I have a couple issues. One, I pass in p_model but I only use it to
 perform a copy, are there any known issues with using copy on a db.model
 object? Should I use deepcopy instead?

 Also, can I use getattr or setattr to instantiate an entity instance in
 Dict_To_Model2 instead of passing in the entity? I can't figure it out. This
 would be the line m = Foo(). Instead I would just pass in the name as a
 string. I wouldn't need to use copy if I could figure out how to do this.



 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: HTML escape filter fails in templates

2009-06-08 Thread Ian Lewis
Issac,

You cannot include a space after the | for filters. Try {{ event.code|escape
}}.

BTW: django does auto-escaping and you shouldn't need the escape filter
unless you have turned auto-escaping off. Turning auto-escaping off is
something I personally wouldn't recommend.

On Mon, Jun 8, 2009 at 5:43 PM, Issac Trotts issac.tro...@gmail.com wrote:

 Hi folks,


 I put this in a template file


 {{ event.code | escape }}


 and got this result:


 TemplateSyntaxError: Could not parse the remainder:  | escape

 From what I gather, escape is supposed to be built in to Django 0.96
 templates, so it seems like this should work. Have I left something out?

 Thanks,
 Issac


 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: ReferenceProperty with key_name ?

2009-06-08 Thread Ian Lewis
Yes, but using key names avoids the problem of not being able to set the key
that is inherent with integer keys right?

2009/6/8 Tom Wu service.g2...@gmail.com

 Hi Ian,

 You can backup the real parent model and child model with ReferenceProperty
 to local development server or another gae app.
 And restore to original app, then you will find out the ReferenceProperty(
 db.key) will be a problem.


 Best Regards
 Tom Wu



 2009/6/8 Ian Lewis ianmle...@gmail.com

  Is there a particular reason you need to do something like this?
 ReferenceProperty should work whether you use an integer or key_name as the
 key to your entities.

 On Mon, Jun 8, 2009 at 9:09 AM, Tom Wu service.g2...@gmail.com wrote:

 Thanks Chris.

 This is what I need. You the Man.

 Have this run in GAE instead of local development server ?


 Best Regards
 Tom Wu


 2009/6/8 Chris Tan csy...@gmail.com


 I wrote some custom properties awhile back which may help:

 http://gist.github.com/109193

 They are untested, so proceed with caution.

 On Jun 7, 12:29 am, Tom Wu service.g2...@gmail.com wrote:
  Hi All,
 
  Since the db.key is auto generate by system. We can't assign the value
 of
  db.key.
 
  If ReferenceProperty can reference with key_name, it will make easier
 for us
  to backup and restore the Reference model.
 
  Just a idea for me, Any suggestion will be appreciated.
 
  Best Regards
  Tom Wu







 --
 ===
 株式会社ビープラウド  イアン・ルイス
 〒150-0012
 東京都渋谷区広尾1-11-2アイオス広尾ビル604
 email: ianmle...@beproud.jp
 TEL:03-5795-2707
 FAX:03-5795-2708
 http://www.beproud.jp/
 ===





 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: ReferenceProperty with key_name ?

2009-06-07 Thread Ian Lewis
Is there a particular reason you need to do something like this?
ReferenceProperty should work whether you use an integer or key_name as the
key to your entities.

On Mon, Jun 8, 2009 at 9:09 AM, Tom Wu service.g2...@gmail.com wrote:

 Thanks Chris.

 This is what I need. You the Man.

 Have this run in GAE instead of local development server ?


 Best Regards
 Tom Wu


 2009/6/8 Chris Tan csy...@gmail.com


 I wrote some custom properties awhile back which may help:

 http://gist.github.com/109193

 They are untested, so proceed with caution.

 On Jun 7, 12:29 am, Tom Wu service.g2...@gmail.com wrote:
  Hi All,
 
  Since the db.key is auto generate by system. We can't assign the value
 of
  db.key.
 
  If ReferenceProperty can reference with key_name, it will make easier
 for us
  to backup and restore the Reference model.
 
  Just a idea for me, Any suggestion will be appreciated.
 
  Best Regards
  Tom Wu



 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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 Files - filename

2009-06-07 Thread Ian Lewis
did something like self.request.FILES[myfile].name not work?

Since uploading files is a fairly common use case, would it be a good idea
to get this added to the documentation?

On Mon, Jun 8, 2009 at 3:59 AM, Todd toddaol...@gmail.com wrote:


 It took me hours to discover this, and I wanted to share, since I
 could not find it anywhere else on the net.

 To get the filename of an uploaded file ( via the Content-Disposition
 in the HTTP POST ), use:

 self.request.params[form element name with file].filename

 I suppose this may have been obvious to some, but using
 self.request.get() always returns the String value of the form
 parameter.  Appengine overrides the WebOb request to abstract the
 cgi.FieldStorage object ( which holds the filename ) from you.

 Hope this helps.

 -Todd
 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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 - Too many continues

2009-06-07 Thread Ian Lewis
Just a related thought, this kind of thing should be a non-issue once the
background processes api is released which should be soon. Long running
processes should probably be migrated to that once it's released rather than
using cron since you're not limited to how often cron runs.

On Mon, Jun 8, 2009 at 3:35 AM, Wooble geoffsp...@gmail.com wrote:


 No, urlfetch works in in a cron job.  You just can't try to redirect
 the browser that's visiting your site to run the cron job.

 On Jun 6, 3:47 pm, Alain de R aderay...@gmail.com wrote:
  does this mean that I cannot use urlFetch in a cron job ?
 
  On Apr 16, 10:05 pm, Anthony  Baxter anthonybax...@gmail.com wrote:
 
   You can't use 302 redirects to extend a cron jobs lifetime, sorry.
 
   Anthony
 
   On Apr 17, 11:48 am, Ben ben.hedring...@gmail.com wrote:
 
So trying outcron, I use a outside box tocrontoday and I use the
common App Engine 302 method to avoid deadline exceeded errors (hand
to another script via 302 for each item rather than trying to do all
in one shot). When I move my job over to App EnginecronI get too
many continues can someone tell me how many 302s it will follow and
assuming it is relatively limited do I have any options here?
 
Thanks,
-Ben
 
 
 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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's and ReferenceProperty and KindError in django on appengine

2009-05-30 Thread Ian Lewis
Nick,

Are you using something like appengine-patch or appengine_django to write
your application?

On Sat, May 30, 2009 at 3:49 AM, Nick Johnson (Google) 
nick.john...@google.com wrote:


 Hi roderic,

 You can't use a an App Engine datastore ReferenceProperty to refer to
 a Django model instance.

 -Nick Johnson

 On Wed, May 27, 2009 at 12:51 PM, roderic rode...@gmail.com wrote:
 
  Hello,
  The problem that I'm having is that my cron job seems to break on the
  import of my models. The traceback looks like this:
 
  class 'google.appengine.ext.db.KindError': reference_class must be
  Model or _SELF_REFERENCE
  Traceback (most recent call last):
   File /base/data/home/apps/rcapp01/1.333786861669922384/cron.py,
  line 1, in module
 from callme.models import CAction
   File /base/data/home/apps/rcapp01/1.333786861669922384/callme/
  models.py, line 9, in module
 class CUser(db.Model):
   File /base/data/home/apps/rcapp01/1.333786861669922384/callme/
  models.py, line 11, in CUser
 user = db.ReferenceProperty(User)
   File /base/python_lib/versions/1/google/appengine/ext/db/
  __init__.py, line 2577, in __init__
 raise KindError('reference_class must be Model or
  _SELF_REFERENCE')
 
  The code in question deals with the ReferenceProperty that I am using
  to extend the basic django user. The code for that looks like this:
 
  from google.appengine.ext import db
  from django.contrib.auth.models import User
 
  # Create your models here.
  class CUser(db.Model):
 user = db.ReferenceProperty(User)
 
  I don't seem to have much problem interacting with the profile through
  the web requests, but when the cron job tries to run it blows up. I am
  not going to include the cron job as you can see that the traceback
  happens on the import.
 
  Any thoughts on this? Why would the cron job be blowing up on import?
  Have I set something up wrong? The development environment doesn't
  seem to blow up when this happens.
 
  Thanks in advance.
 
  

 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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's and ReferenceProperty and KindError in django on appengine

2009-05-30 Thread Ian Lewis
Sorry, I meant roderic,

2009/5/30 Ian Lewis ianmle...@gmail.com

 Nick,

 Are you using something like appengine-patch or appengine_django to write
 your application?


 On Sat, May 30, 2009 at 3:49 AM, Nick Johnson (Google) 
 nick.john...@google.com wrote:


 Hi roderic,

 You can't use a an App Engine datastore ReferenceProperty to refer to
 a Django model instance.

 -Nick Johnson

 On Wed, May 27, 2009 at 12:51 PM, roderic rode...@gmail.com wrote:
 
  Hello,
  The problem that I'm having is that my cron job seems to break on the
  import of my models. The traceback looks like this:
 
  class 'google.appengine.ext.db.KindError': reference_class must be
  Model or _SELF_REFERENCE
  Traceback (most recent call last):
   File /base/data/home/apps/rcapp01/1.333786861669922384/cron.py,
  line 1, in module
 from callme.models import CAction
   File /base/data/home/apps/rcapp01/1.333786861669922384/callme/
  models.py, line 9, in module
 class CUser(db.Model):
   File /base/data/home/apps/rcapp01/1.333786861669922384/callme/
  models.py, line 11, in CUser
 user = db.ReferenceProperty(User)
   File /base/python_lib/versions/1/google/appengine/ext/db/
  __init__.py, line 2577, in __init__
 raise KindError('reference_class must be Model or
  _SELF_REFERENCE')
 
  The code in question deals with the ReferenceProperty that I am using
  to extend the basic django user. The code for that looks like this:
 
  from google.appengine.ext import db
  from django.contrib.auth.models import User
 
  # Create your models here.
  class CUser(db.Model):
 user = db.ReferenceProperty(User)
 
  I don't seem to have much problem interacting with the profile through
  the web requests, but when the cron job tries to run it blows up. I am
  not going to include the cron job as you can see that the traceback
  happens on the import.
 
  Any thoughts on this? Why would the cron job be blowing up on import?
  Have I set something up wrong? The development environment doesn't
  seem to blow up when this happens.
 
  Thanks in advance.
 
  

 



 --
 ===
 株式会社ビープラウド  イアン・ルイス
 〒150-0012
 東京都渋谷区広尾1-11-2アイオス広尾ビル604
 email: ianmle...@beproud.jp
 TEL:03-5795-2707
 FAX:03-5795-2708
 http://www.beproud.jp/
 ===




-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: Not working app-engine-patch-sample-1.0 sample application

2009-05-29 Thread Ian Lewis
You will need to provide a way for appengine to email to your e-mail account
if you want to be able to have it send e-mail to you. This is done by
providing the information about your SMTP server in the settings.py or by
passing the --enable_sendmail or --smtp_host, --smtp_port, --smtp_user, and
--smtp_password options to manage.py runserver. --enable_sendmail will only
work if you have sendmail on your machine obviously.

Setting the email options in your settings.py looks like it does in django:

EMAIL_HOST=localhost
EMAIL_PORT=25
EMAIL_HOST_USER=
EMAIL_PASSWORD=

I'm really not sure how well setting the smtp options work as I use the
sendmail option locally. I do know there was an issue with setting the SMTP
options on linux.
http://code.google.com/p/googleappengine/issues/detail?id=626q=smtpcolspec=ID%20Type%20Status%20Priority%20Stars%20Owner%20Summary%20Log%20Component

On Fri, May 29, 2009 at 10:11 PM, S K sksk...@gmail.com wrote:

 Hi All,
 can any one tell that in this link  *
 http://code.google.com/p/app-engine-patch/ *one sample application(
 *app-engine-patch-sample-1.0*) , I have downloaded and run the application
 but in that registration for after enter all the field and submit the but is
 saying that *In order to activate your account please check your email and
 click on the activation link.* but I haven't received any mail to activate
 my account, If any one helps means its useful for my coding, kindly help me
 on this, its urgent for me


 Thanks in Advance


 Regards
 SK




 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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 no full-text search? Mystified by the priorities.

2009-05-01 Thread Ian Lewis
This is also not currently working on deployed appengine.

On Fri, May 1, 2009 at 5:44 AM, Waldemar Kornewald wkornew...@gmail.comwrote:


 On Apr 30, 10:27 pm, dalenewman dalenew...@gmail.com wrote:
  Looks like the java community already has this search business all
  figured out :-)
 
  http://www.kimchy.org/searchable-google-appengine-with-compass/
 
  I guess this Compass thing must use Lucene and store the Lucene
  indexes in the GAE data store.  Reminder; this is a guess based on a
  quick skim of the blog post (link above).
 
  Only time will tell if this works out.

 I highly doubt that the index can be updated efficiently in a single
 request. This might work for a handful entities on the local
 development server, but I'm sure it'll quickly break down if you have
 a few 100 or 1000 items. Otherwise, if it were that trivial Google
 could've provided that feature a long time ago.

 I could imagine that if you used a script to remotely update the
 search index you could actually get acceptable search performance
 (i.e., on the already-built index), but I don't have any hard numbers
 here and Shay Banon didn't know if the port would perform well on App
 Engine, either.

 Bye,
 Waldemar Kornewald
 --
 Use Django on App Engine with app-engine-patch:
 http://code.google.com/p/app-engine-patch/
 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: Does it support Ajax Java Framework? ex. GWT, ZK

2009-04-07 Thread Ian Lewis

Robbie,

Please check out the documentation. The java applications are deployed
as a java servlet container (war file et. al.)

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

GAE is server side so it has nothing to do with GWT or client side
applications but the new Google Plugin for eclipse lets you write all
your code in Java and supports GWT.

http://code.google.com/eclipse/

Ian

On Wed, Apr 8, 2009 at 1:09 PM, Robbie Cheng robbiech...@gmail.com wrote:

 It will be great if it supports Java Ajax frameworks, for example GWT,
 ZK, and others?
 Both of them demonstrates great ability to enrich web application.

 Or can we upload our own jar files?

 Thanks,
 Robbie

 




-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: MySQL in the cloud?

2009-04-07 Thread Ian Lewis

Ben,

The short answer is no.

The long answer is no, MySQL doesn't scale automatically so GAE only
supports the datastore which is based on Google's scalable Big Table
implementation.

Ian

On Wed, Apr 8, 2009 at 1:26 PM, Ben valentine@gmail.com wrote:

 Can we run a mysql database in the engine?

 




-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: Accessing the datastore remotely with remote_api

2009-03-25 Thread Ian Lewis

Tom,

You can't use the remote api from appengine. It's for use in accessing
the data from applications outside appengine.

AFAICT, trying to connect multiple apps to a single datasource to get
around resource limitations is a violation of google's terms of
service. You might want to take a look at them.

http://code.google.com/appengine/terms.html

Ian

On Wed, Mar 25, 2009 at 7:32 PM, service G2100 service.g2...@gmail.com wrote:
 Yes, I am trying to use remote_api from GAE.

 Since each application has resource limitation.

 Just trying to use multiple apps to connect single data source.


 Best Regards
 Tom Wu


 2009/3/25 GregF g.fawc...@gmail.com

 It sounds like you are trying to use remote_api from GAE,  rather than
 your local machine. GAE libraries have sockets locked down to prevent
 abuse, which may be the source of your problem. On GAE, the only
 network option you have is url_fetch.





 




-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: crazy ORDER BY bug...?!

2009-03-22 Thread Ian Lewis

David,

Please see this issue,

http://code.google.com/p/googleappengine/issues/detail?id=901q=order%20bycolspec=ID%20Type%20Status%20Priority%20Stars%20Owner%20Summary%20Log%20Component

On Mon, Mar 23, 2009 at 10:38 AM, David I. Murray tas...@gmail.com wrote:

 Consider these 2 queries:

 Query 1:
 SELECT * FROM Action WHERE study= '2a' and type = 'o' ORDER BY __key__

 Query 2:
 SELECT * FROM Action WHERE study= '2a' and type = 'o'

 Is there any reason why query 1 would return fewer results than query
 2? Because when I run them (just via the admin console), this is what
 happens... I am convinced it's an App Engine bug. Here's my action
 model:

 class Action(db.Model):
  participantID = db.StringProperty()
  study = db.StringProperty()
  date = db.IntegerProperty()
  type = db.StringProperty()
  value = db.TextProperty()

 Any help is greatly appreciated!

 Thanks,
 Dave
 




-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: from google.appengine.ext

2009-03-18 Thread Ian Lewis
Gustavo,

google.appengine.ext contains a number of things not the least of which is
the datastore api. You will probably have the most success searching the
group archives.

Ian

On Thu, Mar 19, 2009 at 8:18 AM, Lord Gustavo Miguel Angel 
goosfanc...@gmail.com wrote:

  Hi,

 I need information about google.appendine.ext,
 some link?

 Thank´s

 Gustavo.
 Argentina.

 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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 want more fields than in DB models?

2009-03-04 Thread Ian Lewis
Are you doing an event.put() to save each event?

On Wed, Mar 4, 2009 at 1:32 PM, disorderdev disorder...@gmail.com wrote:


 Hi, I'm a newbie here, both python and app engine. a few questions:
  I store some fields in DB, but when show message on Web, I need more
 fields, most of them are calculated according to fields in DB, For now
 I don't want to do the calculating on web, but when I add some fields
 to the DB model class, the web dose not recognize them, all values are
 None, what should I do?

 For example, I have a class
 class Event(db.Model) :
owner = db.UserProperty()
title = db.StringProperty()
content = db.StringProperty(multiline = True)
status = None
color = None

 when showing events on web, I want 'color' and 'status', so after
 retrieve the data from DB, I do the following:

for event in events :
logger.info(event.status)
logger.info(event.color);
event.create_time = datetime.now()
event.status = Finished
event.color = green

 but on web, they are still None.

 BTW: I have to add status and color in class, or these fields are not
 recognized.

 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: Deleting CounterShards

2009-03-02 Thread Ian Lewis
Bill,

The docs say otherwise. count() on a query object returns a maximum of 1000.
http://code.google.com/appengine/docs/python/datastore/queryclass.html#Query_count

Sharded counters are used to ease contention for highly updated objects but
that doesn't downplay the need for counters. You need to either put a
counter on a separate entity or create sharded counter if you want to count
more than 1000 entities.

Ian

On Mon, Mar 2, 2009 at 5:40 PM, Bill billk...@gmail.com wrote:


 You can count well over 1000 objects -- the limitation is in the
 fetching, but that's not the reason for sharded counters in Bloog.

 I wrote Bloog way back when App Engine was new and I was trying out
 different best practices for datastore ops.  Sharded counters are a
 way to handle heavily-used counters, e.g. if the counter was getting
 updated dozens of times per second.  If you have that many increments/
 decrements on a counter, if you put the counter in a single integer
 property, you'd start getting write contention.

 In retrospect, doing the sharded counter in Bloog was complete
 overkill.  It was useful to me at the time, because I was learning.
 But the next version of Bloog will likely use a single integer
 property for the counter and scrap the sharded counter.
 -Bill

 On Mar 1, 9:11 pm, Ian Lewis ianmle...@gmail.com wrote:
  Krishna,
 
  The datastore can only return or count up to 1000 objects so if you have
  more than 1000 objects in the database you cannot count them without a
  counter. I assume the code in Bloog is keeping counts of objects in case
 it
  runs up against this limitation.
 
  Ian
 
 
 
  On Mon, Mar 2, 2009 at 2:02 PM, Krishna krishnapatel...@gmail.com
 wrote:
 
   Ian,
 
   I'm using some open source code (Bloog) and I don't really understand
   how it works. So I'll trust your cautious approach although I don't
   quite understand why something would need to keep counts of objects
   in the datastore. Best not to meddle although I was hoping to clean
   things up if I could.
 
   Thank you for responding.
   Krishna
 
   On Mar 1, 11:31 pm, Ian Lewis ianmle...@gmail.com wrote:
Krishna,
 
Anything you see in the data viewer is created by some application
 code.
   It
wouldn't be put there by google appengine specifically. That said it
   looks
like something is using a sharded counter to keep counts of objects
 in
   the
datastore or something similar. This data would not likely be
 regenerated
   if
deleted, it would likely reset all the counters to zero so I would
 leave
   it
alone.
 
Ian
 
On Mon, Mar 2, 2009 at 9:34 AM, Krishna krishnapatel...@gmail.com
   wrote:
 
 On the Data Viewer I have an entity called CounterShards. I
 considered
 deleting some extraneous data there but was afraid it would blow
 something up. If I delete data here, will it be regenerated
 automatically or should I leave it alone?
 
--
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708http://www.beproud.jp/
===
 
  --
  ===
  株式会社ビープラウド  イアン・ルイス
  〒150-0012
  東京都渋谷区広尾1-11-2アイオス広尾ビル604
  email: ianmle...@beproud.jp
  TEL:03-5795-2707
  FAX:03-5795-2708http://www.beproud.jp/
  ===
 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: Print-friendly Google App Engine documentation

2009-03-02 Thread Ian Lewis
Aha, I was hoping you had worked up an html scraper or something to build
the pdfs.

On Mon, Mar 2, 2009 at 5:41 PM, Aurimas aurimas.ri...@gmail.com wrote:


 Nothing special here, just an old school copy/paste.

 On Mar 1, 4:11 pm, Ian Lewis ianmle...@gmail.com wrote:
  Aurimas,
 
  Pretty slick. How did you create the pdfs? I'd like to make a copy of the
  Japanese documentation in the same way.
 
  Ian
 
  On Sat, Feb 28, 2009 at 5:57 PM, Aurimas aurimas.ri...@gmail.com
 wrote:
 
   1. Intro - 37 pages
  http://aurimas.rimsa.name/App-Engine-Docs/1-Intro.pdf
   2. Python - 34 pages
  http://aurimas.rimsa.name/App-Engine-Docs/2-Python.pdf
   3. Webapp - 16 pages
  http://aurimas.rimsa.name/App-Engine-Docs/3-Webapp.pdf
   4. Datastore - 72 pages
  http://aurimas.rimsa.name/App-Engine-Docs/4-Datastore.pdf
   5. Services - 47 pages
  http://aurimas.rimsa.name/App-Engine-Docs/5-Services.pdf
 
  --
  ===
  株式会社ビープラウド  イアン・ルイス
  〒150-0012
  東京都渋谷区広尾1-11-2アイオス広尾ビル604
  email: ianmle...@beproud.jp
  TEL:03-5795-2707
  FAX:03-5795-2708http://www.beproud.jp/
  ===
 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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] LinkProperty and Null/None values.

2009-03-02 Thread Ian Lewis
I have a model set up with a LinkProperty which is not required however when
trying to save the entity with a value of None I get a BadValue error saying
the Link cannot be empty. Is this by design and/or documented somewhere?

...
class Profile(db.Model):
  ...
  homepage = db.LinkProperty(verbose_name=_(uHomepage URL),required=False)
  ...

--~--~-~--~~~---~--~~
You 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: LinkProperty and Null/None values.

2009-03-02 Thread Ian Lewis
Bill,

Agreed.

But if it's by design then is there a design that says so? like
documentation? Otherwise I might consider it a bug.

Ian

On Tue, Mar 3, 2009 at 4:34 AM, Bill billk...@gmail.com wrote:


 Ian,

 This is by design and one of my peeves at the moment.  A number of the
 datastore properties will throw an exception when given None values,
 so it makes them useless for storing optional properties.  I think I
 ran into the same problem with LinkProperty and EmailProperty.  The
 general solution is to just use a StringProperty.  You could use a
 None marker like http://nolink; or not specified depending on
 validation of the property, but I find this less appealing.

 -Bill

 On Mar 2, 4:22 am, Ian Lewis ianmle...@gmail.com wrote:
  I have a model set up with a LinkProperty which is not required however
 when
  trying to save the entity with a value of None I get a BadValue error
 saying
  the Link cannot be empty. Is this by design and/or documented somewhere?
 
  ...
  class Profile(db.Model):
...
homepage = db.LinkProperty(verbose_name=_(uHomepage
 URL),required=False)
...
 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: LinkProperty and Null/None values.

2009-03-02 Thread Ian Lewis
Thanks for creating the issue Bill.

On Tue, Mar 3, 2009 at 2:19 PM, Bill billk...@gmail.com wrote:


 I've seen at least one Google team member in this forum saying that's
 the way it is and use string if you want it to be None.  That doesn't
 prevent us, though, from starting an issue:

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

 Star it if you'd like the default behavior to change.
 -Bill

 On Mar 2, 8:42 pm, Ian Lewis ianmle...@gmail.com wrote:
  Bill,
 
  Agreed.
 
  But if it's by design then is there a design that says so? like
  documentation? Otherwise I might consider it a bug.
 
  Ian
 
 
 
  On Tue, Mar 3, 2009 at 4:34 AM, Bill billk...@gmail.com wrote:
 
   Ian,
 
   This is by design and one of my peeves at the moment.  A number of the
   datastore properties will throw an exception when given None values,
   so it makes them useless for storing optional properties.  I think I
   ran into the same problem with LinkProperty and EmailProperty.  The
   general solution is to just use a StringProperty.  You could use a
   None marker like http://nolink; or not specified depending on
   validation of the property, but I find this less appealing.
 
   -Bill
 
   On Mar 2, 4:22 am, Ian Lewis ianmle...@gmail.com wrote:
I have a model set up with a LinkProperty which is not required
 however
   when
trying to save the entity with a value of None I get a BadValue error
   saying
the Link cannot be empty. Is this by design and/or documented
 somewhere?
 
...
class Profile(db.Model):
  ...
  homepage = db.LinkProperty(verbose_name=_(uHomepage
   URL),required=False)
  ...
 
  --
  ===
  株式会社ビープラウド  イアン・ルイス
  〒150-0012
  東京都渋谷区広尾1-11-2アイオス広尾ビル604
  email: ianmle...@beproud.jp
  TEL:03-5795-2707
  FAX:03-5795-2708http://www.beproud.jp/
  ===
 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: Not receiving SMS for Verification code

2009-03-01 Thread Ian Lewis
Satish,

Did you enter your country code correctly? How did you enter your phone
number?

Ian

On Sat, Feb 28, 2009 at 9:09 PM, satishbudholiya
satishbudhol...@gmail.comwrote:


 I tried so many times but haven't received any SMS for verification of
 Google App Engine.
 Please help me.

 Satish Budholiya

 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: Print-friendly Google App Engine documentation

2009-03-01 Thread Ian Lewis
Aurimas,

Pretty slick. How did you create the pdfs? I'd like to make a copy of the
Japanese documentation in the same way.

Ian

On Sat, Feb 28, 2009 at 5:57 PM, Aurimas aurimas.ri...@gmail.com wrote:


 1. Intro - 37 pages
 http://aurimas.rimsa.name/App-Engine-Docs/1-Intro.pdf
 2. Python - 34 pages
 http://aurimas.rimsa.name/App-Engine-Docs/2-Python.pdf
 3. Webapp - 16 pages
 http://aurimas.rimsa.name/App-Engine-Docs/3-Webapp.pdf
 4. Datastore - 72 pages
 http://aurimas.rimsa.name/App-Engine-Docs/4-Datastore.pdf
 5. Services - 47 pages
 http://aurimas.rimsa.name/App-Engine-Docs/5-Services.pdf

 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: Deleting CounterShards

2009-03-01 Thread Ian Lewis
Krishna,

Anything you see in the data viewer is created by some application code. It
wouldn't be put there by google appengine specifically. That said it looks
like something is using a sharded counter to keep counts of objects in the
datastore or something similar. This data would not likely be regenerated if
deleted, it would likely reset all the counters to zero so I would leave it
alone.

Ian

On Mon, Mar 2, 2009 at 9:34 AM, Krishna krishnapatel...@gmail.com wrote:


 On the Data Viewer I have an entity called CounterShards. I considered
 deleting some extraneous data there but was afraid it would blow
 something up. If I delete data here, will it be regenerated
 automatically or should I leave it alone?

 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: Deleting CounterShards

2009-03-01 Thread Ian Lewis
Krishna,

The datastore can only return or count up to 1000 objects so if you have
more than 1000 objects in the database you cannot count them without a
counter. I assume the code in Bloog is keeping counts of objects in case it
runs up against this limitation.

Ian

On Mon, Mar 2, 2009 at 2:02 PM, Krishna krishnapatel...@gmail.com wrote:


 Ian,

 I'm using some open source code (Bloog) and I don't really understand
 how it works. So I'll trust your cautious approach although I don't
 quite understand why something would need to keep counts of objects
 in the datastore. Best not to meddle although I was hoping to clean
 things up if I could.

 Thank you for responding.
 Krishna

 On Mar 1, 11:31 pm, Ian Lewis ianmle...@gmail.com wrote:
  Krishna,
 
  Anything you see in the data viewer is created by some application code.
 It
  wouldn't be put there by google appengine specifically. That said it
 looks
  like something is using a sharded counter to keep counts of objects in
 the
  datastore or something similar. This data would not likely be regenerated
 if
  deleted, it would likely reset all the counters to zero so I would leave
 it
  alone.
 
  Ian
 
  On Mon, Mar 2, 2009 at 9:34 AM, Krishna krishnapatel...@gmail.com
 wrote:
 
   On the Data Viewer I have an entity called CounterShards. I considered
   deleting some extraneous data there but was afraid it would blow
   something up. If I delete data here, will it be regenerated
   automatically or should I leave it alone?
 
  --
  ===
  株式会社ビープラウド  イアン・ルイス
  〒150-0012
  東京都渋谷区広尾1-11-2アイオス広尾ビル604
  email: ianmle...@beproud.jp
  TEL:03-5795-2707
  FAX:03-5795-2708http://www.beproud.jp/
  ===
 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: Extended db.Model providing access to ReferenceProperty key

2009-02-26 Thread Ian Lewis
I think your get_key method needs a return in there.

class DerefModel(db.Model):
def get_key(self, prop_name):
getattr(self.__class__, prop_name).get_value_for_datastore(self)



On Fri, Feb 27, 2009 at 3:51 PM, Bill billk...@gmail.com wrote:


 Alex,
 Do you mean something like this:

 http://appengine-cookbook.appspot.com/recipe/getting-dbreferenceproperty-key-without-loading-entity
 If so, let me know if it doesn't work.
 -Bill

 On Feb 26, 5:32 pm, Alex Popescu the.mindstorm.mailingl...@gmail.com
 wrote:
  Hi,
 
  I've read on the group that somebody has extended the db.Model to
  automatically provide access to the referenced entity key (i.e. if the
  model defines a ReferenceProperty then the Model will automatically
  provide access to the referenced entity key -- the value that is
  actually stored).
 
  While I do know how to write the code to get the referenced entity
  key, I have no idea how can I enhance db.Model to automatically
  provide this feature.
 
  I'd appreciate any hints on how to get this functionality (or even
  better the implementation). Many thanks in advance,
 
  ./alex
  --
  Cloud Now:http://The.DailyCloud.net
 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: Domain squatting on App Engine

2009-02-14 Thread Ian Lewis
I'm guessing the gmail shared namespace limitation has to do with being able
to the forthcoming release that allows apps to recieve mail (presumably at
appname@gmail.com). This is probably something they thought about in the
beginning but just didn't implement.

On Sun, Feb 15, 2009 at 7:56 AM, Alexander Konovalenko alex...@gmail.comwrote:


 There's an issue to remove the Gmail shared namespace limitation:
 http://code.google.com/p/googleappengine/issues/detail?id=479

 Also, Marzia says that they don't allow similar names. For example, if
 'appid' is already registered, you won't be able to create an app
 called 'app1d'.

 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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] Loading pdb

2009-02-11 Thread Ian Lewis
 Is there any way I can import and run pdb locally?  Currently I have
problems with importing pdb. I do a import pdb;pdb.set_trace() and I get the
following error:

DEBUG2009-02-11 10:10:15,174 dev_appserver.py] Could not import
readline: Disallowed C-extension or built-in module
DEBUG2009-02-11 10:10:15,175 dev_appserver.py] Could not import
readline: Disallowed C-extension or built-in module
DEBUG2009-02-11 10:10:15,176 dev_appserver.py] Could not import
readline: Disallowed C-extension or built-in module
ERROR2009-02-11 10:10:15,184 dev_appserver.py] Exception encountered
handling request
Traceback (most recent call last):
  File
/home/ian/src/google_appengine-1.1.8/google/appengine/tools/dev_appserver.py,
line 2461, in _HandleRequest
base_env_dict=env_dict)
  File
/home/ian/src/google_appengine-1.1.8/google/appengine/tools/dev_appserver.py,
line 354, in Dispatch
base_env_dict=base_env_dict)
  File
/home/ian/src/google_appengine-1.1.8/google/appengine/tools/dev_appserver.py,
line 1871, in Dispatch
self._module_dict)
  File
/home/ian/src/google_appengine-1.1.8/google/appengine/tools/dev_appserver.py,
line 1789, in ExecuteCGI
reset_modules = exec_script(handler_path, cgi_path, hook)
  File
/home/ian/src/google_appengine-1.1.8/google/appengine/tools/dev_appserver.py,
line 1685, in ExecuteOrImportScript
exec module_code in script_module.__dict__
  File /home/ian/src/smipple/main.py, line 60, in module
main()
  File /home/ian/src/smipple/main.py, line 57, in main
util.run_wsgi_app(application)
  File
/home/ian/src/google_appengine-1.1.8/google/appengine/ext/webapp/util.py,
line 76, in run_wsgi_app
result = application(env, _start_response)
  File /home/ian/src/smipple/django.zip/django/core/handlers/wsgi.py, line
228, in __call__
  File /home/ian/src/smipple/django.zip/django/core/handlers/base.py, line
38, in load_middleware
mw_instance = mw_class()
  File
/home/ian/src/google_appengine-1.1.8/google/appengine/tools/dev_appserver.py,
line 849, in decorate
return func(self, *args, **kwargs)
  File
/home/ian/src/google_appengine-1.1.8/google/appengine/tools/dev_appserver.py,
line 1445, in load_module
return self.FindAndLoadModule(submodule, fullname, search_path)
  File
/home/ian/src/google_appengine-1.1.8/google/appengine/tools/dev_appserver.py,
line 849, in decorate
return func(self, *args, **kwargs)
  File
/home/ian/src/google_appengine-1.1.8/google/appengine/tools/dev_appserver.py,
line 1353, in FindAndLoadModule
description)
  File
/home/ian/src/google_appengine-1.1.8/google/appengine/tools/dev_appserver.py,
line 849, in decorate
return func(self, *args, **kwargs)
  File
/home/ian/src/google_appengine-1.1.8/google/appengine/tools/dev_appserver.py,
line 1303, in LoadModuleRestricted
description)
  File /home/ian/src/smipple/smipple/middleware.py, line 45, in module
class AuthenticationMiddleware(object):
  File /home/ian/src/smipple/smipple/middleware.py, line 47, in
AuthenticationMiddleware
def process_request(self, request):
  File /home/ian/src/smipple/smipple/middleware.py, line 47, in
AuthenticationMiddleware
def process_request(self, request):
  File /usr/lib/python2.5/bdb.py, line 48, in trace_dispatch
return self.dispatch_line(frame)
  File /usr/lib/python2.5/bdb.py, line 67, in dispatch_line
if self.quitting: raise BdbQuit
BdbQuit

--~--~-~--~~~---~--~~
You 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: SDK 1.1.9 breaks google-app-engine-django?

2009-02-10 Thread Ian Lewis
Michael,

Hmm, it seems to be running ok here for me.

On Tue, Feb 10, 2009 at 7:00 PM, mcobrien mich...@mcobrien.org wrote:


 Hi,

 now that sdk 1.1.9 disallows access to skipped files, the
 LoadAppengineEnvironment() function in the django helper isn't
 working. It makes a call to LoadAppConfig, which tries to read
 app.yaml. Since this is a skipped file (it's actually marked as
 skipped when LoadAppConfig is first called), the read fails.

 Is anyone else having this issue, or is something strange about my
 config? I'm using the latest google-app-engine-django from svn, and
 Vista x64.

 thanks!
 Michael
 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: SDK 1.1.9 breaks google-app-engine-django?

2009-02-10 Thread Ian Lewis
Michael,

Ah, I may not have been running the current version from svn.

Matt,

Thanks for fixing it,

On Tue, Feb 10, 2009 at 7:35 PM, Matt Brown mattbr...@google.com wrote:


 Hi Michael,

 mcobrien wrote:
  now that sdk 1.1.9 disallows access to skipped files, the
  LoadAppengineEnvironment() function in the django helper isn't
  working. It makes a call to LoadAppConfig, which tries to read
  app.yaml. Since this is a skipped file (it's actually marked as
  skipped when LoadAppConfig is first called), the read fails.
 
  Is anyone else having this issue, or is something strange about my
  config? I'm using the latest google-app-engine-django from svn, and
  Vista x64.

 Yes, this was a problem.

 I've just committed r72 and r73 to make the helper compatible with the
 new SDK release.

 Please let us know (file an issue in the tracker) if you encounter any
 more instances of the helper attempting to access files that would not
 be present in a production environment.

 Cheers

 Matt Brown

 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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] Access to module file denied (PIL)

2009-02-10 Thread Ian Lewis
I'm getting an error similar to the errors about not being able to access
skipped files with appengine-django but this time I'm getting an error about
not being able to access the PIL module file Image.py

I'm getting a different error pertaining to PIL now. This may or may not be
related to appengine-django.

DEBUG2009-02-10 13:41:24,134 dev_appserver.py] Access to module file
denied: /usr/lib/python2.5/site-packages/PIL/Image.py

This causes the dev appserver to hang and use up lots of CPU. I'm using
appengine-django and updated to the latest version in svn.

Ian

--~--~-~--~~~---~--~~
You 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: Access to module file denied (PIL)

2009-02-10 Thread Ian Lewis
Matthew,

I'm using the images api. Up until 1.1.9 my understanding was that importing
PIL wouldn't work in production (and with 1.1.9 it's enforcing it on the
dev_server?). Let me pull out the code here,

models.py

class UserProfileImage(db.Model):
  user = db.ReferenceProperty(UserProperties, required=True)
  image = db.BlobProperty(required=True)
  mimetype = db.StringProperty(required=True)

views.py
...
def user_settings(request):
  
  The user settings page.
  
  if request.method == 'POST':
...
  if not request.user.use_gravatar and 'profile_image' in request.FILES:
from google.appengine.api import images
old_profile_image = UserProfileImage.all().filter('user =',
request.user).get()

uploaded_file = request.FILES['profile_image']

# There should be only one chunk as we can only upload to memory
image = images.Image(uploaded_file.chunks().next())
new_width = image.width
new_height = image.height
if image.width  80 or image.height  80:
  new_width = 80
  new_height = 80
image.resize(new_width, new_height)
image_data = image.execute_transforms(output_encoding=images.PNG)

profile_image = UserProfileImage(user=request.user, \
 image=image_data, \
 mimetype='image/png')
profile_image.put()

if old_profile_image:
  old_profile_image.delete()
...

Ian

On Wed, Feb 11, 2009 at 3:52 AM, Matthew Blain matthew.bl...@google.comwrote:


 Hello Ian,
 How are you accessing PIL? Are you using the Images API* , or are you
 importing from PIL directly?

 --Matthew
 * http://code.google.com/appengine/docs/python/images/

 On Feb 10, 5:47 am, Ian Lewis ianmle...@gmail.com wrote:
  I'm getting an error similar to the errors about not being able to access
  skipped files with appengine-django but this time I'm getting an error
 about
  not being able to access the PIL module file Image.py
 
  I'm getting a different error pertaining to PIL now. This may or may not
 be
  related to appengine-django.
 
  DEBUG2009-02-10 13:41:24,134 dev_appserver.py] Access to module file
  denied: /usr/lib/python2.5/site-packages/PIL/Image.py
 
  This causes the dev appserver to hang and use up lots of CPU. I'm using
  appengine-django and updated to the latest version in svn.
 
  Ian

 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: Access to module file denied (PIL)

2009-02-10 Thread Ian Lewis
Matthew,

I also wanted like to mention that this happens to me on every request which
is why I suspected appengine-django. I don't actually import the image api
unless I am saving a profile image.

On Wed, Feb 11, 2009 at 11:34 AM, Ian Lewis ianmle...@gmail.com wrote:

 Matthew,

 I'm using the images api. Up until 1.1.9 my understanding was that
 importing PIL wouldn't work in production (and with 1.1.9 it's enforcing it
 on the dev_server?). Let me pull out the code here,

 models.py

 class UserProfileImage(db.Model):
   user = db.ReferenceProperty(UserProperties, required=True)
   image = db.BlobProperty(required=True)
   mimetype = db.StringProperty(required=True)

 views.py
 ...
 def user_settings(request):
   
   The user settings page.
   
   if request.method == 'POST':
 ...
   if not request.user.use_gravatar and 'profile_image' in
 request.FILES:
 from google.appengine.api import images
 old_profile_image = UserProfileImage.all().filter('user =',
 request.user).get()

 uploaded_file = request.FILES['profile_image']

 # There should be only one chunk as we can only upload to memory
 image = images.Image(uploaded_file.chunks().next())
 new_width = image.width
 new_height = image.height
 if image.width  80 or image.height  80:
   new_width = 80
   new_height = 80
 image.resize(new_width, new_height)
 image_data = image.execute_transforms(output_encoding=images.PNG)

 profile_image = UserProfileImage(user=request.user, \
  image=image_data, \
  mimetype='image/png')
 profile_image.put()

 if old_profile_image:
   old_profile_image.delete()
 ...

 Ian


 On Wed, Feb 11, 2009 at 3:52 AM, Matthew Blain 
 matthew.bl...@google.comwrote:


 Hello Ian,
 How are you accessing PIL? Are you using the Images API* , or are you
 importing from PIL directly?

 --Matthew
 * http://code.google.com/appengine/docs/python/images/

 On Feb 10, 5:47 am, Ian Lewis ianmle...@gmail.com wrote:
  I'm getting an error similar to the errors about not being able to
 access
  skipped files with appengine-django but this time I'm getting an error
 about
  not being able to access the PIL module file Image.py
 
  I'm getting a different error pertaining to PIL now. This may or may not
 be
  related to appengine-django.
 
  DEBUG2009-02-10 13:41:24,134 dev_appserver.py] Access to module file
  denied: /usr/lib/python2.5/site-packages/PIL/Image.py
 
  This causes the dev appserver to hang and use up lots of CPU. I'm using
  appengine-django and updated to the latest version in svn.
 
  Ian

 



 --
 ===
 株式会社ビープラウド  イアン・ルイス
 〒150-0012
 東京都渋谷区広尾1-11-2アイオス広尾ビル604
 email: ianmle...@beproud.jp
 TEL:03-5795-2707
 FAX:03-5795-2708
 http://www.beproud.jp/
 ===




-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: Access to module file denied (PIL)

2009-02-10 Thread Ian Lewis
I found that this seems unrelated to the message about the PIL module and
was related to the local datastore I was using.

On Wed, Feb 11, 2009 at 12:36 PM, Ian Lewis ianmle...@gmail.com wrote:

 Matthew,

 I also wanted like to mention that this happens to me on every request
 which is why I suspected appengine-django. I don't actually import the image
 api unless I am saving a profile image.


 On Wed, Feb 11, 2009 at 11:34 AM, Ian Lewis ianmle...@gmail.com wrote:

 Matthew,

 I'm using the images api. Up until 1.1.9 my understanding was that
 importing PIL wouldn't work in production (and with 1.1.9 it's enforcing it
 on the dev_server?). Let me pull out the code here,

 models.py

 class UserProfileImage(db.Model):
   user = db.ReferenceProperty(UserProperties, required=True)
   image = db.BlobProperty(required=True)
   mimetype = db.StringProperty(required=True)

 views.py
 ...
 def user_settings(request):
   
   The user settings page.
   
   if request.method == 'POST':
 ...
   if not request.user.use_gravatar and 'profile_image' in
 request.FILES:
 from google.appengine.api import images
 old_profile_image = UserProfileImage.all().filter('user =',
 request.user).get()

 uploaded_file = request.FILES['profile_image']

 # There should be only one chunk as we can only upload to memory
 image = images.Image(uploaded_file.chunks().next())
 new_width = image.width
 new_height = image.height
 if image.width  80 or image.height  80:
   new_width = 80
   new_height = 80
 image.resize(new_width, new_height)
 image_data = image.execute_transforms(output_encoding=images.PNG)

 profile_image = UserProfileImage(user=request.user, \
  image=image_data, \
  mimetype='image/png')
 profile_image.put()

 if old_profile_image:
   old_profile_image.delete()
 ...

 Ian


 On Wed, Feb 11, 2009 at 3:52 AM, Matthew Blain 
 matthew.bl...@google.comwrote:


 Hello Ian,
 How are you accessing PIL? Are you using the Images API* , or are you
 importing from PIL directly?

 --Matthew
 * http://code.google.com/appengine/docs/python/images/

 On Feb 10, 5:47 am, Ian Lewis ianmle...@gmail.com wrote:
  I'm getting an error similar to the errors about not being able to
 access
  skipped files with appengine-django but this time I'm getting an error
 about
  not being able to access the PIL module file Image.py
 
  I'm getting a different error pertaining to PIL now. This may or may
 not be
  related to appengine-django.
 
  DEBUG2009-02-10 13:41:24,134 dev_appserver.py] Access to module
 file
  denied: /usr/lib/python2.5/site-packages/PIL/Image.py
 
  This causes the dev appserver to hang and use up lots of CPU. I'm using
  appengine-django and updated to the latest version in svn.
 
  Ian

 



 --
 ===
 株式会社ビープラウド  イアン・ルイス
 〒150-0012
 東京都渋谷区広尾1-11-2アイオス広尾ビル604
 email: ianmle...@beproud.jp
 TEL:03-5795-2707
 FAX:03-5795-2708
 http://www.beproud.jp/
 ===




 --
 ===
 株式会社ビープラウド  イアン・ルイス
 〒150-0012
 東京都渋谷区広尾1-11-2アイオス広尾ビル604
 email: ianmle...@beproud.jp
 TEL:03-5795-2707
 FAX:03-5795-2708
 http://www.beproud.jp/
 ===




-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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] Entity Groups

2009-02-09 Thread Ian Lewis
Hi all,

The documentation seemed to suggest that the more root entities you have the
more it can distribute your query so it should be faster, but I'm curious
about entity groups and what, if any, advantage there is to putting entities
in an entity group besides being able to use them in a transaction. Is there
any?

Ian

--~--~-~--~~~---~--~~
You 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: Problem with models Google App Engine Helper for Django

2009-02-03 Thread Ian Lewis
cw,

What's the directory where models.py with your Quiz model in it? More
accurately what is the python module with your Quiz model in it?

2009/2/3 cdub carl...@gmail.com


 I have my application up and running with the Google App Engine Helper
 for Django.

 But when I went to add a simple model:

 models.py
 --

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

 class Quiz(BaseModel):
question = db.StringProperty()

 I started getting the following error:

 IndexError at /
 list index out of range
 Request Method: GET
 Request URL:http://localhost:8080/
 Exception Type: IndexError
 Exception Value:list index out of range
 Exception Location: /Users/carlin/Documents/Personal/Programming/
 mysite/appengine_django/models.py in __init__, line 51

 Any ideas?

 Thanks,
 cw
 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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 API call datastore_v3.Delete() required more quota than is

2009-02-03 Thread Ian Lewis
You likely need to wait a day or so to have the quotas reset themselves. It
looks like you using too much of one of the appengine quotas.

2009/2/3 Ilia Lobsanov samo...@gmail.com


 Correction, it's datastore_v3.Get() not Delete()

 The exact traceback is:

 Traceback (most recent call last):
  File /base/python_lib/versions/1/google/appengine/ext/bulkload/
 __init__.py, line 376, in LoadEntities
new_entities = loader.CreateEntity(columns, key_name=key_name)
  File /base/python_lib/versions/1/google/appengine/ext/bulkload/
 __init__.py, line 235, in CreateEntity
entities = self.HandleEntity(entity)
  File /base/data/home/apps/govtenders/107.331152630405006468/
 loader.py, line 30, in HandleEntity
old_contract = Contract.get_by_key_name(old_key_name)
  File /base/python_lib/versions/1/google/appengine/ext/db/
 __init__.py, line 837, in get_by_key_name
return get(*keys)
  File /base/python_lib/versions/1/google/appengine/ext/db/
 __init__.py, line 1032, in get
entities = datastore.Get(keys)
  File /base/python_lib/versions/1/google/appengine/api/
 datastore.py, line 215, in Get
apiproxy_stub_map.MakeSyncCall('datastore_v3', 'Get', req, resp)
  File /base/python_lib/versions/1/google/appengine/api/
 apiproxy_stub_map.py, line 68, in MakeSyncCall
apiproxy.MakeSyncCall(service, call, request, response)
  File /base/python_lib/versions/1/google/appengine/api/
 apiproxy_stub_map.py, line 240, in MakeSyncCall
stub.MakeSyncCall(service, call, request, response)
  File /base/python_lib/versions/1/google/appengine/runtime/
 apiproxy.py, line 183, in MakeSyncCall
rpc.CheckSuccess()
  File /base/python_lib/versions/1/google/appengine/api/
 apiproxy_rpc.py, line 107, in CheckSuccess
raise self.exception
 OverQuotaError: The API call datastore_v3.Get() required more quota
 than is available.




 On Feb 3, 1:10 am, Ilia Lobsanov samo...@gmail.com wrote:
  I've ran into the error The API call datastore_v3.Delete() required
  more quota than is available. 
 
  What I'm doing is using the bulkload_client.py to load 4 entities at a
  time.
  eg. INFO 2009-02-03 01:03:42,049 bulkload_client.py] Importing 4
  entities in 953 bytes
 
   After ~174 such imports, I get the quota error.
 
  The loader HandleEntity is doing the following:
  1) lookup an entity A by key name
  2) delete entity A if found
  3) lookup an entity A by another key name
  4) create a SearchableEntity based on the entity
  5) lookup an entity B by key name
  6) update entity B if found and put() it
  7) lookup an entity C by key name
  8) update entity C if found and put() it
  9) return the SearchableEntity
 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: Problem with models Google App Engine Helper for Django

2009-02-03 Thread Ian Lewis
Yup,

The appengine_django/models.py has a funny little piece of code that
requires your models module to not be a top level module.

class ModelOptions(object):
  ...
  def __init__(self, cls):
self.object_name = cls.__name__
self.module_name = self.object_name.lower()
model_module = sys.modules[cls.__module__]
self.app_label = model_module.__name__.split('.')[-2]
self.abstract = False

The fourth line of __init__ there breaks if you have a modules with models
in a top level module. Go figure.

Ian

2009/2/4 Carlin Wiegner carl...@gmail.com

 Couldn't wait to try. Works great - thank you both!
 cw


 On Tue, Feb 3, 2009 at 10:09 AM, Carlin Wiegner carl...@gmail.com wrote:

 I give it a whirl tonight and see if that works. I've seen a couple
 examples that did that but didn't understand it was required.

 Thank you both. :) GAE/Django/Python is pretty exciting but there isn't
 tons of sample code/books/etc out there yet so the help is really
 appreciated.

 Take care,
 cw


 On Tue, Feb 3, 2009 at 9:33 AM, Matt Brown mattbr...@google.com wrote:


 Hi Carlin,
 Carlin Wiegner wrote:
  Right now my models.py is in the root directory of mysite.

 As I believe Ian was hinting at in his response, the helper (and Django)
 expect your models to be within a Django application (basically a
 subfolder) of your Django project (your Django project == your App
 Engine application, confusing I know ;p).

 So you need to create a directory, say called myapp and place your
 models.py in that (don't forget to also add __init__.py). Then you list
 myapp in the INSTALLED_APPS section of settings.py and you should be
 good to go.

 Cheers


 Matt Brown





 --
 Carlin Wiegner
 CEO  Co-founder
 CubeTree




 --
 Carlin Wiegner
 CEO  Co-founder
 CubeTree


 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: availibity of gcc

2009-02-03 Thread Ian Lewis
I'm very sure that a C compiler will not be available any time in the near
future, (if ever) on appengine.

2009/2/4 minor project minorproject...@gmail.com

 Oh.We are trying to develop a C IDE on the cloud using the
 Appengine.Apparently our program demands a gcc compiler to be a part of the
 server so as to compile the program.So is there any way you can help us?


 



-- 
===
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
===

--~--~-~--~~~---~--~~
You 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: Why Google App Engine is broken and what Google must do to fix it.

2008-10-07 Thread Ian Lewis
The documentation says that an entity group could be as large as a single
user's data. It seems to me that to avoid the problem you are describing
that it would be a good idea to do so. I have a feeling that the number of
cases where you would need to update more than one user's data in a single
transaction would be limited.

2008/10/8 Josh Heitzman [EMAIL PROTECTED]


 Assuming you can actually work around all of the limitation
 simultaneously, considering the more things you work around the close
 you come to the CPU time quota.

 It also is not completely accurate to state that the limitations are
 there to make apps safe and scalable.  For example transactions being
 limited to a single entity group makes it very complicated (i.e. not
 safe) to write code that needs to reliably update entities from
 different groups (it isn't always possible to structure entity groups
 such that everything that is needs to be updated for a request can be
 all be in one entity group).

 Also given the roundness of the quotas, I find it very unlikely that
 the quota numbers were choosen based on an in depth analysis or a
 broad sampling of data, rather the being choosen fairly arbitrarily
 (possibly based to some extent on what works for google's own apps).

 On Oct 7, 4:16 pm, Greg [EMAIL PROTECTED] wrote:
  Davew said it way back at the top - appengine's killer feature is
  scalability. That is what sets it apart from the other cloud systems
  out there, and it is also the root cause of most complaints (except
  the quotas, which will disappear when you get to pay for the service).
 
  For the application I'm working on, I'm happy to trade off lack of a
  relational database for the future gain of scalability. My guess is
  that most of you haven't had the nightmare of an application that
  suddenly became popular, and you had to become an expert at database
  replication, load balancing and multi-system maintenance overnight.
  It's a very stressful situation.
 
  So my advice is that if you don't need scalability, get a normal
  hosting account or EC3. Then you can have PHP, Ruby, MySQL, cron jobs,
  anything you want - problem solved. Oh, yes you are going to have to
  shell out a few buck a month.
 
  But if you do need scalability, then appengine is a godsend. The
  limitations are there to make it safe and scalable, not because Google
  wants to annoy you. You spend a little more time now working around
  the limitations, and save endless time later managing systems and
  capacity.
 
  And lastly, I believe that many of the complaints come from people
  just wanting a free hosting service, and not finding what they are
  used to. It would be a crying shame if Google listened to these people
  and turned appengine into a vanilla PHP/MySQL hosting service.
  Appengine is so much more...
 
  On Oct 7, 3:54 pm, Ross Ridge [EMAIL PROTECTED] wrote:
 
   [EMAIL PROTECTED] wrote:
One thing you have to remember it is not what Guido or the engineers
want. If Google App Engine is to succeed it is what the customers
want. If it is designed as you have stated it will never recoup what
Google has spent so far let alone down the road. Google App Engine
 has
so many many limitations.  Regardless if the limitations are by
 design
or not it is virtually unusable by 99% of all developers. Can Google
make a business off the remaining 1%?
 
   The question of whether Google can turn Google App Engine into a
   profitable business doesn't depend on what percentage of developers
   find it useful, but whether Google exploit a competive advantage.
   Google could've started up a tradtional web hosting service using
   popular SQL databases and other techonologies and created something
   that would have had a much broader appeal.  Any one could.  That's the
   problem.  Google might be able to grab market share, but without
   anything to distiguish themselves from their competitors, a best they
   only get a marginal return on their investment.
 
   We can only speculate on what Google business plan for GAE is, but it
   seems pretty obvious to me that leveraging Google's own internal
   technologies is at the heart of it.  A number of limitations and
   problems with GAE stem from technologies like Big Table, Google
   Frontend and Google Apps.  Another part of their plan appears to be
   keeping support costs low, so you're not given much rope to hang
   yourself (or others).  If, in the long term, Google can't make a
   business following this plan, if it doesn't give them enough a
   competive advanage, then there's probably no way they can make the
   kind profits from a hosting service that Google's investors expect.
 
   (While it's not terribly relevent to this discussion, I suspect Google
   has some other goals for GAE that don't deal directly with its
   viability as a business.  One is to educate programmers in the Google
   way of doing things.  I'm sure Google has been fustrated with tons of