[OpenLayers-Users] Multi-User Applications

Brent Pedersen bpederse at gmail.com
Tue Dec 30 13:21:58 EST 2008


On Tue, Dec 30, 2008 at 10:16 AM, Bill Thoen <bthoen at gisnet.com> wrote:
> I'm working on an OpenLayers application that requires the user to
> create a polygon that is used in a separate server-side calculation so I
> have to turn it into a shape file first. For any one user, I can just
> create a new PostGIS table and simply call it "RegionOfInterest" and
> then run the CGI script to perform the calculation and add the new
> features to the user's map.
>
> But this method falls apart as soon as there is another user online
> using the same application. The second user's polygon overwrites the
> first user's, so I need to keep each user's data separate. So my
> question is what's the best way to keep each user's activity separate
> for operations that aren't totally contained within their browser sessions?
>
> Do you use session id's for this and create separate databases based on
> session id or is there a better way?
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>

not sure how your db fits in with the shapefile, but guessing:
i think creating a separate database is a bit heavyweight. i'd just
have a single table with a "session_id" column -- if you're using
sessions. otherwise create a random file name for the .shp and put
that in the db column.
then you can return either of those to the web-app which will then
poll using id or name for a db column of 'finished' or 'result' or
some such.



More information about the Users mailing list