[google-appengine] Breaking my head on Opensearch

2009-12-27 Thread MajorProgamming
I'm trying to implement an Opensearch XML solution in one of my apps.
But IE8 seems to be having some problems with it. I think it might
have to do with encoding or content-type issues. How do I serve
correctly w/ python?

Thanks!

--

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




[google-appengine] Duplicating static serving

2009-12-27 Thread MajorProgamming
I recently came across an issue where I solved the problem by taking
the same exact template file, and serving it static (in app.yaml)
instead of dynamically (through a python script). So I was wondering:
How can I serve files dynamically (e.g. templates), so that the result
is exactly the same as when serving dynamically?

Thanks for your 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.




[google-appengine] Re: Duplicating static serving

2009-12-27 Thread MajorProgamming
Okay, how can I set MIME/Content type correctly? That might've been
the issue...

On Dec 27, 5:36 pm, Barry Hunter barrybhun...@googlemail.com wrote:
 Surely it depends on what your 'problem' was.

 As long as you setting a MIME/Content type on the dynamic file, the
 browser shouldnt know the difference.

 If you can be more specifc, it would probably be alot easier for
 someone to help you.

 2009/12/27 MajorProgamming sefira...@gmail.com:



  I recently came across an issue where I solved the problem by taking
  the same exact template file, and serving it static (in app.yaml)
  instead of dynamically (through a python script). So I was wondering:
  How can I serve files dynamically (e.g. templates), so that the result
  is exactly the same as when serving dynamically?

  Thanks for your 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 
  athttp://groups.google.com/group/google-appengine?hl=en.- Hide quoted text -

 - Show quoted text -

--

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




[google-appengine] Re: Duplicating static serving

2009-12-27 Thread MajorProgamming
Solved the problem: when using the script caching is not done right (I
think it's disabled). So I set the caching headers and voila! it
worked!

Thanks for your help.

On Dec 27, 5:45 pm, Barry Hunter barrybhun...@googlemail.com wrote:
 http://www.google.com/search?q=python+%22content+type%22+app+engine

 2009/12/27 MajorProgamming sefira...@gmail.com:





  Okay, how can I set MIME/Content type correctly? That might've been
  the issue...

  On Dec 27, 5:36 pm, Barry Hunter barrybhun...@googlemail.com wrote:
  Surely it depends on what your 'problem' was.

  As long as you setting a MIME/Content type on the dynamic file, the
  browser shouldnt know the difference.

  If you can be more specifc, it would probably be alot easier for
  someone to help you.

  2009/12/27 MajorProgamming sefira...@gmail.com:

   I recently came across an issue where I solved the problem by taking
   the same exact template file, and serving it static (in app.yaml)
   instead of dynamically (through a python script). So I was wondering:
   How can I serve files dynamically (e.g. templates), so that the result
   is exactly the same as when serving dynamically?

   Thanks for your 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 
   athttp://groups.google.com/group/google-appengine?hl=en.-Hide quoted 
   text -

  - Show quoted text -

  --

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

 --
 Barry

 -www.nearby.org.uk-www.geograph.org.uk-- Hide quoted text -

 - Show quoted text -

--

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




[google-appengine] Reference Properties

2009-11-28 Thread MajorProgamming
I was wondering: isn't using reference properties a waste of space?
Wouldn't it make more sense to store the id (assuming not using
key_name) of the entity. After all, if the Kind is known, one can
easily generate the full key based on that. And with a reference
property it actually stores the _entire_ key (very long!).

Why?

--

You 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: MP3 Data Retreival

2009-11-26 Thread MajorProgamming
That's great info to know. But I more specifically wanted to get the
runtime of the file (i.e. in hours, minutes, seconds). Any way to do
that?

On Nov 26, 2:37 am, Niklas Rosencrantz teknik...@gmail.com wrote:
 On Thu, Nov 26, 2009 at 5:14 AM, MajorProgamming sefira...@gmail.com wrote:

  Is there any way to somehow fetch an external MP3 file (i.e. from
  another website), and then calculate the length of the MP3 file.

  I don't need the actual data of the file, I just want the length of it
  (time it runs).

  Keep in mind that these files can be as big as 25MB...

  Thanks,

 Hello,
 Good question guaranteed to depend on host config (could be custom or
 fake descriptions) while one mentioned way is use HTTP HEAD
 #Call HTTP HEAD in Python
 import httplib
 conn=httplib.HTTPConnection(www.abc.com)
 conn.request(HEAD, /dir/file1.mp3)
 res=conn.getresponse()
 fileSize=res.getheader('content-length')
 #or res.getheaders() for all headers
 conn.close()

--

You 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] MP3 Data Retreival

2009-11-25 Thread MajorProgamming
Is there any way to somehow fetch an external MP3 file (i.e. from
another website), and then calculate the length of the MP3 file.

I don't need the actual data of the file, I just want the length of it
(time it runs).

Keep in mind that these files can be as big as 25MB...

Thanks,

--

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




[google-appengine] Filtering Performance Hit?

2009-10-31 Thread MajorProgamming

If I'm filtering on a Listproperty, and perform the same filter twice,
is there a performance hit?

q=q.filter('lp =','value1')
q=q.filter('lp =','value1')

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



[google-appengine] Idempotence for Incoming Mail

2009-10-31 Thread MajorProgamming

What will the mail handler do if there is an error? Will it call it
again?

Is there any possibility of it calling the URL twice?

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



[google-appengine] Mail SPF Problems

2009-09-11 Thread MajorProgamming

I am currently trying to develop an app that uses Google Voice's new
email/sms functionality. However,  when I send an email from my app
to the correct email address, it simply will not go through. I am
suspicious that this happens because Google Voice checks SPF records
to make sure it really came from Gmail. When GAE sends out an email it
uses different servers and hence does not truly imitate Gmail sending.
Is that true?

Any way to fix this?


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



[google-appengine] Sorting in Memory

2009-08-03 Thread MajorProgamming

What is the most efficient way to sort Datastore results in memory?

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



[google-appengine] Deserialization Cost of ListProperty

2009-06-26 Thread MajorProgamming

I was recently watching a Google I/O video (I believe it was by Brett
Slatkin), and I noticed that he was trying to avert the
Deserialization Cost of ListProperties. I was wondering how bad that
cost is, and how big the list has to be in order to see that cost?
(e.g. let's say I know the list will contain a maximum of 75. Would
that be something to worry about?)

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



[google-appengine] Using UrlFetch with Multipart

2009-06-25 Thread MajorProgamming

As per Twitter Docs. one must use the multipart to post the image
[http://apiwiki.twitter.com/Twitter-REST-API-Method:-
account update_profile_image]

I am currently using a twitter-oauth-appengine library [http://
github.com/tav/tweetapp] and I can't seem to perform the post
operation correctly.

So basically, how do I use multipart in appengine?

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



[google-appengine] Re: Using UrlFetch with Multipart

2009-06-25 Thread MajorProgamming

Just to get the links straight:
The first one is: http://bit.ly/iK9zi
And the second is http://bit.ly/196RXR

