[google-appengine] [Errno 29] Illegal seek

2009-11-23 Thread Markitecht
Strangeness.

When I run my application (local or deployed), the first time i load a
page (any page) on the app I get an error like the following:

 -->  --> -->


 Python 2.5.1: /System/Library/Frameworks/
Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/
Python
Mon Nov 23 20:10:00 2009

A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.
 /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py in _HandleRequest
(self=)
 2976   infile,
 2977   outfile,
 2978   base_env_dict=env_dict)
 2979 finally:
 2980   self.module_manager.UpdateModuleFileModificationTimes
()
base_env_dict undefined, env_dict = {'APPLICATION_ID': 'wordybot',
'CURRENT_VERSION_ID': '1.1', 'REMOTE_ADDR': '127.0.0.1',
'REQUEST_METHOD': 'GET', 'SERVER_NAME': 'localhost', 'SERVER_PORT':
'8094', 'SERVER_PROTOCOL': 'HTTP/1.0', 'SERVER_SOFTWARE': 'Development/
1.0'}
 /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py in Dispatch
(self=, relative_url='/', path=None, headers=, infile=, outfile=,
base_env_dict={'APPLICATION_ID': 'wordybot', 'CURRENT_VERSION_ID':
'1.1', 'REMOTE_ADDR': '127.0.0.1', 'REQUEST_METHOD': 'GET',
'SERVER_NAME': 'localhost', 'SERVER_PORT': '8094', 'SERVER_PROTOCOL':
'HTTP/1.0', 'SERVER_SOFTWARE': 'Development/1.0'})
  409   infile,
  410   outfile,
  411
base_env_dict=base_env_dict)
  412
  413 if forward:
base_env_dict = {'APPLICATION_ID': 'wordybot', 'CURRENT_VERSION_ID':
'1.1', 'REMOTE_ADDR': '127.0.0.1', 'REQUEST_METHOD': 'GET',
'SERVER_NAME': 'localhost', 'SERVER_PORT': '8094', 'SERVER_PROTOCOL':
'HTTP/1.0', 'SERVER_SOFTWARE': 'Development/1.0'}
 /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py in Dispatch
(self=, relative_url='/', path='main.py',
headers=,
infile=,
outfile=, base_env_dict=
{'APPLICATION_ID': 'wordybot', 'CURRENT_VERSION_ID': '1.1',
'REMOTE_ADDR': '127.0.0.1', 'REQUEST_METHOD': 'GET', 'SERVER_NAME':
'localhost', 'SERVER_PORT': '8094', 'SERVER_PROTOCOL': 'HTTP/1.0',
'SERVER_SOFTWARE': 'Development/1.0'})
 2242  infile,
 2243      outfile,
 2244  self._module_dict)
 2245   handler.AddDebuggingConsole(relative_url, env, outfile)
 2246 finally:
self = , self._module_dict = {'Cookie': , 'StringIO': ,
'UserDict': , '__future__': , '__main__': , '_hashlib': ,
'_locale': , '_random': , '_sha256': ,
'_sha512': , ...}
 /Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py in ExecuteCGI(root_path='/
Users/CoDonnell/Desktop/Products/markitecht-svn/trunk/wave-robots/
wordybot', handler_path='main.py', cgi_path='/Users/CoDonnell/Desktop/
Products/markitecht-svn/trunk/wave-robots/wordybot/main.py', env=
{'APPLICATION_ID': 'wordybot', 'AUTH_DOMAIN': 'gmail.com',
'CONTENT_LENGTH': '', 'CONTENT_TYPE': 'application/x-www-form-
urlencoded', 'CURRENT_VERSION_ID': '1.1', 'GATEWAY_INTERFACE': 'CGI/
1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/
xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET':
'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_LANGUAGE': 'en-
us,en;q=0.5', 'HTTP_CONNECTION': 'keep-alive', ...},
infile=,
outfile=, module_dict=
{'Cookie': ,
'StringIO': , 'UserDict': , '__future__': , '__main__': ,
'_hashlib': , '_locale': , '_random&

[google-appengine] Re: Basic Event Tracking Question

2009-08-12 Thread Markitecht

Wait a second, am I right in sort of realizing that BigTable doesn't
support rather basic database functions like counting and grouping
entities based on certain criteria?

In my example, I can implement the suggestion, but it seems silly; if
i am tracking events that have several pieces of metadata ('target' of
the action the 'context' within which the user took the action, etc),
i can't easily provide views of, for example, which 'targets' were
most popular or which 'contexts' were most popular for a given target,
right? I have to be maintaining indices in effect to measure all this
extremely basic data?

As amazingly cool as App Engine is, is it not capable of performing
very basic database query functions? It seems to me that making a data
model less relational is a great idea for scaling, but why on Earth
would simple count and group queries not be supported?

Forgive my noob-ness ;-)

On Aug 10, 9:10 am, Andy Freeman  wrote:
> > Finally, do look at the info on sharded counters if you expect
> > individual counters to be updated more than about once a second.
>
> That is fairly disturbing advice as it seems to suggest that updating
> a simple entity more than once a second is problematic.
>
> I would have thought that it would be safe to update a given entity
> 10-15 times/second and maybe even 20x/second. (10x/second is 100ms per
> update, 15 is over 65ms per update, 20 is 50ms per update.)  Frankly,
> I'm surprised that 5 times/second is too fast. (5x/second is 200ms per
> update.)
>
> On Aug 10, 5:24 am, "Nick Johnson (Google)" 
> wrote:
>
> > On Sun, Aug 9, 2009 at 4:58 PM, Markitecht wrote:
>
> > > Thanks Nick, makes complete sense.
>
> > > I'll write it so that for each Interaction, it finds the appropriate
> > > entity, increments the counter and stores it; if looking for the
> > > entity turns nothing up, i make a new one with a counter set to 1.
>
> > > right?
>
> > Right. Just make sure to do it inside a transaction if you need exact
> > counts. And use key naming to avoid the need to do queries.
>
> > Finally, do look at the info on sharded counters if you expect
> > individual counters to be updated more than about once a second.
>
> > -Nick Johnson
>
> > > thanks again for the quick and kind attention.
>
> > > best,
> > > Christopher
>
> > > On Aug 7, 6:02 am, "Nick Johnson (Google)" 
> > > wrote:
> > >> Hi Markitecht,
>
> > >> It sounds like your best option is to have a single Interaction entity
> > >> for each unique string. You can use the key name to ensure uniqueness.
> > >> Then, to record a new interaction, in a transaction fetch the existing
> > >> one (if any), increment the count, and store it.
>
> > >> If you expect some interactions to be very popular (more than a few
> > >> updates a second), you should probably look into sharded counters.
>
> > >> -Nick Johnson
>
> > >> On Wed, Aug 5, 2009 at 7:15 PM, Markitecht wrote:
>
> > >> > I am writing a dirt-simple tracking API.
>
> > >> > For the sake of explanation, i will over-simplify my question even
> > >> > further.
>
> > >> > I have an endpoint that accepts one item of string metadata, and saves
> > >> > a new instance of an Interaction object.
>
> > >> > (the interaction object also saves the user and the date created)
>
> > >> > How do i query Interaction to return the most popular
> > >> > 'interactions' (using those string metadata values), with a count for
> > >> > each?
>
> > >> > This seems *so* simple, but i just can't figure out how to do it on
> > >> > AE.
>
> > >> > Thanks,
> > >> > Christopher
>
> > >> --
> > >> Nick Johnson, Developer Programs Engineer, App Engine
>
> > --
> > Nick Johnson, Developer Programs Engineer, App Engine- Hide quoted text -
>
> > - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Basic Event Tracking Question

2009-08-09 Thread Markitecht

Thanks Nick, makes complete sense.

I'll write it so that for each Interaction, it finds the appropriate
entity, increments the counter and stores it; if looking for the
entity turns nothing up, i make a new one with a counter set to 1.

right?

thanks again for the quick and kind attention.

best,
Christopher

On Aug 7, 6:02 am, "Nick Johnson (Google)" 
wrote:
> Hi Markitecht,
>
> It sounds like your best option is to have a single Interaction entity
> for each unique string. You can use the key name to ensure uniqueness.
> Then, to record a new interaction, in a transaction fetch the existing
> one (if any), increment the count, and store it.
>
> If you expect some interactions to be very popular (more than a few
> updates a second), you should probably look into sharded counters.
>
> -Nick Johnson
>
>
>
> On Wed, Aug 5, 2009 at 7:15 PM, Markitecht wrote:
>
> > I am writing a dirt-simple tracking API.
>
> > For the sake of explanation, i will over-simplify my question even
> > further.
>
> > I have an endpoint that accepts one item of string metadata, and saves
> > a new instance of an Interaction object.
>
> > (the interaction object also saves the user and the date created)
>
> > How do i query Interaction to return the most popular
> > 'interactions' (using those string metadata values), with a count for
> > each?
>
> > This seems *so* simple, but i just can't figure out how to do it on
> > AE.
>
> > Thanks,
> > Christopher
>
> --
> Nick Johnson, Developer Programs Engineer, 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] Basic Event Tracking Question

2009-08-06 Thread Markitecht

I am writing a dirt-simple tracking API.

For the sake of explanation, i will over-simplify my question even
further.

I have an endpoint that accepts one item of string metadata, and saves
a new instance of an Interaction object.

(the interaction object also saves the user and the date created)

How do i query Interaction to return the most popular
'interactions' (using those string metadata values), with a count for
each?

This seems *so* simple, but i just can't figure out how to do it on
AE.

Thanks,
Christopher

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"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
-~--~~~~--~~--~--~---