[google-appengine] Re: https support

2009-08-05 Thread Nick Johnson (Google)

Hi J Singh,

Due to the way SSL works, this is not currently possible without
allocating an IP address for each App Engine domain that would use SSL
- which itself isn't very practical due to IPv4 address scarcity.

The latest version of SSL supports using a single IP address for
multiple sites with different certificates, but browser support for
this version is not yet nearly widespread enough to make it a
practical alternative.

-Nick Johnson

On Wed, Aug 5, 2009 at 5:39 AM, J Singh wrote:
> For an appengine-based site, https://abc.appspot.com is currently supported
> but https://www.abc.com can not be supported. I know there is a technical
> hurdle to cross but didn't know if any techniques had been proposed for
> being able to use www.abc.com with SSL connections?
>
> Thanks.
>
> J Singh
>
> Managing Director
> Early Stage IT
> (978) 760-2055
> http://www.earlystageit.com
>
>
> >
>



-- 
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] User Identity

2009-08-05 Thread Martyn

Hi there,

In testing I have noted latency in user identity management when I
sign in and out as different account users.

1) I sign in as user A - application recognises me as user A
2) I sign out - application still recognises me as User A
3) I sign in as user B - applicaiton recognises me as user A
4) sometime later (around a minute) application recognises me as user
B

I understand how this could happen, based on caching for performance,
but should it?

...and I'm still concerned about insert performance, seems like 120ms
is the best I can hope for (single row, no indexed properies, Blob of
around 1k).

- Martyn
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, 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: dictionary displays problem

2009-08-05 Thread Andi Albrecht

In Django templates you can do either

{% for item in xx.items %}
  Key: {{item.0}}, Value: {{item.1}}
{% endfor %}

or if you don't care about the keys

{% for value in xx.values %}
  {{value}}
{% endfor %}


Andi





On Wed, Aug 5, 2009 at 6:27 AM, yuan ping wu wrote:
> in python.py:
> values={'mydictionary':{'a':'1','b':'2'}}
>
>
> {% for key  in mydictionry.items %}
>   {{key}}
> {%endfor%}
>
> reuslt will be  (a,1) (b,2)
>
> if change to
> {% for key  in mydictionry %}
>   {{key}}
> {%endfor%}
>
> it diplays: a b
>
> i still cunt get the value of key, tell me any modification of those code
> that maks it works ?
>
> 2009/8/4 yuan ping wu 
>>
>> it gets no thing. noth display on web
>>
>> 2009/8/4 Nick Johnson (Google) 
>>>
>>> Hi oscarWu,
>>>
>>> What error do you get, or if you don't get an error, what gets
>>> displayed? And what is the exact template snippet you're using for
>>> this? We need more details in order to help.
>>>
>>> -Nick Johnson
>>>
>>> On Mon, Aug 3, 2009 at 4:04 AM, oscarWu wrote:
>>> >
>>> > I wanna put my dicitonary object on template
>>> > sth more like
>>> >
>>> > 
>>> >
>>> > {%for value,key in dictionary.items%}
>>> >     display key:display value
>>> > {%endfor%}
>>> > 
>>> >
>>> >
>>> > but my1 doesnt word, any1 can provide me specific code ?
>>> >
>>> > >
>>> >
>>>
>>>
>>>
>>> --
>>> 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] Re: 404 Forb

2009-08-05 Thread dhivya mylsamy
hei i got the problem right.its becas of the proxy enabled in that system.i
changed the system..it worked right.. Thanx for the reply.

On Wed, Aug 5, 2009 at 12:54 AM, Hrishikesh Bakshi <
bakshi.hrishik...@gmail.com> wrote:

> Are you putting your own email in place of "myid"?
>
> Otherwise try :
>
> appcfg.py  update e:\helloworld
>
> Then it will ask for credentials.
>
>
> On Tue, Aug 4, 2009 at 12:21 PM, Dhivya Mylsamy wrote:
>
>>
>> Hello everyone,
>>
>> Iam getting this error when i try to upload my application.can anyone
>> help me
>>
>> E:\>appcfg.py -email=myid update e:\helloworld
>> Scanning files on local disk.
>> Initiating update.
>> 2009-08-04 18:41:36,703 ERROR appcfg.py:1272 An unexpected error
>> occurred. Abort
>> ing.
>> Traceback (most recent call last):
>> File "C:\Program Files\Google\google_appengine\google\appengine\tools
>> \appcfg.p
>> y", line 1250, in DoUpload
>> missing_files = self.Begin()
>> File "C:\Program Files\Google\google_appengine\google\appengine\tools
>> \appcfg.p
>> y", line 1045, in Begin
>> version=self.version, payload=self.config.ToYAML())
>> File "C:\Program Files\Google\google_appengine\google\appengine\tools
>> \appengin
>> e_rpc.py", line 344, in Send
>> f = self.opener.open(req)
>> File "C:\Python25\lib\urllib2.py", line 387, in open
>> response = meth(req, response)
>> File "C:\Python25\lib\urllib2.py", line 498, in http_response
>> 'http', request, response, code, msg, hdrs)
>> File "C:\Python25\lib\urllib2.py", line 425, in error
>> return self._call_chain(*args)
>> File "C:\Python25\lib\urllib2.py", line 360, in _call_chain
>> result = func(*args)
>> File "C:\Python25\lib\urllib2.py", line 506, in http_error_default
>> raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
>> HTTPError: HTTP Error 403: Forbidden
>> Error 403: -- begin server output --
>> You do not have permission to modify this app
>> (app_id=u'bitstars2010').
>> -- end server output -
>>
>>
>> app.yaml
>>
>>
>> application: bitstars2010
>> version: 1
>> runtime: python
>> api_version: 1
>>
>> handlers:
>> - url: /stylesheets
>>  static_dir: stylesheets
>>
>> - url: /.*
>>  script: helloworld.py
>>
>>
>>
>>
>
>
> --
> Hrishikesh Bakshi
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, 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: User Identity

2009-08-05 Thread Martyn

I think this is an important issue - why no response?

On Aug 5, 9:48 am, Martyn  wrote:
> Hi there,
>
> In testing I have noted latency in user identity management when I
> sign in and out as different account users.
>
> 1) I sign in as user A - application recognises me as user A
> 2) I sign out - application still recognises me as User A
> 3) I sign in as user B - applicaiton recognises me as user A
> 4) sometime later (around a minute) application recognises me as user
> B
>
> I understand how this could happen, based on caching for performance,
> but should it?
>
> ...and I'm still concerned about insert performance, seems like 120ms
> is the best I can hope for (single row, no indexed properies, Blob of
> around 1k).
>
> - Martyn
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, 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: User Identity

2009-08-05 Thread Holger

If logout wouldn't work, that would be really important - sure.

But it needn't to be appengine creating this result, it can be your
own code too.

Session management is usually done with a token stored in cookie.
Logout just means deleting this cookie.

Perhaps you forgot to trigger cookie deletion or you forgot to make
the result visible at once by changing 'User1 Logout' to 'Login'.

Such visual display errors would be critical only if you could request
a server response successfully as logged in user after logging out.
Did you try?

On the whole, please describe more details to enable a detailed
answer.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, 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: User Identity

2009-08-05 Thread Nick Johnson (Google)

Hi Martyn,

On Wed, Aug 5, 2009 at 9:48 AM, Martyn wrote:
>
> Hi there,
>
> In testing I have noted latency in user identity management when I
> sign in and out as different account users.
>
> 1) I sign in as user A - application recognises me as user A
> 2) I sign out - application still recognises me as User A
> 3) I sign in as user B - applicaiton recognises me as user A
> 4) sometime later (around a minute) application recognises me as user
> B
>
> I understand how this could happen, based on caching for performance,
> but should it?

If you're caching responses, there's nothing any of the rest of the
infrastructure can do about it. You need to use a caching strategy
that can cope with users logging out, such as using etags.

