Cookies

Ken Seehof kens at sightreader.com
Fri Mar 16 17:58:42 EST 2001


----- Original Message -----
From: "David Bolen" <db3l at fitlinxx.com>
Newsgroups: comp.lang.python
To: <python-list at python.org>
Sent: Friday, March 16, 2001 5:48 PM
Subject: Re: Cookies


> "Ken Seehof" <kens at sightreader.com> writes:
>
> > Does anyone know of another mailing list more specific to http
questions?
> >
> > 1. Client downloads an execuatable (frozen python application).
> > 2. Client downloads a web page.
> > 3. Web page javascript generates a statistically unique random
identifier.
> > 4. Web page sends identifier to the server, which uses it as database
key.
> > 5. User runs python application
> > 6. *** Python application somehow gets the identifier from somewhere ***
> > 7. Now the python application and the server both have the same
identifier.
>
> Because of the restrictive client Javascript environment you'll
> probably be faced with, crossing the boundary between inside the
> browser and outside is not trivial.

Yup.

> Is there a reason that the identifier has to only be generated by 3?
> It's not clear if your Python application is going to connect to the
> server anyway, but if so couldn't it just do the same processing
> you're putting into the javascript and generate a unique identifier
> (that it thus knows about) at that point?

Yes, the application connects to the server.  Specifically, it queries
the server with the identifier as the key.  The question is: what is
the processing that can be done by both the javascript and the
python application that will generate the same number?

> Or, if it isn't going to connect to the server, how about just letting
> the Python application open up it's own web page internally to run
> appropriate code on your web server to generate the identifier (which
> could run as a server script), and then Python could parse it right
> from the resulting HTML information.

Again, it's the same catch-22.  I need the server to generate the same
id that the javascipt generated earlier, but I need each client to have
a unique id.

> > The only question I am asking is how to do step 6.
> >
> > Alternative:
> >
> > 1. Client downloads an execuatable (frozen python application).
> > 2. Client downloads a web page.
> > 3. *** Web page javascript makes a unique identifier for the client. ***
> > 4. Web page sends identifier to the server, which uses it as database
key.
> > 5. User runs python application
> > 6. *** Python application somehow generates the same identifier ***
> > 7. Now the python application and the server both have the same
identifier.
> >
> > Again the only question I am asking is how to do steps 3 and 6 to get
the
> > same number.
>
> This would probably prove even harder.  Algorithmic generation of a
> truly unique identifier will almost always include some time based
> deviation, so I'm not sure about an algorithm that will both be
> globally unique and re-computable at different times - at least not
> without still passing some information between the two compute engines
> which puts you back at your same problem.
>
> --
> -- David
> --
> /-----------------------------------------------------------------------\
>  \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
>   |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
>  /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
> \-----------------------------------------------------------------------/
> --
> http://mail.python.org/mailman/listinfo/python-list
>





More information about the Python-list mailing list