On Jun 25, 10:33 am, MajorProgamming sefira...@gmail.com wrote:
 As per Twitter Docs. one must use the multipart to post the image
 [http://apiwiki.twitter.com/Twitter-REST-API-Method:-
 account update_profile_image]

 I am currently using a twitter-oauth-appengine library [http://
 github.com/tav/tweetapp] and I can't seem to perform the post
 operation correctly.

 So basically, how do I use multipart in appengine?

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



[google-appengine] Re: Using the Humanize part of Django templates

2009-06-24 Thread MajorProgamming

I created a settings.py file and added the INSTALLED APPS but nothing
helps. (the error, btw, is TemplateSyntaxError: 'humanize' is not a
valid tag library: Could not load template library from
django.templatetags.humanize, No module named humanize). Remember,
I'm not using Django; just the forms.

So how can I accomplish this? All I really want to do is automatically
put commas into numbers (e.g. 1000 = 1,000), by using templates...

On Jun 24, 2:08 am, Ian Lewis ianmle...@gmail.com wrote:
 Thats the thing about Django. It tends to not work well unless you use the
 whole framework. INSTALLED_APPS is a setting in the settings.py in django.
 You'll probably need to create a settings.py and put
 'django.contrib.humanize' in the INSTALLED_APPS list.

 see:http://docs.djangoproject.com/en/dev/ref/settings/#installed-apps

 On Wed, Jun 24, 2009 at 7:19 AM, MajorProgamming sefira...@gmail.comwrote:



  I am currently running an app that is ONLY using Django templates (not
  the whole framework). I was wondering how I can use the
  django.contrib.humanize part so I can use specialized filters? It
  mentions something about INSTALLED_APPS, but I have no clue how to do
  that?

  Thanks,

 --
 ===
 株式会社ビープラウド  イアン・ルイス
 〒150-0012
 東京都渋谷区広尾1-11-2アイオス広尾ビル604
 email: ianmle...@beproud.jp
 TEL:03-5795-2707
 FAX:03-5795-2708http://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] Using the Humanize part of Django templates

2009-06-23 Thread MajorProgamming

I am currently running an app that is ONLY using Django templates (not
the whole framework). I was wondering how I can use the
django.contrib.humanize part so I can use specialized filters? It
mentions something about INSTALLED_APPS, but I have no clue how to do
that?

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



[google-appengine] Actually Using Offset

2009-06-22 Thread MajorProgamming

I need to perform a simple ordering query (descending rank) on my
datastore. The default query looks like:

query.order('-rank')

However, I now need to perform paging. I attempted doing:

query.filter('__key__ ', bookmark)
query.order('-rank')
query.order('__key__')

This won't work though because it expects the ordering of the key to
go first.

So I modified it to look like:

query.filter('__key__ ', bookmark)
query.order('__key__')
query.order('-rank')

However, this doesn't produce the desired results.

So my question is, how can I get around this? And if there is no way,
should I just use offset and limit my users to 1000? What should I do?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Idempotence for Cron Jobs

2009-06-22 Thread MajorProgamming

I understand that TaskQueues have the possibility of running over and
over again. Does this apply to cron jobs? Do we need to design them to
be Idempotent as well?

For more info on what I'm talking about:
http://en.wikipedia.org/wiki/Idempotence
http://www.youtube.com/watch?v=o3TuRs9ANhs
--~--~-~--~~~---~--~~
You 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: Check Domain Availability

2009-05-05 Thread MajorProgamming

No, I was actually looking for an api for my app to use to check if a
domain is available

On May 4, 7:05 pm, Jason (Google) apija...@google.com wrote:
 If you're looking for an appspot.com domain, which all App Engine
 applications are served from, then you'll need to register for and sign into
 App Engine and try registering a new application:

 http://appengine.google.com

 Before you can create a new application, you have to specify an application
 ID, which then becomes your subdomain (e.g. example.appspot.com). There's a
 button to check whether a given application ID is available before you
 register it.

 For general domain availability, I recommend a hosting provider website 
 likehttp://www.godaddy.com/.

 - Jason

 On Fri, May 1, 2009 at 3:35 PM, MajorProgamming sefira...@gmail.com wrote:

  I'm looking for a way to check if a domain is available. Preferably to
  run on Google AppEngine alone. But if not then something in plain
  python that will work on my own pc.

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



[google-appengine] Re: Whoa!! What happened to cron?

2009-05-02 Thread MajorProgamming

Nope. But now it's fixed. Must've been a fluke.

On May 1, 3:33 am, 风笑雪 kea...@gmail.com wrote:
 You can check the logs and make sure it runs every seconds.
 I think you may just has a loop in your script that looks always running.

 2009/5/1 MajorProgamming sefira...@gmail.com



  I don't know if it's only happening by me but my crons are running
  every second!!!

  Here is a copy of my cron.yaml:
  cron:
  - description: send at night
   url: /cron/night
   schedule: every sun,mon,tue,wed,thu,fri of apr,may,jun 1:30
  - description: send by day
   url: /cron/day
   schedule: every sun,mon,tue,wed,thu,fri of apr,may,jun 15:30

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



[google-appengine] Whoa!! What happened to cron?

2009-05-01 Thread MajorProgamming

I don't know if it's only happening by me but my crons are running
every second!!!

Here is a copy of my cron.yaml:
cron:
- description: send at night
  url: /cron/night
  schedule: every sun,mon,tue,wed,thu,fri of apr,may,jun 1:30
- description: send by day
  url: /cron/day
  schedule: every sun,mon,tue,wed,thu,fri of apr,may,jun 15:30

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



[google-appengine] Check Domain Availability

2009-05-01 Thread MajorProgamming

I'm looking for a way to check if a domain is available. Preferably to
run on Google AppEngine alone. But if not then something in plain
python that will work on my own pc.

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



[google-appengine] SMS via Email

2009-04-07 Thread MajorProgamming

I am currently developing an app that will send text message
reminders. I was thinking of using each carrier's email gateway to
handle the messages. Are there any potential scaling problems with
this method?

(I plan on sending the text messages via the GAE Email system)

Thank you,
--~--~-~--~~~---~--~~
You 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: Simultaneous Requests

2009-04-04 Thread MajorProgamming