Have you checked to see if this _is_ a caching issue? Does your App
Engine app see requests from the newly logged-out user, or are they
entirely served from the cache? Are you using the Users API, or your
own session management? How are you logging out of the app?

>
> ...and I'm still concerned about insert performance, seems like 120ms
> is the best I can hope for (single row, no indexed properies, Blob of
> around 1k).

This seems high. Have you experimented with entities with different
numbers of properties and entity sizes?

-Nick Johnson

>
> - Martyn
> >
>



-- 
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] Cannot deploy from within Eclipse (appcfg.py as an 'external tool')

2009-08-05 Thread Giacecco

All, I am using Eclipse 3.5.0, App Engine 1.2.2 and Python 2.5.x on
both a MacOS and a Linux desktops. On both I set up appcfg.py as an
'external tool' to deploy my App Engine application without leaving
Eclipse.

On MacOS everything works fine. On Linux (Ubuntu NR 9.04) the
execution of appcfg.py hangs after the 'Initiating update.' message
(probably to ask me my username / password, but it doesn't show), then
I press enter and it fails with the error messages below.

The same call to appcfg.py, using the same parameters, works fine from
the command line.

My guess is that there is an issue with Eclipse's way to manage the
standard output / input when running appcfg.py in one of its console
windows... but I don't know how to fix that. Any advice?

Giacecco


2009-08-05 13:20:30,857 ERROR appcfg.py:1241 An unexpected error
occurred. Aborting.
Traceback (most recent call last):
  File "/usr/local/google_appengine/google/appengine/tools/appcfg.py",
line 1219, in DoUpload
missing_files = self.Begin()
  File "/usr/local/google_appengine/google/appengine/tools/appcfg.py",
line 1014, in Begin
version=self.version, payload=self.config.ToYAML())
  File "/usr/local/google_appengine/google/appengine/tools/
appengine_rpc.py", line 356, in Send
self._Authenticate()
  File "/usr/local/google_appengine/google/appengine/tools/
appengine_rpc.py", line 391, in _Authenticate
super(HttpRpcServer, self)._Authenticate()
  File "/usr/local/google_appengine/google/appengine/tools/
appengine_rpc.py", line 269, in _Authenticate
credentials = self.auth_function()
  File "/usr/local/google_appengine/google/appengine/tools/appcfg.py",
line 1540, in GetUserCredentials
password = self.password_input_fn(password_prompt)
  File "/usr/lib/python2.5/getpass.py", line 32, in unix_getpass
old = termios.tcgetattr(fd) # a copy to save
error: (22, 'Invalid argument')
Traceback (most recent call last):
  File "/usr/local/google_appengine/appcfg.py", line 60, in 
run_file(__file__, globals())
  File "/usr/local/google_appengine/appcfg.py", line 57, in run_file
execfile(script_path, globals_)
  File "/usr/local/google_appengine/google/appengine/tools/appcfg.py",
line 2215, in 
Email: main(sys.argv)
  File "/usr/local/google_appengine/google/appengine/tools/appcfg.py",
line 2206, in main
result = AppCfgApp(argv).Run()
  File "/usr/local/google_appengine/google/appengine/tools/appcfg.py",
line 1424, in Run
self.action(self)
  File "/usr/local/google_appengine/google/appengine/tools/appcfg.py",
line 2102, in __call__
return method()
  File "/usr/local/google_appengine/google/appengine/tools/appcfg.py",
line 1679, in Update
lambda path: open(os.path.join(basepath, path), "rb"))
  File "/usr/local/google_appengine/google/appengine/tools/appcfg.py",
line 1219, in DoUpload
missing_files = self.Begin()
  File "/usr/local/google_appengine/google/appengine/tools/appcfg.py",
line 1014, in Begin
version=self.version, payload=self.config.ToYAML())
  File "/usr/local/google_appengine/google/appengine/tools/
appengine_rpc.py", line 356, in Send
self._Authenticate()
  File "/usr/local/google_appengine/google/appengine/tools/
appengine_rpc.py", line 391, in _Authenticate
super(HttpRpcServer, self)._Authenticate()
  File "/usr/local/google_appengine/google/appengine/tools/
appengine_rpc.py", line 269, in _Authenticate
credentials = self.auth_function()
  File "/usr/local/google_appengine/google/appengine/tools/appcfg.py",
line 1540, in GetUserCredentials
password = self.password_input_fn(password_prompt)
  File "/usr/lib/python2.5/getpass.py", line 32, in unix_getpass
old = termios.tcgetattr(fd) # a copy to save
termios.error: (22, 'Invalid argument')

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



[google-appengine] Re: Is there a way to have /blog url in GAE display wordpress blog

2009-08-05 Thread J

Could you elaborate a bit on "for SEO reasons"? Do you want the blog
keywords to help elevate you site rankings?

I serve my blog on the web site using a widget. Check out
http://www.earlystageit.com/blog. Something tells me it doesn't quite
address your requirement.

On Aug 4, 4:59 pm, Jai  wrote:
> Hi Natalie,
>
> On the lines of solution offered by Adam, you can also write an xmlrpc
> client which can use the wordpress metaweblog 
> APIhttp://codex.wordpress.org/XML-RPC_Support. It is much more work but
> you can create a UI of your own.
>
> You can compose, edit and delete any blog using the API.
>
> There is a good articlehttp://brizzled.clapper.org/id/80for writing
> xmlrpc client on app engine.
>
> Regards.
>
> On Aug 3, 10:32 am, Natalie Gordon  wrote:
>
> > Hi,
>
> > I have my app running fine in a subdomain my.url.com. I have a related
> > blog built with wordpress on blog.url.com. For SEO reasons, I'm being
> > asked if there is a way to serve our blog on my.url.com/blog.
>
> > I can't think of a way to do this. Anyone have any ideas, creative or
> > otherwise?
>
> > Thanks!
> > Natalie Gordonhttp://lenguajero.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: Cannot deploy from within Eclipse (appcfg.py as an 'external tool')

2009-08-05 Thread Nick Johnson (Google)

Hi Giacecco,

Is there a reason you're not using the App Engine plugin for Eclipse?
It handles all this for you:
http://code.google.com/appengine/docs/java/tools/eclipse.html

-Nick Johnson

