Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


What are your thoughts on this....

Posted on 2004-11-01
Medium Priority
Last Modified: 2010-04-05

I wrote this app that updates the application and or data files for my main app.  I know how to handle params, but I would like to impliment a solution that leaves the end user totally out of the update.  I could make the application check for updates whenever you open it (and I may end up going down that road), but I would like to broadcast an instruction to update to all the clients.


I send a command

rcua data now

And that will tell all the clients to run rcu and update the data files immediatly.
Question by:TherosEquipment
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 31

Expert Comment

ID: 12470672
You will need to be running your program all the time the pc is on, which will mean a Timer to trigger to look for your update.  

Method of looking for updates: probably best to put them in a fixed location on the web, so that the program can check that site periodically.  No good though if the end user is on a dial-up connection.

Your question implies Pushing the update to the user, but this would involve plonking an executable of some sort directly onto the user's hard drive.  Many companies security policy would baulk at this.  My feeling is that it needs to be Pulled from somewhere outside.

The question to ask is, is there any advantage in polling for updates versus scanning for them on opening the app?  Unless you are looking at updates the size of SP2 I think the user will be patient enough to see a message "Please wait, downloading updates".
LVL 12

Assisted Solution

Ivanov_G earned 75 total points
ID: 12471976
You can have something like this on the server - INI file with the following information:

size= 295993

size= 295993

[subfolder/other file]
size= 295993

The client take this file and read the contents, then compare the side, md5 sum and version (for EXE, DLL, etc files). If there is a difference - download the new files from the server source directory...

Expert Comment

ID: 12478533
If you want to be able to use a program on a computer to update the program on other computers, then you will need to use some kind of server and client components. Take a look at the Indy components that are bundled with delphi, or maybe the ICS from http://www.overbyte.be/frame_index.html

This will only work however whilst the program is running and there would need to be a server that the program would connect to.

Sorry if I've misinterpreted your question, this is just what I think you meant.
LVL 17

Accepted Solution

Wim ten Brink earned 75 total points
ID: 12481518
Simple TCP/IP should be enough. The client starts and in a separate thread it sends a message to the server providing it's current version number and asking if an update is available. The thread then waits for any response. If no response or no update then the thread just dies. Otherwise, it will need to update itself.
By doing this in a separate thread, your main application will just continue to run as normal.

Another technique could be to have every client create a separate TCP/IP port and just keep listening to this port until a command arrives. All the server has to do is broadcast the command once the update is ready. However, this means you have to keep a connection open all the time just to listen for any commands from the server. And if you only have an update every week, I just consider this a waste of resources. But it would be okay if you update twice per hour...

You could also use the first solution and have the client check for updates every 15 minutes and on start-up. That way you do manage to keep it as up-to-date as possible, without claiming too many resources. (You don't have to keep listening all the time.)

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question