Actually In terms of requests per second I was seeing was around 8
[didn't pay constant refresh attention]... Strangely though, the total
number of requests didn't accurately reflect the actual requests I
performed (in the dashboard -- not in the quota details page). This
may be due to some bug in the system. It doesn't really matter though
because the dashboard view seems to only be an overview, not for
accuracy...

Another thing: no matter how many threads I have there will always be
timeouts. I tried using only one thread (i.e. just running a python
for loop), there were a total of two timeouts. As the number of
threads increase, the number of timeouts increase... Additionally,
when a timeout occurs all the threads seem to fail simultaneously.
They continue to fail for a short period of time, and then they all
resume together.

Just a bit of information that I gathered from quite a bit of
debugging...

On Apr 3, 9:07 pm, Jeff S j...@google.com wrote:
 Julian brings up a good point. I was also wondering what kind of QPS
 you were seeing on your app during one of these tests. Since the
 response from the server likely comes back pretty quickly, ten threads
 could generate quite a few requests in a second.

 Thank you,

 Jeff

 On Apr 2, 8:01 pm, Julian namarojul...@gmail.com wrote:

  You might want to have a look to this App Engine video by Ken
  Ashcraft:http://www.youtube.com/watch?v=dP99fLhGwAU

  App Engine scales, but not instantaneously, so if you want to do a
  large number of requests in parallel, you need to increase the volume
  gradually.

  Julian

  On Apr 3, 4:26 am, MajorProgamming sefira...@gmail.com wrote:

   I believe I'm using python 2.5. The script I posted before is the
   entire script, so no timeouts.

   The server side is simply outputting 'a':
   self.response.out.write('a')
--~--~-~--~~~---~--~~
You 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: Simultaneous Requests

2009-03-31 Thread MajorProgamming

Well the only way I could think of would be client side threading (so
that I could process multiple requests). Or simultaneous ajax (not so
well supported). Either way it would be on the client side, because as
far as I know it can't be done on GAE side...

On Mar 31, 2:52 pm, Jeff S j...@google.com wrote:
 From the quota details page, the current default limit for
 simultaneous active dynamic requests is around 30 per app.

 http://code.google.com/appengine/docs/quotas.html#Request_Limits

 (However, it may be possible to raise these limits on a case by case
 basishttp://code.google.com/appengine/kb/billing.html#cpu)

 Your approach sounds reasonable, but I was curious about your mention
 of threading. Would that be client side threading? Ajax triggers would
 be another good solution which I've seen apps use.

 Thank you,

 Jeff

 On Mar 30, 2:38 pm, MajorProgamming sefira...@gmail.com wrote:

  I am currently working on a way to mass email [in a short period of
  time] using Google App Engine. I figured that as of now the best way
  to do this would be to run many requests in parallel. I was wondering
  if my app would accept many requests at once, and if so what would the
  limit be [in the paid version]?

  Would this work? Is this the best way to do this?

  As for implementing the parallel requests I figured the simplest way
  would be to use the python threading. I was wondering if using AJAX
  would be any better, or if it would even work for parallel requests??

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



[google-appengine] Re: Simultaneous Requests

2009-03-31 Thread MajorProgamming

Wow Doesn't seem like GAE is happy with this arrangement:

I set up a simple system like so (in python)

[code]
import threading
import urllib2

class MyThread ( threading.Thread ):
def __init__ (self,j):
threading.Thread.__init__(self)
self.j=j
self.html=''

def run ( self ):
for x in xrange(500):
try:
response = urllib2.urlopen('http://the test 
url')
html = response.read()
self.html=html
except urllib2.HTTPError, e:
print e.code
except urllib2.URLError, e:
print e.reason
# at end of thread life
print self.html

#init threads (10)
for x in xrange ( 10 ):
   z=MyThread(x)
   z.start()
[/code]

I ran this code on the client side. It ran fine but at approximately
100 requests it began to return Operation Timed Out Errors (code
10060). This is probably due to some Denial of Service protection by
GAE firewalls (?)

Is there any way for me to tell GAE that this is my app, and it's
legit, or is there any way to work around it?

[note: on the server side, nothing turned up on these errors which
leads me to believe it was a very low level protection]



On Mar 31, 2:52 pm, Jeff S j...@google.com wrote:
 From the quota details page, the current default limit for
 simultaneous active dynamic requests is around 30 per app.

 http://code.google.com/appengine/docs/quotas.html#Request_Limits

 (However, it may be possible to raise these limits on a case by case
 basishttp://code.google.com/appengine/kb/billing.html#cpu)

 Your approach sounds reasonable, but I was curious about your mention
 of threading. Would that be client side threading? Ajax triggers would
 be another good solution which I've seen apps use.

 Thank you,

 Jeff

 On Mar 30, 2:38 pm, MajorProgamming sefira...@gmail.com wrote:

  I am currently working on a way to mass email [in a short period of
  time] using Google App Engine. I figured that as of now the best way
  to do this would be to run many requests in parallel. I was wondering
  if my app would accept many requests at once, and if so what would the
  limit be [in the paid version]?

  Would this work? Is this the best way to do this?

  As for implementing the parallel requests I figured the simplest way
  would be to use the python threading. I was wondering if using AJAX
  would be any better, or if it would even work for parallel requests??

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



[google-appengine] Simultaneous Requests

2009-03-30 Thread MajorProgamming

I am currently working on a way to mass email [in a short period of
time] using Google App Engine. I figured that as of now the best way
to do this would be to run many requests in parallel. I was wondering
if my app would accept many requests at once, and if so what would the
limit be [in the paid version]?

Would this work? Is this the best way to do this?

As for implementing the parallel requests I figured the simplest way
would be to use the python threading. I was wondering if using AJAX
would be any better, or if it would even work for parallel requests??

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



[google-appengine] Re: Twitter - rate limit exceeded

2009-03-14 Thread MajorProgamming

I could think of a rather simple solution for twitter: Just give
everyone an API key that they use to authenticate, and make the limits
based on the key instead of the IP addresses. No?

On Mar 14, 12:57 am, Richard Bremner richyr...@gmail.com wrote:
 Hmmm yes this is a difficult one. Neither Twitter nor Google are being
 unreasonable, and each GAE developer is probably performing a sane number of
 Twitter API requests but combined we are ruining it for everyone. Ohhh the
 solution? I can't think of a good solution Twitter could implement which
 wouldn't make it easy to circumvent their limit unreasonably. I do happen to
 have a hosted linux server a I can put a proxy script on, I guess I'm lucky
 there, but I am using GAE for its scaleability which my server certainly
 isn't. I don't need to go into all the reasons GAE is more scaleable than my
 own server :-)
 If anyone thinks of anything, I'd love to know.

 Rich

 2009/3/14 lock lachlan.hu...@gmail.com



  Hmmm.  My next app engine project _was_ going to be an app that relied
  on twitter.  This doesn't sound good.  As per your situation the app
  wouldn't
  hammer twitter, one request to the search API every 5-10 minutes or
  so.

  Given its not exactly an app engine problem did you try contacting
  twitter to see if they could build more 'smarts' into their rate
  limiting?

  Would be really interested to see if you end up resolving this issue,
  thanks
  for the heads up.  Sorry I can't help.

  Cheers, lock

  On Mar 12, 10:43 pm, richyrich richyr...@gmail.com wrote:
   Hi there,

   I have been writing a simple little app that uses the Twitter API. It
   works perfectly on my local development server but it fails when I
   upload it because I get this error from Twitter:

   error=Rate limit exceeded. Clients may not make more than 100 requests
   per hour.

   ...even though my app only makes 1 request. what is happening is that
   other people apps must be using the Twitter API from the same IP
   address. does anyone know a good way around this other than hosting my
   app somewhere else?
--~--~-~--~~~---~--~~
You 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] Billing Questions

2009-02-27 Thread MajorProgamming

Suppose I set up billing with a $1 budget/day (which is the minimum).
I understand that I will be billed $7/week.

What happens if I don't go over any of the free quotas the first week?
Will Google bill me again the next week?

What happens if I use $2 the first week? Will Google only charge me $2
[to get the balance back up to $7] or will Google bill me again $7 the
next week?

If my account has money in it, can I cancel billing, and allow GAE to
remain on the paid version until the remaining $ has been used up?

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



[google-appengine] Re: Billing Questions

2009-02-27 Thread MajorProgamming

Oh! Thanks a lot for all your help.

The wording on the billing page is a bit confusing. It makes it sound
as though the credit card is charged every week, regardless of usage.

On Feb 27, 5:01 pm, Dan Sanderson dansander...@google.com wrote:
 Ross is correct.  You only pay for what you use.  If your app doesn't go
 over the free quotas, you pay nothing, regardless of how you set your
 maximum daily budget.
 When you set your budget for the first time, you go through the Google
 Checkout process to authorize the maximum budget.  This process does *not*
 charge you any money, it only authorizes the budget.

 -- Dan

 On Fri, Feb 27, 2009 at 1:50 PM, Ross M Karchner 
 rosskarch...@gmail.comwrote:

  From what I can tell, the $1 is a *budget*, you won't be charged anything
  if you don't go over the free quotas.

  On Fri, Feb 27, 2009 at 4:23 PM, MajorProgamming sefira...@gmail.comwrote:

  Suppose I set up billing with a $1 budget/day (which is the minimum).
  I understand that I will be billed $7/week.

  What happens if I don't go over any of the free quotas the first week?
  Will Google bill me again the next week?

  What happens if I use $2 the first week? Will Google only charge me $2
  [to get the balance back up to $7] or will Google bill me again $7 the
  next week?

  If my account has money in it, can I cancel billing, and allow GAE to
  remain on the paid version until the remaining $ has been used up?

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



[google-appengine] Billing Question

2009-02-26 Thread MajorProgamming

Something I didn't understand well about budgets: Can we set the
amount we're willing to pay per resource. For example, suppose I set a
budget of $50. Can I tell GAE to only use that money for let's say
Bandwidth and Email [as opposed to all resources]?
--~--~-~--~~~---~--~~
You 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] Email Question

2009-02-26 Thread MajorProgamming

Now that Billing is available, I have some questions about Emails:

The price is .0001/message. Does that mean I can really send an
unlimited number of messages (provided I pay)?

What are the limits of email per request?

Is it a good idea to use this for SMS [alerts], where I send out a
mass email to many ppl via [user's numb...@[carrier's address].com  ?


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



[google-appengine] Re: Email Question

2009-02-26 Thread MajorProgamming

So is there any way to have that process die, and then call a new
process automatically. Or, is there a way to run many processes in
parallel. Like suppose I need to send out ~5000 emails? What would be
the best way to do that?

On Feb 26, 12:40 pm, Marzia Niccolai ma...@google.com wrote:
 Hi,

 With billing, you can send as many emails as you can process during the 30
 second request deadline.  So while you can pay for sending as many emails as
 you would like, the request deadline will still be a factor in completing
 any App Engine operations.

 I don't know how many emails you can send in 30 seconds (I've never tried to
 test the limit), but I'd imagine it would be on the order of 30.

 -Marzia

 On Thu, Feb 26, 2009 at 7:00 AM, MajorProgamming sefira...@gmail.comwrote:



  Now that Billing is available, I have some questions about Emails:

  The price is .0001/message. Does that mean I can really send an
  unlimited number of messages (provided I pay)?

  What are the limits of email per request?

  Is it a good idea to use this for SMS [alerts], where I send out a
  mass email to many ppl via [user's numb...@[carrier's address].com  ?

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