On Wed, Aug 5, 2009 at 1:25 PM, Giacecco wrote:
>
> All, I am using Eclipse 3.5.0, App Engine 1.2.2 and Python 2.5.x on
> both a MacOS and a Linux desktops. On both I set up appcfg.py as an
> 'external tool' to deploy my App Engine application without leaving
> Eclipse.
>
> On MacOS everything works fine. On Linux (Ubuntu NR 9.04) the
> execution of appcfg.py hangs after the 'Initiating update.' message
> (probably to ask me my username / password, but it doesn't show), then
> I press enter and it fails with the error messages below.
>
> The same call to appcfg.py, using the same parameters, works fine from
> the command line.
>
> My guess is that there is an issue with Eclipse's way to manage the
> standard output / input when running appcfg.py in one of its console
> windows... but I don't know how to fix that. Any advice?
>
> Giacecco
>
>
> 2009-08-05 13:20:30,857 ERROR appcfg.py:1241 An unexpected error
> occurred. Aborting.
> Traceback (most recent call last):
>  File "/usr/local/google_appengine/google/appengine/tools/appcfg.py",
> line 1219, in DoUpload
>    missing_files = self.Begin()
>  File "/usr/local/google_appengine/google/appengine/tools/appcfg.py",
> line 1014, in Begin
>    version=self.version, payload=self.config.ToYAML())
>  File "/usr/local/google_appengine/google/appengine/tools/
> appengine_rpc.py", line 356, in Send
>    self._Authenticate()
>  File "/usr/local/google_appengine/google/appengine/tools/
> appengine_rpc.py", line 391, in _Authenticate
>    super(HttpRpcServer, self)._Authenticate()
>  File "/usr/local/google_appengine/google/appengine/tools/
> appengine_rpc.py", line 269, in _Authenticate
>    credentials = self.auth_function()
>  File "/usr/local/google_appengine/google/appengine/tools/appcfg.py",
> line 1540, in GetUserCredentials
>    password = self.password_input_fn(password_prompt)
>  File "/usr/lib/python2.5/getpass.py", line 32, in unix_getpass
>    old = termios.tcgetattr(fd)     # a copy to save
> error: (22, 'Invalid argument')
> Traceback (most recent call last):
>  File "/usr/local/google_appengine/appcfg.py", line 60, in 
>    run_file(__file__, globals())
>  File "/usr/local/google_appengine/appcfg.py", line 57, in run_file
>    execfile(script_path, globals_)
>  File "/usr/local/google_appengine/google/appengine/tools/appcfg.py",
> line 2215, in 
> Email:     main(sys.argv)
>  File "/usr/local/google_appengine/google/appengine/tools/appcfg.py",
> line 2206, in main
>    result = AppCfgApp(argv).Run()
>  File "/usr/local/google_appengine/google/appengine/tools/appcfg.py",
> line 1424, in Run
>    self.action(self)
>  File "/usr/local/google_appengine/google/appengine/tools/appcfg.py",
> line 2102, in __call__
>    return method()
>  File "/usr/local/google_appengine/google/appengine/tools/appcfg.py",
> line 1679, in Update
>    lambda path: open(os.path.join(basepath, path), "rb"))
>  File "/usr/local/google_appengine/google/appengine/tools/appcfg.py",
> line 1219, in DoUpload
>    missing_files = self.Begin()
>  File "/usr/local/google_appengine/google/appengine/tools/appcfg.py",
> line 1014, in Begin
>    version=self.version, payload=self.config.ToYAML())
>  File "/usr/local/google_appengine/google/appengine/tools/
> appengine_rpc.py", line 356, in Send
>    self._Authenticate()
>  File "/usr/local/google_appengine/google/appengine/tools/
> appengine_rpc.py", line 391, in _Authenticate
>    super(HttpRpcServer, self)._Authenticate()
>  File "/usr/local/google_appengine/google/appengine/tools/
> appengine_rpc.py", line 269, in _Authenticate
>    credentials = self.auth_function()
>  File "/usr/local/google_appengine/google/appengine/tools/appcfg.py",
> line 1540, in GetUserCredentials
>    password = self.password_input_fn(password_prompt)
>  File "/usr/lib/python2.5/getpass.py", line 32, in unix_getpass
>    old = termios.tcgetattr(fd)     # a copy to save
> termios.error: (22, 'Invalid argument')
>
> >
>



-- 
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] Re: User Identity

2009-08-05 Thread Martyn

I am not caching the user, I always use the UserServiceFactory on each
request.

I discovered this testing the web.xml security-contraint
configurations.  I was surprised to say the least.

I then added debugging to output user info to a page and noted the
symptoms reported.

Re: insertion performance, I update two entities, one is always
created (with a generated key) and the other updated.  I update using
a batch put which improved update from ~180ms to 120ms

Initially there was a single Blob property on the insert entity (I
store transactional data), adding a few unindexed properties seems to
have made no significant difference.  I did test "pre-puts", batching
say  one-hundred inserts, and then seeing if update of an existing
entity was any better - it wasn't.

I will get back with some more metrics in a bit.


On Aug 5, 1:14 pm, "Nick Johnson (Google)" 
wrote:
> Hi Martyn,
>
> On Wed, Aug 5, 2009 at 9:48 AM, Martyn wrote:
>
> > Hi there,
>
> > In testing I have noted latency in user identity management when I
> > sign in and out as different account users.
>
> > 1) I sign in as user A - application recognises me as user A
> > 2) I sign out - application still recognises me as User A
> > 3) I sign in as user B - applicaiton recognises me as user A
> > 4) sometime later (around a minute) application recognises me as user
> > B
>
> > I understand how this could happen, based on caching for performance,
> > but should it?
>
> If you're caching responses, there's nothing any of the rest of the
> infrastructure can do about it. You need to use a caching strategy
> that can cope with users logging out, such as using etags.
>
> Have you checked to see if this _is_ a caching issue? Does your App
> Engine app see requests from the newly logged-out user, or are they
> entirely served from the cache? Are you using the Users API, or your
> own session management? How are you logging out of the app?
>
>
>
> > ...and I'm still concerned about insert performance, seems like 120ms
> > is the best I can hope for (single row, no indexed properies, Blob of
> > around 1k).
>
> This seems high. Have you experimented with entities with different
> numbers of properties and entity sizes?
>
> -Nick Johnson
>
>
>
> > - Martyn
>
> --
> 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] Re: User Identity

2009-08-05 Thread Martyn

Since I sign in as a different user, this cannot be explained by a
cookie problem.. plus the timing issue.

On Aug 5, 1:12 pm, Holger  wrote:
> If logout wouldn't work, that would be really important - sure.
>
> But it needn't to be appengine creating this result, it can be your
> own code too.
>
> Session management is usually done with a token stored in cookie.
> Logout just means deleting this cookie.
>
> Perhaps you forgot to trigger cookie deletion or you forgot to make
> the result visible at once by changing 'User1 Logout' to 'Login'.
>
> Such visual display errors would be critical only if you could request
> a server response successfully as logged in user after logging out.
> Did you try?
>
> On the whole, please describe more details to enable a detailed
> answer.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, 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: User Identity

2009-08-05 Thread Holger


You really need to give more details.

> this cannot be explained by a cookie problem.
?? How can you know?

What's the url where I can test?

Who wrote that code?

How does the code look like?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, 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: GQL query failed to return a qualifying entity

2009-08-05 Thread Jaap Taal
Same here, just good old ASCII chars in that record.


On Wed, Aug 5, 2009 at 12:55 AM, phtq  wrote:

>
> The fact that the record can be retrieved with any 2 of the 3 filters
> indicates that there are no hidden characters.
>
> On Aug 5, 8:41 am, Wooble  wrote:
> > Are you sure there isn't a space or other non-printable character in
> > your data in the datastore?  It's certainly possible your index is
> > corrupt, but I'd check for more likely causes first.
> >
> > On Aug 4, 12:01 am, phtq  wrote:
> >
> >
> >
> > > In our application (kbdlessons version 1-01) we have just had a case
> > > where a query in our application failed to return a record which
> > > definitely exists. We were able to reproduce this problem using the
> > > Dataviewer page off the app engine dashboard.
> >
> > > We put in this query using the Dataviewer:
> >
> > > SELECT * FROM StudentSubscriptions where StudentKey = 'REBECCA' and
> > > ProductKey = 'Typequick Professional' and AccountKey = 'SIVF'
> >
> > > and got no results. However, if we use just 2 out of the 3 tests (any
> > > 2!) the record we want appears amongst the results.
> >
> > > Also, other valid values for StudentKey when used in this 3 part query
> > > do return a record in the Dataviewer page, just not this particular
> > > set of 3 values.
> >
> > > We had to build a new record (under another name) to get the student
> > > going, but have left the troubled record in the database so you can
> > > look at it.
> >
> > > Please let me know how to avoid this rather worrying problem.
> >
>

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



[google-appengine] Re: User Identity

2009-08-05 Thread Martyn

Are you suggesting that I need to do something in my App for each
request to ensure the current user returned is valid?

I have no control if the user changes their account sign-in in another
browser window.

My debug code is

UserService us = UserServiceFactory.getUserService();
User usr = us.getCurrentUser();

StringBuffer buf = new StringBuffer();
buf.append("PropertyValue");
buf.append("Nickname" + usr.getNickname() + 
"");
buf.append("EMail" + usr.getEmail() + 
"");
buf.append("Auth Domain" + usr.getAuthDomain() 
+ "");
buf.append("");

return buf.toString();



On Aug 5, 2:01 pm, Holger  wrote:
> You really need to give more details.
>
> > this cannot be explained by a cookie problem.
>
> ?? How can you know?
>
> What's the url where I can test?
>
> Who wrote that code?
>
> How does the code look like?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, 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: Predict and Limit Index Size

