Updating the map problem

Updating the map problem

Page 1 of 1

5 Replies - 915 Views - Last Post: 07 April 2007 - 07:20 PM Rate Topic: -----

#1 Nadia  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 24-March 07

Updating the map problem

Post icon  Posted 06 April 2007 - 06:00 AM

Hello helpers;

In my project we program a route finder software with java to help the customer find his/her way in the map. Some times the customer updates the map, at the same time the user should visit the latest version of the map in another computer.
The software is designed for windows. We want to test it in the lab network and the problem is how we can program the system which the user can visit the new version of the map as soon as possible. The data of the map is stored in XML file.
Any suggestion about the network setting to have a fast communication between the customer input and the output for the user, or sample code which can help is required.
It is your kindness if you can help me to find out the best solution as soon as possible.

Looking forward to your suggestions.

Nadia

Is This A Good Question/Topic? 0
  • +

Replies To: Updating the map problem

#2 Programmist  Icon User is offline

  • CTO
  • member icon

Reputation: 251
  • View blog
  • Posts: 1,833
  • Joined: 02-January 06

Re: Updating the map problem

Posted 06 April 2007 - 06:55 AM

Hi Nadia. Let me see if I understand. You have an XML file with the map data on a server. You want users to always see the newest version fo this file. The problem is that, once it loads the data into your program, and someone changes the original XML file, the changes aren't being updated in your program? One solution would be to include a date/time string in the XML file that is changed each time it is updated. Your program can then check the file periodically to see if its data/time matches. If not, it will get the new data. That is a very simple way to do it (assuming this is what you wanted).
Was This Post Helpful? 0
  • +
  • -

#3 Nadia  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 24-March 07

Re: Updating the map problem

Posted 06 April 2007 - 09:48 AM

Hi alcdotcom;
Thanks for your reply. This date idea is a brilliant idea, I don’t have any data about the time/date in XML file. I definitely will think about that. But there is an issue here, this approach is time triggered which is acceptable but can u give me any solution which is event trigger. I mean in using the time/date of the map, the system should check the file periodically. But if the map changed by customer, and this change is an event, can we understand this event in the user side?

The Server/client problem here is the computers that we test the software on them. All are clients and we don’t have access to the server. Therefore the setting of the customer’s part and user’s are on clients. May be I can say that I want a virtual server. I am not sure if it is a correct explanation.
1 idea which I am looking for that is “Socket programming” some one told me I can make server for only my application with the help of that. Another suggestion is “Java RMI remote method invocation”. What do you think?

Any idea which is relevant is esteem.

Looking forward to your suggestions.

Nadia.
Was This Post Helpful? 0
  • +
  • -

#4 Programmist  Icon User is offline

  • CTO
  • member icon

Reputation: 251
  • View blog
  • Posts: 1,833
  • Joined: 02-January 06

Re: Updating the map problem

Posted 06 April 2007 - 05:37 PM

Yes, my solution is time-triggered, as you said. I was basically trying to give you a simple solution that did not require connectivity, but if you want an event-based solution you'll have to connect your clients to a server using sockets or RMI or some other connection scheme. RMI is easy to implement. MINA is another option, but my be overkill in this situation.
Was This Post Helpful? 0
  • +
  • -

#5 Nadia  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 24-March 07

Re: Updating the map problem

Posted 07 April 2007 - 06:06 AM

Thanks for your help. I am reading about both solutions to find the suitable one.
Was This Post Helpful? 0
  • +
  • -

#6 Programmist  Icon User is offline

  • CTO
  • member icon

Reputation: 251
  • View blog
  • Posts: 1,833
  • Joined: 02-January 06

Re: Updating the map problem

Posted 07 April 2007 - 07:20 PM

Great. Let me know which you decide to use and how it works out.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1