[google-appengine] Entity Equality

2009-02-21 Thread MajorProgamming

I currently have a need to take a result from a query (which is a
list) and remove one entity from it. For some reason though when I
perform the remove, I get an error which says that the entity does not
exist on the list. How can I do this correctly?

Code:
#excerpt:
#wx and wx2 are db.Query objects with filters...
#I want to remove wx2 from wx
direct=wx2.get()
wx=wx.fetch(limit=50)
wx.remove(direct)
#this code returns an error. I know for a fact (through debugging)
that wx2 entity exists in the wx result.


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



[google-appengine] Proper way to handle DownloadError: ApplicationError: 5

2009-02-03 Thread MajorProgamming

Is this the proper way to handle Download Errors from urlfetch (which
happen quite often in my app)?

try:
  result = urlfetch.fetch(url=url)
except DownloadError:
  #return an error


Basically a coding/python question

Also, would it work to except, and try again within that same test?

For example,

except DownloadError:
  result = urlfetch.fetch(url=url)
--~--~-~--~~~---~--~~
You 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: Custom Login System

2009-01-24 Thread MajorProgamming

If that's what's coming from the browser,
 then anyone else can just sniff that hash and send it as the password
 with the username.
Not really, because you can simply tell the client to hash the
password with some random number (or string) that you sent to the
browser... Otherwise, though, you are correct.

And even if I do use openID, or the like, I also wanted to know about
securing the cookie (or session), because even in such a situation
they only perform the password check. The rest is in the applications
hands.

On Jan 23, 10:50 pm, bowman.jos...@gmail.com
bowman.jos...@gmail.com wrote:
 By the way, relying on javascript to handle hashing passwords and such
 isn't a reliable solution. If that's what's coming from the browser,
 then anyone else can just sniff that hash and send it as the password
 with the username. In the end you're relying on data from the client
 being secure, which is bad.

 I'd suggest, if you don't want to use the Google User API, you look
 into still using other ID providers, such as OpenID, Oauth, or
 Facebook connect. They will handle the login via SSL on their end, and
 the account validation would happen via urlfetch between your
 application and the provider, leaving no traffic to be sniffed on the
 users network.

 If you really need a unique user system, I suppose you could set up a
 VPS server and have it act as an OpenID provider. One thought that
 just hit me as I writing this up is you could also use the build in
 application.appspot.com ssl that google provides you to handle the
 login by making it an OpenID provider. I believe there's a sample
 application out there for making an OpenID provider on GAE. Then your
 application, if you're using your own domain name, could urlfetch to
 itself for that portion of the authentication, in order to get the
 cookie domain set correctly for your sessions.

 This is something that would make an interesting little project, I
 wish I had time for.

 On Jan 23, 10:42 pm, bowman.jos...@gmail.com

 bowman.jos...@gmail.com wrote:
  gaeutilities -http://gaeutilities.appspot.com/-has a session class
  built specifically to work around that problem. The session id (used
  for matching data to the session) is never passed to the browser,
  rather is uses a session token system. By default a session token is
  valid for only 5 seconds, after which a new session token is
  generated. The current token, plus previous two, are stored and are
  valid on requests in order to not cause problems with sites who's
  pages may make multiple requests (AJAX oriented sites). It also
  includes a middleware class so you can plug it in and use it directly
  with memcache.

  Version 1.1.1 is the current release, and the next release will
  include some new functionality to try and increase the performance by
  relying more on memcache (while still using the datastore in order to
  provide a completely reliable solution). It already uses both, but I'm
  working on cutting down the amount of writes.

  It's BSD licensed, open source. There are no fees or attribution
  requirements for it's use.

  This will not provide you with a login system. However, it does plug
  directly into django using the middleware so you can use django's
  authentication system. I in fact am currently using it, django, and
  the appenginepatch project -http://code.google.com/p/app-engine-patch/
  - with some custom backends to handle OpenId and Oauth authentication
  for my user management system.

  On Jan 23, 4:16 pm, MajorProgamming sefira...@gmail.com wrote:

   Javascript on your login form should first hash the password, then
   hash the result with a salt - say the session id
   I assume that's only true if I opt out of SSL?

   That way the contents of the cookie are no use to anyone, all useful
   info
   is stored in memcache, where attackers can't get it.
   But can't the attackers simply spoof a request with that session id in
   the cookies?

   On Jan 23, 4:01 pm, Greg g.fawc...@gmail.com wrote:

First, if you are not a security expert, consider using Django's
authentication framework. Online security is not easy  - there are a
lot of things you have to get right, and missing just one of them
means you've failed.

I have a reasonable amount of experience with online security, so I
built my own authentication system on top of gmemsess, a memchache-
backed session object. Unfortunately my code isn't modular enough to
publish, but here are a few pointers...

- SSL is always good, because it means anyone with access to your
comms can't easily see what you are doing. However, it isn't crucial,
as long as your customers can live with the unlikely event of someone
sniffing their traffic - a good authentication scheme will prevent
attackers sniffing passwords, although everything they do after
logging in may be visible.

- Cookies are far more convenient than trying to pass a session ID
with every

[google-appengine] Custom Login System

2009-01-23 Thread MajorProgamming

I am currently working on a App that requires that I use a custom sign
in method.

I was wondering if there are any security flaws I should be aware
of...

Also:

I was wondering if I must use SSL for proper security?

Is the best way to maintain sessions through using cookies?

Do I have to perform some sort of check on the cookie even though I'm
using SSL? If so should I maybe use a separate hash cookie?

Is directly writing cookies to the set-cookie header and retrieving
them by parsing the cookie header, okay? Or is there a security flaw
I should be aware of?

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



[google-appengine] Secure Feeds (RSS, ATOM)

2009-01-23 Thread MajorProgamming

Does anyone know of how to deal with secure feeds:

For example, suppose I have a feed that should only give infromation
to a user when s/he's logged in. What's the best (and most secure) way
to implement this?:?

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



[google-appengine] Re: Custom Login System

2009-01-23 Thread MajorProgamming

Javascript on your login form should first hash the password, then
hash the result with a salt - say the session id
I assume that's only true if I opt out of SSL?

That way the contents of the cookie are no use to anyone, all useful
info
is stored in memcache, where attackers can't get it.
But can't the attackers simply spoof a request with that session id in
the cookies?

On Jan 23, 4:01 pm, Greg g.fawc...@gmail.com wrote:
 First, if you are not a security expert, consider using Django's
 authentication framework. Online security is not easy  - there are a
 lot of things you have to get right, and missing just one of them
 means you've failed.

 I have a reasonable amount of experience with online security, so I
 built my own authentication system on top of gmemsess, a memchache-
 backed session object. Unfortunately my code isn't modular enough to
 publish, but here are a few pointers...

 - SSL is always good, because it means anyone with access to your
 comms can't easily see what you are doing. However, it isn't crucial,
 as long as your customers can live with the unlikely event of someone
 sniffing their traffic - a good authentication scheme will prevent
 attackers sniffing passwords, although everything they do after
 logging in may be visible.

 - Cookies are far more convenient than trying to pass a session ID
 with every request. Your cookie should contain a single random ID,
 which your app then uses to find the session object in memcache. That
 way the contents of the cookie are no use to anyone, all useful info
 is stored in memcache, where attackers can't get it.

 - Store a hash of the password on appengine, not the password itself.
 This means admin cannot steal passwords, as well as allowing for safe
 transport of the password.

 - Javascript on your login form should first hash the password, then
 hash the result with a salt - say the session id. The extra salted
 hash prevents a sniffer from simply sending the hash to login, and
 also guards against using rainbow tables to discover the password.
 Make sure you destroy the field containing the original password, so
 it isn't sent in clear along with the hash!

 - On appengine, hash the stored password hash with the salt and
 compare with the sent hash - they should be the same.

 - I usually disable the account if I get three wrong passwords, to
 prevent dictionary attacks. This requires some admin work to handle
 users who've been locked out, but means you don't need to implement
 captchas.

 - Authentication is only the first step - you need to keep security at
 the top of your agenda throughout the whole application. For instance,
 if you have a url like fox.delete?id=123 that deletes a user's fox,
 always check that 123 actually belongs to this user. Otherwise users
 could delete other user's foxes by retyping the url.

 gmemsess is athttp://code.google.com/p/gmemsess/

 Cheers!
 Greg.

 On Jan 24, 8:42 am, MajorProgamming sefira...@gmail.com wrote:

  I am currently working on a App that requires that I use a custom sign
  in method.

  I was wondering if there are any security flaws I should be aware
  of...

  Also:

  I was wondering if I must use SSL for proper security?

  Is the best way to maintain sessions through using cookies?

  Do I have to perform some sort of check on the cookie even though I'm
  using SSL? If so should I maybe use a separate hash cookie?

  Is directly writing cookies to the set-cookie header and retrieving
  them by parsing the cookie header, okay? Or is there a security flaw
  I should be aware of?

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



[google-appengine] Re: Static File Questions

2009-01-09 Thread MajorProgamming

I'm not sure I understand you. Which question # were you trying to
answer?

On Jan 9, 3:26 am, niklasr nikla...@gmail.com wrote:
 Reversibly breaking and remaking larger than 1MB files persistently
 storing max 1 MB chunks, gae http get and post support the larger. The
 gae http transport as it is handles larger files. The 1MB limit only
 limits the entities, not the transport.

 On Jan 8, 11:59 pm, MajorProgamming sefira...@gmail.com wrote:

  Just a few questions on static files:

  1. Does serving a static file cost CPU usage?

  2. Does having a large number of static files (let's say like 700)
  have _any_ effect on performance of page serving [similarly, does
  having a lot of mappings affect performance]?

  3. When a python script reads a file off the app's filesystem (like a
  template html file), is that any faster than a get_by_key on the
  datastore? [i.e. filesystem vs. bigtable performance]?

  4. Will the paid version of Google App Engine allow over 1000 files
  and/or larger than 1MB files (or entities)?

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



[google-appengine] Sort by Relevance

2009-01-09 Thread MajorProgamming

I know that the MySQL version of FullText search supports sorting by
Relevance. Is there any way to mimic this functionality on App Engine?
[whether through Searchable Entity or through custom methods]?

--~--~-~--~~~---~--~~
You 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] Static File Questions

2009-01-08 Thread MajorProgamming

Just a few questions on static files:

1. Does serving a static file cost CPU usage?

2. Does having a large number of static files (let's say like 700)
have _any_ effect on performance of page serving [similarly, does
having a lot of mappings affect performance]?

3. When a python script reads a file off the app's filesystem (like a
template html file), is that any faster than a get_by_key on the
datastore? [i.e. filesystem vs. bigtable performance]?