2009-08-05 Thread Andy Freeman

This is somewhat related to

http://code.google.com/p/googleappengine/issues/detail?id=917
and
http://code.google.com/p/googleappengine/issues/detail?id=1084

On Aug 4, 2:11 am, Koen Bok  wrote:
> Is there any way to reliably calculate how large an index for an item
> will be? That way I could make sure my fulltext wordlists will never
> get the exploding inde problem.
>
> My current index is
>
> - kind: SearchableIndex
>   properties:
>   - name: parentKind
>   - name: userKey
>   - name: words
>   - name: words
>   - name: sortKey
>
> Now let's say the words property has 10 words in it. Would my index
> then be 1 * 1 * 10 * 10 * 1 = 100? And could I just compare that
> against datastore._MAX_INDEXED_PROPERTIES?
>
> - Koen
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, 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: User Identity

2009-08-05 Thread Nick Johnson (Google)

On Wed, Aug 5, 2009 at 2:20 PM, Martyn wrote:
>
> Are you suggesting that I need to do something in my App for each
> request to ensure the current user returned is valid?

We're suggesting that we don't have enough information to determine
where the problem is - certainly not enough information to conclude
that the Users API is erroneously returning a logged in user after you
have logged out.

Have you tried logging the below information, and checking the admin
console logs to verify what output is generated after you request the
page after logging out?

-Nick Johnson

>
> I have no control if the user changes their account sign-in in another
> browser window.
>
> My debug code is
>
>                UserService us = UserServiceFactory.getUserService();
>                User usr = us.getCurrentUser();
>
>                StringBuffer buf = new StringBuffer();
>                buf.append(" class='omStatus'>PropertyValue th");
>                buf.append("Nickname" + usr.getNickname() + 
> " tr>");
>                buf.append("EMail" + usr.getEmail() + 
> "");
>                buf.append("Auth Domain" + 
> usr.getAuthDomain() + " td");
>                buf.append("");
>
>                return buf.toString();
>
>
>
> On Aug 5, 2:01 pm, Holger  wrote:
>> You really need to give more details.
>>
>> > this cannot be explained by a cookie problem.
>>
>> ?? How can you know?
>>
>> What's the url where I can test?
>>
>> Who wrote that code?
>>
>> How does the code look like?
> >
>



-- 
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] Re: User Identity

2009-08-05 Thread Holger

> Are you suggesting that I need to do something in my App for each
> request to ensure the current user returned is valid?
yea

> My debug code is
> UserService us = UserServiceFactory.getUserService();

That's Java - I do Python. - So Nick Johnson surely can explain better
what's needed.

> I have no control if the user changes their account sign-in in another
> browser window.
Why would you need. Why should'n a user be logged in as John to one
application and as Bill to the other?

As long as user John doesn't log out of your application (window),
where is the problem?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: User Identity

2009-08-05 Thread Martyn

I'm sorry, I am clearly missing something here.  And it looks like
it's an unwarranted assumption on my part.

I had assumed, that the Google user authentication could be used in
place of a conventional application login.

I have followed this to create a pattern such that the current Google
user can be directly associated with an application user, and that
for any request I could use the UserService to get a handle on the
current user and then lookup my application user.

So "logging out" for me, meant the user "signing out" of their Google
account.

I will now RTFL on user authentication and see what I can learn.

Sorry if I've been wasting your time.

- Martyn


On Aug 5, 2:52 pm, "Nick Johnson (Google)" 
wrote:
> On Wed, Aug 5, 2009 at 2:20 PM, Martyn wrote:
>
> > Are you suggesting that I need to do something in my App for each
> > request to ensure the current user returned is valid?
>
> We're suggesting that we don't have enough information to determine
> where the problem is - certainly not enough information to conclude
> that the Users API is erroneously returning a logged in user after you
> have logged out.
>
> Have you tried logging the below information, and checking the admin
> console logs to verify what output is generated after you request the
> page after logging out?
>
> -Nick Johnson
>
>
>
>
>
>
>
> > I have no control if the user changes their account sign-in in another
> > browser window.
>
> > My debug code is
>
> >                UserService us = UserServiceFactory.getUserService();
> >                User usr = us.getCurrentUser();
>
> >                StringBuffer buf = new StringBuffer();
> >                buf.append(" > class='omStatus'>PropertyValue > th");
> >                buf.append("Nickname" + usr.getNickname() + 
> > " > tr>");
> >                buf.append("EMail" + usr.getEmail() + 
> > "");
> >                buf.append("Auth Domain" + 
> > usr.getAuthDomain() + " > td");
> >                buf.append("");
>
> >                return buf.toString();
>
> > On Aug 5, 2:01 pm, Holger  wrote:
> >> You really need to give more details.
>
> >> > this cannot be explained by a cookie problem.
>
> >> ?? How can you know?
>
> >> What's the url where I can test?
>
> >> Who wrote that code?
>
> >> How does the code look like?
>
> --
> 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] Re: User Identity

2009-08-05 Thread Holger

You are not wasting time - it's an important clarification.

To my knowledge the logical steps are:

1. User want's to log into your application
2. You pass him to Google
3. He logs in with his Google account
4. Google returns a token with is stored as cookie
5. As long as this token exists the user module (don't know the Java
name) treats the visitor as authenticiated.
5. It's your task to delete this token on user logout.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, 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: User Identity

2009-08-05 Thread Hrishikesh Bakshi
Google's cookies are different than each application on appspot.com.
So each application needs to specifically log out each user.

I just came to know about this.

You should provide a log out link.


On Wed, Aug 5, 2009 at 10:34 AM, Holger  wrote:

>
> You are not wasting time - it's an important clarification.
>
> To my knowledge the logical steps are:
>
> 1. User want's to log into your application
> 2. You pass him to Google
> 3. He logs in with his Google account
> 4. Google returns a token with is stored as cookie
> 5. As long as this token exists the user module (don't know the Java
> name) treats the visitor as authenticiated.
> 5. It's your task to delete this token on user logout.
>
>
> >
>


-- 
Hrishikesh Bakshi

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, 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: User Identity

2009-08-05 Thread Holger

Hi Martyn,

if you just started maybe you should consider to change to Python.

Java might be more common outside the appengine world - but within
appengine there exist far better ready made solutions for Python.

For example the AppenginePatch project with Django registration (user
account, individual user name) and session management out of the box.
It's live. you can test it:
http://aep-sample.appspot.com/

Holger
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, 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: User Identity

2009-08-05 Thread Nick Johnson (Google)

On Wed, Aug 5, 2009 at 3:21 PM, Martyn wrote:
>
> I'm sorry, I am clearly missing something here.  And it looks like
> it's an unwarranted assumption on my part.
>
> I had assumed, that the Google user authentication could be used in
> place of a conventional application login.

That's entirely correct.

>
> I have followed this to create a pattern such that the current Google
> user can be directly associated with an application user, and that
> for any request I could use the UserService to get a handle on the
> current user and then lookup my application user.

Also fine.

>
> So "logging out" for me, meant the user "signing out" of their Google
> account.

Is the user logging out by clicking a 'logout' link you provided them
(using the Users API), or by logging out on some other Google service?
If the latter, it's quite possible that doing so would not log the
user out of all their App Engine apps immediately, yes. If you want a
user to be able to log out immediately, you need to provide them with
a logout link.

