[OpenLayers-Users] Re: Save Data, Multiple User access at same Time

Michael mdm at yachtpc.com
Mon Jun 6 08:48:56 EDT 2011


I might start by thinking of this as a visual chatroom or multiplayer 
game.  From what I've read and experimented a little with, an AJAX 
solution where you poll the central server for position updates (and 
send your own) or a Comet solution (Like AJAX, but it's more 
push-flavored) or, looking to the future, a WebSockets solution would 
serve you.

The advice I got from this board (and even in this thread), which I 
think to be sound, is to start with AIAX.  Poll the server as often as 
you want to check for updates.  Later in development, consider upgrading 
to one of the above-mentioned.

I suspect that your timestamp's required accuracy will depend on your 
needs.  If you do not need absolute precision of time, it might be good 
enough to update positions "as received" with no regard for absolute 
time.  Next most "accurate" would be to use a variable in the 
client-side javascript to keep track of a timestamp gotten from the 
server with an offset from the time received.  From there, your 
solutions become more involved.  I am working on an application where 
absolute time is critical, and a little custom hardware at each client 
is required, for example.


The others are right, though.  JSON, xml, .csv, these are all just data 
transport formats.  Use what works best for you.  You may want to 
experiment, as these all involve tradeoffs.

Michael



On 6/6/2011 5:35 AM, Nicholas Efremov-Kendall wrote:
> Yeah, you're going to need to get it to work in atomic time was well 
> to simultaneously update the positions your describing. So, this is 
> probably going to recall some sort of ajax function tied to each 
> client spitting the position data into a server-side script and 
> spitting the updated position data back into the map. My guess is some 
> sort of event listener on the feature the user is positioning, and 
> then on the back-end a multi-user transactional database which stores 
> and updates all the positions on the map...
>
> So client-side you need your user interaction with the feature, you 
> should look into the various controls OL has which let you interact 
> with features in the map, and will probably get some of the 
> functionality you want. The ajax function here will have to update the 
> server with the user's position in order to be able to give that data 
> to other users.
>
> I have no idea how you'd implement this on the server, but you're 
> going to have to have each user be able to modify some sort of spatial 
> database with each user logged into your application. So that's 
> another piece you'll need, some sort of server-side login mechanism, 
> which gives users access to modify the table/dataset of users and 
> positions.
>
> Updating that database is going have to happen pretty often, so you'll 
> need something transactional and probably some sort of complicated 
> SQL...good luck!
>
> On Mon, Jun 6, 2011 at 4:50 AM, Rossko <rossko at culzean.clara.co.uk 
> <mailto:rossko at culzean.clara.co.uk>> wrote:
>
>     > I need a saveStrategy and a way to save that changes (position,
>     attributes
>     of the point) at a central point.
>
>     That's outside the scope of OpenLayers ; you are going to need
>     some kind of
>     multiuser database. Choice of what to use may be forced upon you,
>     by what
>     kind of server-side resources are available to you or what
>     environment you
>     are used to working in.
>
>     > I read something about geojson. Could this match to my problem?
>
>     It's just a data transport mechanism, it won't do any saving or
>     updating for
>     you, although it could be part of your solution.
>
>     --
>     View this message in context:
>     http://osgeo-org.1803224.n2.nabble.com/Save-Data-Multiple-User-access-at-same-Time-tp6442182p6444473.html
>     Sent from the OpenLayers Users mailing list archive at Nabble.com.
>     _______________________________________________
>     Users mailing list
>     Users at lists.osgeo.org <mailto:Users at lists.osgeo.org>
>     http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110606/b37ab1dd/attachment.html


More information about the Users mailing list