4. Will the paid version of Google App Engine allow over 1000 files
and/or larger than 1MB files (or entities)?

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



[google-appengine] Proper use of BASE HTML tag

2009-01-08 Thread MajorProgamming

Is this treated well (and accepted as proper usage) by all standards
and browser?

base href=/
--~--~-~--~~~---~--~~
You 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: Django Templates Usage

2009-01-07 Thread MajorProgamming

Got ya. Didn't realize that would solve the problem. Thanks for your
help!

On Jan 7, 3:42 pm, Rodrigo Moraes rodrigo.mor...@gmail.com wrote:
 On Wed, Jan 7, 2009 at 6:25 PM, MajorProgamming wrote:
  This all worked well when my pages looked like http://example.com/
  apage, where the relative pointers to the images directory would
  resolve well. However, I am now creating pages that look like http://
  example.com/adir/apage, and my relative URLs are breaking! The
  problem is that I can't just change the base.html template, because
  the my http://example.com/apage; URLs would break. Is there any way
  to handle this using django?

  (Also, I would rather not use absolute URLs)

 Not sure if i understood the problem, but I'm guessing you should just
 standardize to use relative url's based on the root, in other words,
 always start relative url's with / and provide the full path.

 This will avoid lots of headaches.

 -- rodrigo
--~--~-~--~~~---~--~~
You 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] Working with mappings

2009-01-03 Thread MajorProgamming

Sample code:

application = webapp.WSGIApplication([('/', MainPage),
  ('/newentry', NewEntry),
  ('/editentry', EditEntry),
  ('/deleteentry', DeleteEntry),
 ],
 debug=True)

Firstly, Do these mappings also support regular expression mappings?

Secondly, How can I use dynamic mappings (like instead of
http://example.com/article?id=20 -- http://example.com/article/20)?
[and is there any advantage to doing query strings in this fashion?]

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



[google-appengine] Weird behavior of Django - Cycle

2009-01-03 Thread MajorProgamming

I have this code in one of my HTML Templates:

{%if forloop.counter0|divisibleby:3%}/trtr class={% cycle
even,odd%}{%endif%}

[snipped out]

For some reason every time I reload the page, the cycle behaves
differently. It's almost like the system keeps the last cycling in
memory - could there be some sort of leakage? What am I doing wrong?
--~--~-~--~~~---~--~~
You 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: Working with mappings

2009-01-03 Thread MajorProgamming

What's passed to the article_id parameter? How does GAE know what to
pass?

On Jan 3, 7:58 pm, Rodrigo Moraes rodrigo.mor...@gmail.com wrote:
 On Sat, Jan 3, 2009 at 10:02 PM, MajorProgamming wrote:
  Firstly, Do these mappings also support regular expression mappings?

 They *are* regular expressions. That's how those expressions are evaluated.

  Secondly, How can I use dynamic mappings (like instead of
 http://example.com/article?id=20--http://example.com/article/20)?

 ('/article/([\d]+)', Article)

 With the above rule, the matched values are passed to the handler, in
 order. So in Article you'll have the method get(self, article_id),
 which receives the article id from the matched rule.

  [and is there any advantage to doing query strings in this fashion?]

 Well, sometimes query strings are more convenient, but in many times
 you would want to certify that only url's with minimally valid
 parameters (in the above example, an integer) will match. With ?id=20,
 you'll have to check if an id is passed in the handler method, *after*
 the dispatch process. It's also a matter of aesthetics and, most
 important, how your handlers are organized.

 -- rodrigo
--~--~-~--~~~---~--~~
You 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] Memcache Usage with Timeouts - Question

2008-12-28 Thread MajorProgamming

I have an app where I want to set a memcache for 1 hour expiration,
and then update it while keeping the same timeout (i.e. when I update
it I don't want the 1-hour to start over, I just want the value to
change, while keeping the timeout the same as b4). How can I do 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
-~--~~~~--~~--~--~---



[google-appengine] Re: Memcache Usage with Timeouts - Question

2008-12-28 Thread MajorProgamming

Thanks. Nice workaround!

On Dec 28, 4:50 pm, Barry Hunter barrybhun...@googlemail.com
wrote:
 the 'time' when you add memcache value can actully be a timestamp.
 When you first add calculate 'expire time' then either store in the
 value, or in a another memcache item. That way when you replace it you
 just read the current expire timestamp, and use it again.

 2008/12/28 MajorProgamming sefira...@gmail.com:



  I have an app where I want to set a memcache for 1 hour expiration,
  and then update it while keeping the same timeout (i.e. when I update
  it I don't want the 1-hour to start over, I just want the value to
  change, while keeping the timeout the same as b4). How can I do this?

 --
 Barry

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



[google-appengine] Using other python files with my app; importing

2008-12-28 Thread MajorProgamming

This may be more of a general python question, but what's the best way
of using many different .py files and importing one into another. For
example, suppose I want to have one main.py and have a separate file
that contains like 15 functions which are needed in main.py. First of
all, what  do I have to include in the function.py file? and secondly,
what do I have to include in the main.py file?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] get_by_key_name timeout!

2008-12-20 Thread MajorProgamming

12-19 06:34PM 51.839
Traceback (most recent call last):
  File /base/python_lib/versions/1/google/appengine/ext/webapp/
__init__.py, line 498, in __call__
handler.get(*groups)
  File /base/data/home/apps/[edited out]/1.329827330674031168/
helloworld.py, line 96, in get
curuser=CellPhones.get_by_key_name(n:+number)
  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 217, in Get
raise _ToDatastoreError(err)
  File /base/python_lib/versions/1/google/appengine/api/
datastore.py, line 1637, in _ToDatastoreError
raise errors[err.application_error](err.error_detail)
Timeout

I understand that I get timeouts for put() operations, but what's the
explanation for this one?
--~--~-~--~~~---~--~~
You 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 way to mass mail

2008-12-19 Thread MajorProgamming

Why is it hard work, from my understanding it simply requires
sending an email to X amount of people.

I could probably set up a PHP script to do this rather quickly...

The specific problem with Google App Engine is that there are
excecution time / cpu limits (per request), and there are also email
limits (2000 per day).

On Dec 19, 5:33 am, Greg g.fawc...@gmail.com wrote:
 On Dec 19, 1:00 pm, MajorProgamming sefira...@gmail.com wrote:

  1. What would be the best way to implement this considering the
  current features available on google app engine (and possibly other
  free services)?

 There are numerous (non-spam) mas mailing services, but no free ones
 that I know of. Mass mailing is actually quite hard work, which is why
 you have to pay for this. Unless you own a botnet of course...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: App name error ...

2008-12-18 Thread MajorProgamming

Probably.

However, on a side note, you can create a application with the name
AccuWeaver2 (or the like), and then when you have it run on your
domain, your users wouldn't notice a thing...