>
> I will now RTFL on user authentication and see what I can learn.
>
> Sorry if I've been wasting your time.
>
> - Martyn
>
>
> On Aug 5, 2:52 pm, "Nick Johnson (Google)" 
> wrote:
>> On Wed, Aug 5, 2009 at 2:20 PM, Martyn wrote:
>>
>> > Are you suggesting that I need to do something in my App for each
>> > request to ensure the current user returned is valid?
>>
>> We're suggesting that we don't have enough information to determine
>> where the problem is - certainly not enough information to conclude
>> that the Users API is erroneously returning a logged in user after you
>> have logged out.
>>
>> Have you tried logging the below information, and checking the admin
>> console logs to verify what output is generated after you request the
>> page after logging out?
>>
>> -Nick Johnson
>>
>>
>>
>>
>>
>>
>>
>> > I have no control if the user changes their account sign-in in another
>> > browser window.
>>
>> > My debug code is
>>
>> >                UserService us = UserServiceFactory.getUserService();
>> >                User usr = us.getCurrentUser();
>>
>> >                StringBuffer buf = new StringBuffer();
>> >                buf.append("> > class='omStatus'>PropertyValue> > th");
>> >                buf.append("Nickname" + usr.getNickname() 
>> > + "> > tr>");
>> >                buf.append("EMail" + usr.getEmail() + 
>> > "");
>> >                buf.append("Auth Domain" + 
>> > usr.getAuthDomain() + "> > td");
>> >                buf.append("");
>>
>> >                return buf.toString();
>>
>> > On Aug 5, 2:01 pm, Holger  wrote:
>> >> You really need to give more details.
>>
>> >> > this cannot be explained by a cookie problem.
>>
>> >> ?? How can you know?
>>
>> >> What's the url where I can test?
>>
>> >> Who wrote that code?
>>
>> >> How does the code look like?
>>
>> --
>> Nick Johnson, Developer Programs Engineer, App Engine
> >
>



-- 
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] Re: User Identity

2009-08-05 Thread Martyn

Yes, I was assuming that if the user (in the browser) signed into
another account then
that new user would be returned by the UserService.

I don't think it is a problem for a real world situation, but for
testing it gave me surprising results.

For quick account swapping I can provide an app sign-out link.

But it does seem that it would be hard to have different logins in
different browser windows, which I would like for testing.

On 5 Aug, 17:09, "Nick Johnson (Google)" 
wrote:
> On Wed, Aug 5, 2009 at 3:21 PM, Martyn wrote:
>
> > I'm sorry, I am clearly missing something here.  And it looks like
> > it's an unwarranted assumption on my part.
>
> > I had assumed, that the Google user authentication could be used in
> > place of a conventional application login.
>
> That's entirely correct.
>
>
>
> > I have followed this to create a pattern such that the current Google
> > user can be directly associated with an application user, and that
> > for any request I could use the UserService to get a handle on the
> > current user and then lookup my application user.
>
> Also fine.
>
>
>
> > So "logging out" for me, meant the user "signing out" of their Google
> > account.
>
> Is the user logging out by clicking a 'logout' link you provided them
> (using the Users API), or by logging out on some other Google service?
> If the latter, it's quite possible that doing so would not log the
> user out of all their App Engine apps immediately, yes. If you want a
> user to be able to log out immediately, you need to provide them with
> a logout link.
>
>
>
>
>
>
>
> > I will now RTFL on user authentication and see what I can learn.
>
> > Sorry if I've been wasting your time.
>
> > - Martyn
>
> > On Aug 5, 2:52 pm, "Nick Johnson (Google)" 
> > wrote:
> >> On Wed, Aug 5, 2009 at 2:20 PM, Martyn 
> >> wrote:
>
> >> > Are you suggesting that I need to do something in my App for each
> >> > request to ensure the current user returned is valid?
>
> >> We're suggesting that we don't have enough information to determine
> >> where the problem is - certainly not enough information to conclude
> >> that the Users API is erroneously returning a logged in user after you
> >> have logged out.
>
> >> Have you tried logging the below information, and checking the admin
> >> console logs to verify what output is generated after you request the
> >> page after logging out?
>
> >> -Nick Johnson
>
> >> > I have no control if the user changes their account sign-in in another
> >> > browser window.
>
> >> > My debug code is
>
> >> >                UserService us = UserServiceFactory.getUserService();
> >> >                User usr = us.getCurrentUser();
>
> >> >                StringBuffer buf = new StringBuffer();
> >> >                buf.append(" >> > class='omStatus'>PropertyValue >> > th");
> >> >                buf.append("Nickname" + 
> >> > usr.getNickname() + " >> > tr>");
> >> >                buf.append("EMail" + usr.getEmail() + 
> >> > "");
> >> >                buf.append("Auth Domain" + 
> >> > usr.getAuthDomain() + " >> > td");
> >> >                buf.append("");
>
> >> >                return buf.toString();
>
> >> > On Aug 5, 2:01 pm, Holger  wrote:
> >> >> You really need to give more details.
>
> >> >> > this cannot be explained by a cookie problem.
>
> >> >> ?? How can you know?
>
> >> >> What's the url where I can test?
>
> >> >> Who wrote that code?
>
> >> >> How does the code look like?
>
> >> --
> >> Nick Johnson, Developer Programs Engineer, App Engine
>
> --
> 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] Re: User Identity

2009-08-05 Thread Martyn

Hi Holger,

Unfortunately not just started development ;-)

But have just started with user auth :-(

I am extending a model-driven programming framework into AppEngine, so
need to integrate into several patterns.

So it's just a question of getting the patterns (and my mind) right.

Thanks for your feedback today!

- Martyn

On 5 Aug, 16:12, Holger  wrote:
> Hi Martyn,
>
> if you just started maybe you should consider to change to Python.
>
> Java might be more common outside the appengine world - but within
> appengine there exist far better ready made solutions for Python.
>
> For example the AppenginePatch project with Django registration (user
> account, individual user name) and session management out of the box.
> It's live. you can test it:http://aep-sample.appspot.com/
>
> Holger
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, 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: User Identity

2009-08-05 Thread Nick Johnson (Google)

On Wed, Aug 5, 2009 at 6:24 PM, Martyn wrote:
>
> Yes, I was assuming that if the user (in the browser) signed into
> another account then
> that new user would be returned by the UserService.
>
> I don't think it is a problem for a real world situation, but for
> testing it gave me surprising results.
>
> For quick account swapping I can provide an app sign-out link.
>
> But it does seem that it would be hard to have different logins in
> different browser windows, which I would like for testing.

Unfortunately, that's not really possible with _any_ login system
short of sending a session ID between pages in the URL. HTTP is not
session-based and has no concept of a browser window.

-Nick Johnson

>
> On 5 Aug, 17:09, "Nick Johnson (Google)" 
> wrote:
>> On Wed, Aug 5, 2009 at 3:21 PM, Martyn wrote:
>>
>> > I'm sorry, I am clearly missing something here.  And it looks like
>> > it's an unwarranted assumption on my part.
>>
>> > I had assumed, that the Google user authentication could be used in
>> > place of a conventional application login.
>>
>> That's entirely correct.
>>
>>
>>
>> > I have followed this to create a pattern such that the current Google
>> > user can be directly associated with an application user, and that
>> > for any request I could use the UserService to get a handle on the
>> > current user and then lookup my application user.
>>
>> Also fine.
>>
>>
>>
>> > So "logging out" for me, meant the user "signing out" of their Google
>> > account.
>>
>> Is the user logging out by clicking a 'logout' link you provided them
>> (using the Users API), or by logging out on some other Google service?
>> If the latter, it's quite possible that doing so would not log the
>> user out of all their App Engine apps immediately, yes. If you want a
>> user to be able to log out immediately, you need to provide them with
>> a logout link.
>>
>>
>>
>>
>>
>>
>>
>> > I will now RTFL on user authentication and see what I can learn.
>>
>> > Sorry if I've been wasting your time.
>>
>> > - Martyn
>>
>> > On Aug 5, 2:52 pm, "Nick Johnson (Google)" 
>> > wrote:
>> >> On Wed, Aug 5, 2009 at 2:20 PM, Martyn 
>> >> wrote:
>>
>> >> > Are you suggesting that I need to do something in my App for each
>> >> > request to ensure the current user returned is valid?
>>
>> >> We're suggesting that we don't have enough information to determine
>> >> where the problem is - certainly not enough information to conclude
>> >> that the Users API is erroneously returning a logged in user after you
>> >> have logged out.
>>
>> >> Have you tried logging the below information, and checking the admin
>> >> console logs to verify what output is generated after you request the
>> >> page after logging out?
>>
>> >> -Nick Johnson
>>
>> >> > I have no control if the user changes their account sign-in in another
>> >> > browser window.
>>
>> >> > My debug code is
>>
>> >> >                UserService us = UserServiceFactory.getUserService();
>> >> >                User usr = us.getCurrentUser();
>>
>> >> >                StringBuffer buf = new StringBuffer();
>> >> >                buf.append("> >> > class='omStatus'>PropertyValue> >> > th");
>> >> >                buf.append("Nickname" + 
>> >> > usr.getNickname() + "> >> > tr>");
>> >> >                buf.append("EMail" + usr.getEmail() + 
>> >> > "");
>> >> >                buf.append("Auth Domain" + 
>> >> > usr.getAuthDomain() + "> >> > td");
>> >> >                buf.append("");
>>
>> >> >                return buf.toString();
>>
>> >> > On Aug 5, 2:01 pm, Holger  wrote:
>> >> >> You really need to give more details.
>>
>> >> >> > this cannot be explained by a cookie problem.
>>
>> >> >> ?? How can you know?
>>
>> >> >> What's the url where I can test?
>>
>> >> >> Who wrote that code?
>>
>> >> >> How does the code look like?
>>
>> >> --
>> >> Nick Johnson, Developer Programs Engineer, App Engine
>>
>> --
>> Nick Johnson, Developer Programs Engineer, App Engine
> >
>



-- 
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] Memcache Performance

