Hi Lee,
Just a comment. Are you sure that inserting data every 10 seconds is
so expensive for your database? PostgreSQL is a very robust database
and should not have problems dealing with this. The idea that you are
proposing, apart of difficult to integrate I believe in Geoserver,
does not sound very efficient neither. I would play much more with the
database before starting figuring out a special solution.
So you have to analyze the whole process. You are going to be updating
the database every 10 sec., but how often are you gonna read from it?
Is it going to be that you have users accessing the information every
15 sec? If you dont expect no so many users in your web application
then your server is not going to be very busy inserting records in the
database.
An now, just a crazy idea that I think will not perform so well, but
still... If what you want to present in MapBuilder is a WMS layer then
you could have a dynamic SLD associated with it so that in the
intervals between updates in the database you insert there in-line
features. Geoserver will draw them together with whatever comes from
the database. Every time you do a batch processing you delete the
inline features of the SLD and the process start again.
Again, I dont think this will perform well, I am pretty sure that it
will perform better if you just insert in the database every 10sec.
But in the situation where you want to avoid having inserts every 10
sec. and you dont have so many users viewing the data but when they do
you want them to be totally up to date, that might work.
Every 10sec you could be writing to the database and to the SLD file
or you can have a temporary table where you insert this intermediate
records and the SLD is generated using PHP or whatever and take the
temporary records from this little table.
But again, try before just using the database because you might be
surprised on how well they perform. Think that inserts can take maybe
0.02sec, if it is every 10 sec, then the inserts in the database will
only represent 0,2% of your server processing time!
I hope it helps you a bit.
Javier.
On 8/7/06, leewse@anonymised.com <leewse@anonymised.com> wrote:
Hi,
I have the following scenario which I hope someone could give me some
advice on how I should approach it. My application reads data where the
interval between reading each record is about 10 secs, and I need to store
these data in the PostgreSQL database so that the map will reflect these
latest data updates. However, I do not wish to write to the database once
a record is read as such frequent writing would be very expensive. Instead
my intention is to do batch processing of the records after a longer
duration (say, 5mins). But my problem now is that if I do batch
processing, the information shown on my map will not be the most updated.
Is there a way to resolve this problem such that while the records of data
are being accumulated to be batch-processed to the database, these data
can at the same time be stored elsewhere so that the map can read from
there and draw the latest information? In other words, is it possible that
a request sent from my application to GeoServer performs an update with
the data stored in elsewhere? If possible, where would it be, how can
these data be read and how does it work with MapBuilder?
My apologies for the long description and many questions. Would greatly
appreciate help on this. Thanks a lot.
Regards,
Lee Wai See
[This e-mail is confidential and may be priviledged. If you are not the
intended recipient, please kindly notify us immediately and delete the message
from your system; please do not copy or use it for any purpose, nor disclose
its contents to any other person. Thank you.]
---ST Electronics Group---
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users