On Dec 18, 5:48 pm, Webweave webwe...@gmail.com wrote:
 So there's somebody out there using my company name as a gmail
 account 

 On Dec 18, 11:59 am, Jesaja Everling jeverl...@gmail.com wrote:

  Hi!

  This is due to the fact that App Engine apps share the gmail namespace.
  That means that if you already have a gmail-account registered, you
  cannot register an app with the same name.
  For example, I couldn't register jeverling.

  Best Regards,

  Jesaja Everling

  On Thu, Dec 18, 2008 at 8:52 PM, Webweave webwe...@gmail.com wrote:

   When I try to create my app name with my company name (AccuWeaver), it
   tells me An App or Google Account already exists with that name.

   Now how is that possible, when that is my company name, and I'm the
   only one with rights to that name ?

   How do I find out who is using my company name where it impacts Google
   App Engine ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-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] Best way to mass mail

2008-12-18 Thread MajorProgamming

Suppose one of the features I have on the App I'm creating, is the
ability for users to subscribe for certain alerts.

1. What would be the best way to implement this considering the
current features available on google app engine (and possibly other
free services)?

2. [this one should probably be answered by a google employee:] Is
this type of functionality ever going to be fully supported by app
engine?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-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 way to mass mail

2008-12-18 Thread MajorProgamming

That would work well for a small amount of users. But what if my app
grows to like 5,000 emails? Your solution would definitely work well
at that point!

Do you maybe know of an external service that would allow me to set up
s/t to broadcast to many url's or is there another way that i'm
missing?

On Dec 18, 7:43 pm, Alexander Kojevnikov alexan...@kojevnikov.com
wrote:
  Suppose one of the features I have on the App I'm creating, is the
  ability for users to subscribe for certain alerts.

  1. What would be the best way to implement this considering the
  current features available on google app engine (and possibly other
  free services)?

 There are two issues to consider:

  * Calling send_mail() takes time, don't send too many emails in one
 request.
  * If you send too many emails within a short period of time you will
 get a quota exceeded error, even if you don't reach your daily email
 quota.

 What I do in my app is the following:

  * I ping a certain URL from an external box.
  * The handler of that URL sends one pending email.
  * Wait, rinse, repeat. Time to wait (in seconds) = 24 * 60 * 60 /
 daily_quota.

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



[google-appengine] Re: Best way to mass mail

2008-12-18 Thread MajorProgamming

Whoops, typo: I meant: Your solution would definitely _not_ work well
at that point!

On Dec 18, 9:31 pm, MajorProgamming sefira...@gmail.com wrote:
 That would work well for a small amount of users. But what if my app
 grows to like 5,000 emails? Your solution would definitely work well
 at that point!

 Do you maybe know of an external service that would allow me to set up
 s/t to broadcast to many url's or is there another way that i'm
 missing?

 On Dec 18, 7:43 pm, Alexander Kojevnikov alexan...@kojevnikov.com
 wrote:

   Suppose one of the features I have on the App I'm creating, is the
   ability for users to subscribe for certain alerts.

   1. What would be the best way to implement this considering the
   current features available on google app engine (and possibly other
   free services)?

  There are two issues to consider:

   * Calling send_mail() takes time, don't send too many emails in one
  request.
   * If you send too many emails within a short period of time you will
  get a quota exceeded error, even if you don't reach your daily email
  quota.

  What I do in my app is the following:

   * I ping a certain URL from an external box.
   * The handler of that URL sends one pending email.
   * Wait, rinse, repeat. Time to wait (in seconds) = 24 * 60 * 60 /
  daily_quota.

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



[google-appengine] Re: Best way to mass mail

2008-12-18 Thread MajorProgamming

Well another point is that if I want to send time-sensitive info, it
would be impossible (i.e. with your method, you are running the
sending throughout the entire day, but in some cases almost-instant
sending is required).

Another problem worth mentioning is that mass-fetching from the
datastore (all the emails) would not work in the current appengine...

On Dec 18, 9:50 pm, Alexander Kojevnikov alexan...@kojevnikov.com
wrote:
  That would work well for a small amount of users. But what if my app
  grows to like 5,000 emails? Your solution would definitely not work
  well at that point!

 I agree that it's far from being perfect, but I don't see why it
 wouldn't scale. I currently send about 100 emails a day, if this
 number grows, I would just need to buy more quota and ping the mail
 sender URL more frequently (every 17 seconds for 5,000 emails a day).

  Do you maybe know of an external service that would allow me to set up
  s/t to broadcast to many url's or is there another way that i'm
  missing?

 Google will eventually roll out a solution for background processing,
 you can switch to it when it's available.

 Also, a few workarounds have been discussed in this group, just search
 it for background.

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



[google-appengine] Re: Empty Subject - Mail API

2008-12-15 Thread MajorProgamming

Did that:

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

Thanks

On Dec 15, 2:32 pm, Marzia Niccolai ma...@google.com wrote:
 Hi,

 Please file a feature request for 
 this:http://code.google.com/p/googleappengine/issues/list

 Currently, the best work around is to set the subject line to a single space
 (' ') if you would prefer not to send a subject.

 -Marzia

 On Sun, Dec 14, 2008 at 3:05 PM, MajorProgamming sefira...@gmail.comwrote:





  Is there any reason Google does not allow an empty subject when
  sending email via AppEngine? There are many cases where this would
  prove useful.

  [on a side not - even GMail allows sending email w/ empty subjects]- Hide 
  quoted text -

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



[google-appengine] Empty Subject - Mail API

2008-12-14 Thread MajorProgamming

Is there any reason Google does not allow an empty subject when
sending email via AppEngine? There are many cases where this would
prove useful.

[on a side not - even GMail allows sending email w/ empty subjects]
--~--~-~--~~~---~--~~
You 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: Interesting How-to Datastore Question

2008-11-26 Thread MajorProgamming

Well I figured out a sort of fix (similar to urs but doesn't require
pinging from external box):

I basically added a list property to MainListOfArticles that contains
all the user objects that commented on that specific article [I'll
call it CommentsOnArticles]. So every time someone comments I add a
comment to the CommentsOnArticles (once for each user!), and also
update the MainListOfArticles entity. I also added an entity called
lastCommentedOnDate which is updated every time a new user comments.

So when a user logs in I simply use s/t like the following code
(snipped out) to fetch all his articles that were commented on:

q=db.Query(MainListOfArticles)
q.filter('usersThatCommented =',currentUser)
q.order('-lastCommentedOnDate') //ascending or descending depending on
ur preference
results = q.fetch(5)

You will also need a special index for this query (that usually is
added automatically through the SDK)

The only problem is that if ___too___ (it would have to be like 1000s,
I think) many different users comment on one single article you could
go over the 1 MB per entity limit...