2009-08-05 Thread Martyn

While profiling some datastore performance I discovered a hit where I
hadn't expected one.

It turns out that memcache is taking ~13 ms for each put/get or inc/
dec.

Since I am using a memcache atomic increment as a VM semaphore this
results in a 26ms overhead to acquire and release the "lock".

I'm sure that somewhere I read that memcache takes ~3ms for a request.

Here is the code I used to test:
MemcacheService mc = 
MemcacheServiceFactory.getMemcacheService();
mc.put("testSemaphore", new Long(0));
timer.start();
for (int i = 0; i < 50; i++) {
mc.increment("testSemaphore", 1);
mc.increment("testSemaphore", -1);
}
out.append("Cache 
increment/decrements50"
+ timer.elapsed() + "");

timer.start();
for (int i = 0; i < 50; i++) {
mc.put("testSemaphore", new Long(23));
mc.get("testSemaphore");
}
out.append("Cache put/gets50" +
timer.elapsed() + "");

I get ~1380ms for each of the tests, so approx 14ms for each api call.

Any  suggestions?

- Martyn

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, 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: User Identity

2009-08-05 Thread Martyn

Actually I guess I can achieve that by using two different app
versions ;-)


On 5 Aug, 18:29, "Nick Johnson (Google)" 
wrote:
> On Wed, Aug 5, 2009 at 6:24 PM, Martyn wrote:
>
> > Yes, I was assuming that if the user (in the browser) signed into
> > another account then
> > that new user would be returned by the UserService.
>
> > I don't think it is a problem for a real world situation, but for
> > testing it gave me surprising results.
>
> > For quick account swapping I can provide an app sign-out link.
>
> > But it does seem that it would be hard to have different logins in
> > different browser windows, which I would like for testing.
>
> Unfortunately, that's not really possible with _any_ login system
> short of sending a session ID between pages in the URL. HTTP is not
> session-based and has no concept of a browser window.
>
> -Nick Johnson
>
>
>
>
>
>
>
> > On 5 Aug, 17:09, "Nick Johnson (Google)" 
> > wrote:
> >> On Wed, Aug 5, 2009 at 3:21 PM, Martyn 
> >> wrote:
>
> >> > I'm sorry, I am clearly missing something here.  And it looks like
> >> > it's an unwarranted assumption on my part.
>
> >> > I had assumed, that the Google user authentication could be used in
> >> > place of a conventional application login.
>
> >> That's entirely correct.
>
> >> > I have followed this to create a pattern such that the current Google
> >> > user can be directly associated with an application user, and that
> >> > for any request I could use the UserService to get a handle on the
> >> > current user and then lookup my application user.
>
> >> Also fine.
>
> >> > So "logging out" for me, meant the user "signing out" of their Google
> >> > account.
>
> >> Is the user logging out by clicking a 'logout' link you provided them
> >> (using the Users API), or by logging out on some other Google service?
> >> If the latter, it's quite possible that doing so would not log the
> >> user out of all their App Engine apps immediately, yes. If you want a
> >> user to be able to log out immediately, you need to provide them with
> >> a logout link.
>
> >> > I will now RTFL on user authentication and see what I can learn.
>
> >> > Sorry if I've been wasting your time.
>
> >> > - Martyn
>
> >> > On Aug 5, 2:52 pm, "Nick Johnson (Google)" 
> >> > wrote:
> >> >> On Wed, Aug 5, 2009 at 2:20 PM, Martyn 
> >> >> wrote:
>
> >> >> > Are you suggesting that I need to do something in my App for each
> >> >> > request to ensure the current user returned is valid?
>
> >> >> We're suggesting that we don't have enough information to determine
> >> >> where the problem is - certainly not enough information to conclude
> >> >> that the Users API is erroneously returning a logged in user after you
> >> >> have logged out.
>
> >> >> Have you tried logging the below information, and checking the admin
> >> >> console logs to verify what output is generated after you request the
> >> >> page after logging out?
>
> >> >> -Nick Johnson
>
> >> >> > I have no control if the user changes their account sign-in in another
> >> >> > browser window.
>
> >> >> > My debug code is
>
> >> >> >                UserService us = UserServiceFactory.getUserService();
> >> >> >                User usr = us.getCurrentUser();
>
> >> >> >                StringBuffer buf = new StringBuffer();
> >> >> >                buf.append(" >> >> > class='omStatus'>PropertyValue >> >> > th");
> >> >> >                buf.append("Nickname" + 
> >> >> > usr.getNickname() + " >> >> > tr>");
> >> >> >                buf.append("EMail" + usr.getEmail() + 
> >> >> > "");
> >> >> >                buf.append("Auth Domain" + 
> >> >> > usr.getAuthDomain() + " >> >> > td");
> >> >> >                buf.append("");
>
> >> >> >                return buf.toString();
>
> >> >> > On Aug 5, 2:01 pm, Holger  wrote:
> >> >> >> You really need to give more details.
>
> >> >> >> > this cannot be explained by a cookie problem.
>
> >> >> >> ?? How can you know?
>
> >> >> >> What's the url where I can test?
>
> >> >> >> Who wrote that code?
>
> >> >> >> How does the code look like?
>
> >> >> --
> >> >> Nick Johnson, Developer Programs Engineer, App Engine
>
> >> --
> >> Nick Johnson, Developer Programs Engineer, App Engine
>
> --
> 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] application scaling?

2009-08-05 Thread Rob

Hi,

The intro docs about App Engine say that it will scale your
application for you.  What exactly does that mean in terms of a low-
traffic web site suddenly getting hit with a lot of traffic?  For
example, if your site were suddenly "slashdotted" and was getting a
million hits, after getting 5 hits/day, does app engine respond in
seconds, minutes, hours?  Is there a period where your app is still
slow while App Engine replicates it?

thanks,
Rob

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, 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: 404 Forb

2009-08-05 Thread 陈年高
my python 2.6 can not run
^_^o(∩_∩)o...^_^ :-)



:-)音问久疏,唯愿一切康适。



2009/8/5 Hrishikesh Bakshi 

> Are you putting your own email in place of "myid"?
>
> Otherwise try :
>
> appcfg.py  update e:\helloworld
>
> Then it will ask for credentials.
>
>
> On Tue, Aug 4, 2009 at 12:21 PM, Dhivya Mylsamy wrote:
>
>>
>> Hello everyone,
>>
>> Iam getting this error when i try to upload my application.can anyone
>> help me
>>
>> E:\>appcfg.py -email=myid update e:\helloworld
>> Scanning files on local disk.
>> Initiating update.
>> 2009-08-04 18:41:36,703 ERROR appcfg.py:1272 An unexpected error
>> occurred. Abort
>> ing.
>> Traceback (most recent call last):
>> File "C:\Program Files\Google\google_appengine\google\appengine\tools
>> \appcfg.p
>> y", line 1250, in DoUpload
>> missing_files = self.Begin()
>> File "C:\Program Files\Google\google_appengine\google\appengine\tools
>> \appcfg.p
>> y", line 1045, in Begin
>> version=self.version, payload=self.config.ToYAML())
>> File "C:\Program Files\Google\google_appengine\google\appengine\tools
>> \appengin
>> e_rpc.py", line 344, in Send
>> f = self.opener.open(req)
>> File "C:\Python25\lib\urllib2.py", line 387, in open
>> response = meth(req, response)
>> File "C:\Python25\lib\urllib2.py", line 498, in http_response
>> 'http', request, response, code, msg, hdrs)
>> File "C:\Python25\lib\urllib2.py", line 425, in error
>> return self._call_chain(*args)
>> File "C:\Python25\lib\urllib2.py", line 360, in _call_chain
>> result = func(*args)
>> File "C:\Python25\lib\urllib2.py", line 506, in http_error_default
>> raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
>> HTTPError: HTTP Error 403: Forbidden
>> Error 403: -- begin server output --
>> You do not have permission to modify this app
>> (app_id=u'bitstars2010').
>> -- end server output -
>>
>>
>> app.yaml
>>
>>
>> application: bitstars2010
>> version: 1
>> runtime: python
>> api_version: 1
>>
>> handlers:
>> - url: /stylesheets
>>  static_dir: stylesheets
>>
>> - url: /.*
>>  script: helloworld.py
>>
>>
>>
>>
>
>
> --
> Hrishikesh Bakshi
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, 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] App Engine Terms & Conditions Atrocious?

2009-08-05 Thread webpaage

I am quite positive about using the App Engine to roll out our new
project except that I wonder someone from Google can explain what the
following clauses in the T&C actually mean? :

"Google reserves the right (but shall have no obligation) to pre-
screen, review, flag, filter, modify, refuse or remove any or all
Content from the Service"...

and

"By submitting, posting or displaying the Content on or through the
Service you give Google a worldwide, royalty-free, and non-exclusive
license to reproduce, adapt, modify, translate, publish, publicly
perform, publicly display and distribute such Content for the sole
purpose of enabling Google to provide you with the Service in
accordance with its privacy policy. Furthermore, by creating an
Application through use of the Service, you give Google a worldwide,
royalty-free, and non-exclusive license to reproduce, adapt, modify,
translate, publish, publicly perform, publicly display and distribute
such Application for the sole purpose of enabling Google to provide
you with the Service in accordance with its privacy policy."

and

"Google is constantly innovating in order to provide the best possible
experience for its users. You acknowledge and agree that the form and
nature of the Service which Google provides may change from time to
time without prior notice to you, subject to the terms in Sections 4.3
and 10.2. Changes to the form and nature of the Service will be
effective with respect to all versions of the Service (including the
Deprecated Version of the Service); examples of changes to the form
and nature of the Service include without limitation changes to fee
and payment policies, security patches, added functionality, and other
enhancements."

If this means that our Intellectual property rights are totally
surrendered while using GAE, then I think its not giving developers
any sense of assurance, much less receiving "the best possible
experience".

Please kindly advise.

-Samuel Koh

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, 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] database backup

2009-08-05 Thread Naveen Mishra

Hi
Is there some way to take backup of database,
as it may be needed to take backup of database periodically or before
upload a new version of app

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] Problem deploying demo application

2009-08-05 Thread squalo1...@nuoto.it

Hi everyone.
I'm new to Google App Engine and I'm using Eclipse 3.4 with the plugin
downloaded from Google.
When I create a new Web-Application project Eclipse set the
appropriate directories, libraries etc...
Running locally the web-app I can see the "Hello App Engine" page with
the available servlets and, when i follow the link to the servlet,
appears the mighty "Hello, world". So locally there are no errors.
Unfortunately, when I deploy the application, the link to the servlet,
simply doesn't work: it gives me a 500 error response (Server Error),
without any information about "what error happened".
Can anyone help me please?
P.S.: Sorry if my English isn't completely correct

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



[google-appengine] Re: database backup

2009-08-05 Thread Holger

Until now not.

It's in the roadmap but only as topic seven:
http://code.google.com/appengine/docs/roadmap.html

Till this future day you have to help yourself with the slow remote
data up/download explained here:
http://code.google.com/appengine/docs/python/tools/uploadingdata.html

- if you are lucky to get their overloaded explanation running.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, 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: GQL query failed to return a qualifying entity

2009-08-05 Thread phtq

Hello Jaap,

Sounds like this problem is not all that rare, although we have never
hit it before in over a year of development on the app engine.

I can't relate the problem to anything we have done recently. I don't
think we have introduced any new indexes for a while for example.

I take it Google have not come up with any explanation in your case so
far either?

On Aug 5, 11:18 pm, Jaap Taal  wrote:
> Same here, just good old ASCII chars in that record.
>
>
>
> On Wed, Aug 5, 2009 at 12:55 AM, phtq  wrote:
>
> > The fact that the record can be retrieved with any 2 of the 3 filters
> > indicates that there are no hidden characters.
>
> > On Aug 5, 8:41 am, Wooble  wrote:
> > > Are you sure there isn't a space or other non-printable character in
> > > your data in the datastore?  It's certainly possible your index is
> > > corrupt, but I'd check for more likely causes first.
>
> > > On Aug 4, 12:01 am, phtq  wrote:
>
> > > > In our application (kbdlessons version 1-01) we have just had a case
> > > > where a query in our application failed to return a record which
> > > > definitely exists. We were able to reproduce this problem using the
> > > > Dataviewer page off the app engine dashboard.
>
> > > > We put in this query using the Dataviewer:
>
> > > > SELECT * FROM StudentSubscriptions where StudentKey = 'REBECCA' and
> > > > ProductKey = 'Typequick Professional' and AccountKey = 'SIVF'
>
> > > > and got no results. However, if we use just 2 out of the 3 tests (any
> > > > 2!) the record we want appears amongst the results.
>
> > > > Also, other valid values for StudentKey when used in this 3 part query
> > > > do return a record in the Dataviewer page, just not this particular
> > > > set of 3 values.
>
> > > > We had to build a new record (under another name) to get the student
> > > > going, but have left the troubled record in the database so you can
> > > > look at it.
>
> > > > Please let me know how to avoid this rather worrying problem.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Who do you contact about Admin Dataviewer errors

2009-08-05 Thread Mark Jones

One of my "Kinds" isn't showing up in the data viewer.  When I use a
GQL query for it, I get:

Server Error

A server error has occurred.

Return to Applications screen »

When I do the same GQL query for the "kind" in another app, (which has
none of that "kind" in it), I get that there are no results.

Something is wrong with the datastore in my app, but I have no idea
how to even get assistance on it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: update_indexes error

2009-08-05 Thread Jeff S (Google)
Hi Niklas,

I reset the index count quota for this app. Unfortunately it seems like the
quota glitch caused the new indexes to become stuck as well. I've errored
them out, so you will need to vacuum them and re-upload (wait until the
vacuuming has finished before re-uploading).

Thank you,

Jeff

On Tue, Aug 4, 2009 at 1:52 PM, NiklasRTZ  wrote:

>
> I too seem to need index reset or further instructions. app id
> classifiedsmarket
> 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: Static file access for reading custom configuration file

2009-08-05 Thread VKM

Hi