On Nov 12, 7:18 pm, Alexander Kojevnikov [EMAIL PROTECTED]
wrote:
 Great question!

 I have a somewhat similar model in my app (it's not articles but the
 query is similar), here's how I do it:

 I de-normalise the data specifically for this query, that is I have a
 kind:

 UserComment:
     user = db.UserProperty()
     last_commented = db.DateTimeProperty()
     # de-normalised data from the article model (key, title, slug,
 etc).

 When the user creates a comment, I add a UserComment if it's the first
 comment for the user in this article.

 I also add an entity to the job queue model for background processing.
 The background worker (triggered by pinging from an external box)
 updates UserComment.last_commented for all users that also commented
 the article.

 It's far from perfect, there's a (slight) delay in update, but
 otherwise it works. I'm very interested in how others would implement
 this.

 Alex
 --www.muspy.com

 On Nov 13, 9:50 am, MajorProgamming [EMAIL PROTECTED] wrote:



  I was wondering how to approach the following:

  Suppose I have three DB Models that look something like this:

  MainListOfArticles(db.Model):
  articleText=db.Text
  [...]

  CommentsOnArticles(db.Model):
  commentText=db.Text
  articleRef=db.ReferenceProperty(MainListOfArticles)
  userThatWrote=db.UserProperty
  [...]

  Users(db.Model):
  userObject=db.UserProperty
  [...]

  Now suppose I would like to retreive all articles that the user
  commented on, based on the recency of the latest comment on that
  article. I.e: when a user logs in he gets a decending list of all
  articles *that he commented on* sorted by how recently they were
  commented on (by others).

  To put it in other words: To get all articles based on the recency of
  their comments would be easy: simply retrieve the comments sorted by
  order descending. However, I would like a way to specifically retreive
  those that the user commented on.

  Another point: I want the solution to scale. Keep in mind that there
  could be an infinite number of articles and users. So storing them in
  an individual entity would not work. There is a 1MB limit per entity
  (that probably squashes many possible solutions).

  Thanks for your help,

  And if I didn't explain everything correctly, please ask me to clarify
  a point- Hide quoted text -

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



[google-appengine] Re: Interesting How-to Datastore Question

2008-11-26 Thread MajorProgamming

Correct Post:::

Well I figured out a sort of fix (similar to urs but doesn't require
pinging from external box):

I basically added a list property to MainListOfArticles that contains
all the user objects that commented on that specific article [I'll
call it usersThatCommented]. So every time someone comments I add a
comment to the CommentsOnArticles, and also
update the MainListOfArticles entity where I update the
usersThatCommented list (once for each user!). I also added a date
property called
lastCommentedOnDate which is updated every time a new user comments.


So when a user logs in I simply use s/t like the following code
(snipped out) to fetch all his articles that were commented on:


q=db.Query(MainListOfArticles)
q.filter('usersThatCommented =',currentUser)
q.order('-lastCommentedOnDate') //ascending or descending depending
on
ur preference
results = q.fetch(5)


You will also need a special index for this query (that usually is
added automatically through the SDK)


The only problem is that if ___too___ (it would have to be like
1000s,
I think) many different users comment on one single article you could
go over the 1 MB per entity limit...


On Nov 12, 7:18 pm, Alexander Kojevnikov [EMAIL PROTECTED]
wrote:
 Great question!

 I have a somewhat similar model in my app (it's not articles but the
 query is similar), here's how I do it:

 I de-normalise the data specifically for this query, that is I have a
 kind:

 UserComment:
     user = db.UserProperty()
     last_commented = db.DateTimeProperty()
     # de-normalised data from the article model (key, title, slug,
 etc).

 When the user creates a comment, I add a UserComment if it's the first
 comment for the user in this article.

 I also add an entity to the job queue model for background processing.
 The background worker (triggered by pinging from an external box)
 updates UserComment.last_commented for all users that also commented
 the article.

 It's far from perfect, there's a (slight) delay in update, but
 otherwise it works. I'm very interested in how others would implement
 this.

 Alex
 --www.muspy.com

 On Nov 13, 9:50 am, MajorProgamming [EMAIL PROTECTED] wrote:



  I was wondering how to approach the following:

  Suppose I have three DB Models that look something like this:

  MainListOfArticles(db.Model):
  articleText=db.Text
  [...]

  CommentsOnArticles(db.Model):
  commentText=db.Text
  articleRef=db.ReferenceProperty(MainListOfArticles)
  userThatWrote=db.UserProperty
  [...]

  Users(db.Model):
  userObject=db.UserProperty
  [...]

  Now suppose I would like to retreive all articles that the user
  commented on, based on the recency of the latest comment on that
  article. I.e: when a user logs in he gets a decending list of all
  articles *that he commented on* sorted by how recently they were
  commented on (by others).

  To put it in other words: To get all articles based on the recency of
  their comments would be easy: simply retrieve the comments sorted by
  order descending. However, I would like a way to specifically retreive
  those that the user commented on.

  Another point: I want the solution to scale. Keep in mind that there
  could be an infinite number of articles and users. So storing them in
  an individual entity would not work. There is a 1MB limit per entity
  (that probably squashes many possible solutions).

  Thanks for your help,

  And if I didn't explain everything correctly, please ask me to clarify
  a point- Hide quoted text -

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



[google-appengine] Interesting How-to Datastore Question

2008-11-12 Thread MajorProgamming

I was wondering how to approach the following:

Suppose I have three DB Models that look something like this:

MainListOfArticles(db.Model):
articleText=db.Text
[...]

CommentsOnArticles(db.Model):
commentText=db.Text
articleRef=db.ReferenceProperty(MainListOfArticles)
userThatWrote=db.UserProperty
[...]

Users(db.Model):
userObject=db.UserProperty
[...]

Now suppose I would like to retreive all articles that the user
commented on, based on the recency of the latest comment on that
article. I.e: when a user logs in he gets a decending list of all
articles *that he commented on* sorted by how recently they were
commented on (by others).

To put it in other words: To get all articles based on the recency of
their comments would be easy: simply retrieve the comments sorted by
order descending. However, I would like a way to specifically retreive
those that the user commented on.

Another point: I want the solution to scale. Keep in mind that there
could be an infinite number of articles and users. So storing them in
an individual entity would not work. There is a 1MB limit per entity
(that probably squashes many possible solutions).

Thanks for your help,

And if I didn't explain everything correctly, please ask me to clarify
a point
--~--~-~--~~~---~--~~
You 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: www.*.appspot.com

2008-11-11 Thread MajorProgamming

That doesn't seem to be what I am talking about... I'm talking about
on appspot.com when you have a subdomain and want www.that-subdomain.appspot.com
to work.

To illustrate my point: try visiting www.shell.appspot.com

On Nov 11, 9:33 am, Giovanni Novelli [EMAIL PROTECTED]
wrote:
 There is an accepted issue about such 
 problem:http://code.google.com/p/googleappengine/issues/detail?id=768

 2008/11/11 Jon McAlister [EMAIL PROTECTED]



  That sounds like a reasonable request to me, please file an issue:
 http://code.google.com/p/googleappengine/issues/list

  On Nov 9, 6:22 pm, MajorProgamming [EMAIL PROTECTED] wrote:
   I noticed that www.*.appspot.com (where * is the subdomain that you
   picked) doesn't work. Is there any reason for this? It would make
   sense to have both options for those of our users who don't know any
   better (and prefix all urls with www).

   by the way, blogspot does support www...
--~--~-~--~~~---~--~~
You 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] www.*.appspot.com

2008-11-09 Thread MajorProgamming

I noticed that www.*.appspot.com (where * is the subdomain that you
picked) doesn't work. Is there any reason for this? It would make
sense to have both options for those of our users who don't know any
better (and prefix all urls with www).

by the way, blogspot does support www...
--~--~-~--~~~---~--~~
You 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---