Could you tell me then how to use my custom Yaml file for application
settings? One simple way is to have a new python file with settings
stored as dic or list etc and import it in main program. But that is
not the good way. I want to give access of Yaml file to my clients so
that they can modify the file and can update the content without
worrying about Python code.

Regards,
VKM

On Aug 4, 4:50 pm, djidjadji  wrote:
> You must not put this yaml file in a directory for static content.
> You can't open these static files with python/java code
>
> 2009/8/2 VKM :
>
>
>
> > Hi,
>
> > I am writing a yaml configuration file for my application. This config
> > file will contain few static settings (eg. drop down menu options). I
> > may need to add or remove few options from the menu so in that case I
> > will just need to change my yaml file and upload the app and changes
> > will reflect.
>
> > But when I read the file, it gives error: file not accessible. I saw
> > the warning messages and it says: dev_appserver.py Blocking access to
> > static file ...
>
> > Can any body give me solution for this! How to read a static file,
> > like a config file. Do I need to do chances in my app.yaml file?
>
> > Thanks
>
> > Regards,
> > VKM
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, 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 access for reading custom configuration file

2009-08-05 Thread Holger


> I want to give access of Yaml file to my clients
To my knowledge that's impossible and that wouldn't be a good idea as
the app.yaml file can contain security settings you don't want your
clients able to change, for example:
- url: /remote_api
  script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py
  login: admin

So you have to use the other method you've described.

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



[google-appengine] Re: application scaling?

2009-08-05 Thread Holger

Search for videos on this topic.

Usually they manage to keep reaction time below 3-10 seconds at the
upmost.

Another problem of beeing 'slashdotted' might be that your application
goes out of service because your preestimated quota is exceeded within
hours.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, 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] Proposal: __index__ support to make certain datastore/query operations more efficient

2009-08-05 Thread tav

As a developer we have various limitations that we have to work with
on App Engine. And if you are performance conscious, then you have
even more ;p

Two limits that one has to often work around are the 1MB Datastore
calls and ListProperty size limits.

A common pattern that I've used to overcome these is to use "related
entities". I use these related entities to store properties that I
want to search on -- separate from the entities that I want to
retrieve in order to display the results back to the user.

I was pleased to see App Engine developer Brett Slatkin officially
encouraging the use of this pattern in his I/O talk:

* http://code.google.com/events/io/sessions/BuildingScalableComplexApps.html

He calls them "relation index entities" and explains it better than I
can, so here be a slightly adapted excerpt from pages 23-25 of his
presentation PDF:



Problem: Scalably "delivering" a Twitter-esque post/message

Solution: Split the message into 2 entities:
* Message model contains the info we care about
* MessageIndex has only relationships for querying

>>> class Message(db.Model):
...   sender = db.StringProperty()
...   body = db.TextProperty()

>>> class MessageIndex(db.Model):
...   receivers = db.StringListProperty()

When writing, put entities in the same entity group for transactions:
* That is, make the Message entity be the parent for the MessageIndex entity
* You can of course have multiple MessageIndex entities per Message to
scale up...

And for queries:
* Do a key-only query to fetch the MessageIndexes
* Transform returned keys to retrieve parent entity
* Fetch Message entities in batch

>>> indexes = db.GqlQuery(
... "SELECT __key__ FROM MessageIndex "
... "WHERE receivers = :1", me)

>>> keys = [k.parent() for k in indexes]
>>> messages = db.get(keys)



Now, if you start using this pattern heavily, you'll realise that it
should be extremely trivial for the App Engine devs to turn the 3
stepped process of:

* Do a key-only query to fetch the MessageIndexes
* Transform returned keys to retrieve parent entity
* Fetch Message entities in batch

Into just a single step:

* Do a query on MessageIndexes which will actually return the related
Messages entities

That is, the query would be done on the MessageIndexes entities, but
instead of returning those entities, the related Message entities
would be returned.

Saving both us and App Engine an additional Datastore request and key
computation!! Given the 30 seconds limit, this also means that you
could then do twice the amount of querying in the same time! So it
helps even more!

So how would this work?

Well, let's say that we had the following Message:

>>> msg = Message(send='tav', body='Hello World')
>>> msg_key = msg.key()

And the following related MessageIndex entities:

>>> rcv1 = MessageIndex(parent=msg_key, receivers=['alice', 'bob'], 
>>> __index__=msg_key)

>>> rcv2 = MessageIndex(parent=msg_key, receivers=['ryan'], __index__=msg_key)

The presence of the newly proposed __index__ property would alter the
behaviour of how the Datastore indexes the rcv1/rcv2 entities. Instead
of doing the current:

  rcv1:receivers:alice
  rcv1:receivers:bob  
  rcv2:receivers:ryan 

It would look like:

  rcv1:receivers:alice
  rcv1:receivers:bob  
  rcv2:receivers:ryan 

[Note for those not familiar with the App Engine Datastore -- the App
Engine guys don't store the full entity in all of the index tables,
instead the  is stored and used to load up the complete
entity with all of its properties in order to respond to the completed
query once the relevant entities have been identified.]

That is, with __index__, the Datastore would sort of behave as if it
was actually indexing additional properties of the Message entity!! So
when a query comes in, it can do a query as if for a MessageIndex, but
then return the Message entity pointed to by the key!!

Now, sadly, I fear I've explained all this quite poorly, but I do
believe that it's a brilliantly simple/powerful idea.

All it needs is for an optional __index__ property on entities to be
treated specially and for it to be a Key if present (not a
ReferenceProperty) -- in which case, the key referred to in the
__index__ property is used to "index" the entity in question rather
than the entity's own key().


Anyways, hope I've made some sense and provided something of value --
let me know if I can provide any further clarifications. Thanks!

-- 
love, tav

plex:espians/tav | t...@espians.com | +44 (0) 7809 569 369
http://tav.espians.com | http://twitter.com/tav | skype:tavespian

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

[google-appengine] Re: User Identity

2009-08-05 Thread Martyn


> Is the user logging out by clicking a 'logout' link you provided them
> (using the Users API), or by logging out on some other Google service?
> If the latter, it's quite possible that doing so would not log the
> user out of all their App Engine apps immediately, yes. If you want a
> user to be able to log out immediately, you need to provide them with
> a logout link.

Okay, so a remaining question is "what is the mechanism such that a
user sign-out from another
Google service gets through to appEngine?"  This seems to be the magic
that belies
a simpler understanding.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, 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 access for reading custom configuration file

2009-08-05 Thread Tim Hoffman

You can define you own yaml file. and then read it directly (by the
way you can't from code, access
app.yaml or index.yaml)

Do something like this

from yaml import load

def loadSettings(settings='settings.yaml'):

settings = load(open(settings,'r').read()))

return settings

mysettings = loadSettings()

You probably want to cache this either in a module or memcache so you
don't have to reread it all the time.

Rgds

Tim


On Aug 6, 10:33 am, VKM  wrote:
> Hi
>
> Could you tell me then how to use my custom Yaml file for application
> settings? One simple way is to have a new python file with settings
> stored as dic or list etc and import it in main program. But that is
> not the good way. I want to give access of Yaml file to my clients so
> that they can modify the file and can update the content without
> worrying about Python code.
>
> Regards,
> VKM
>
> On Aug 4, 4:50 pm, djidjadji  wrote:
>
> > You must not put this yaml file in a directory for static content.
> > You can't open these static files with python/java code
>
> > 2009/8/2 VKM :
>
> > > Hi,
>
> > > I am writing a yaml configuration file for my application. This config
> > > file will contain few static settings (eg. drop down menu options). I
> > > may need to add or remove few options from the menu so in that case I
> > > will just need to change my yaml file and upload the app and changes
> > > will reflect.
>
> > > But when I read the file, it gives error: file not accessible. I saw
> > > the warning messages and it says: dev_appserver.py Blocking access to
> > > static file ...
>
> > > Can any body give me solution for this! How to read a static file,
> > > like a config file. Do I need to do chances in my app.yaml file?
>
> > > Thanks
>
> > > Regards,
> > > VKM
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---