[Webinar] Streamline your web hosting managementRegister Today


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
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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Is your organization moving toward a cloud and mobile-first environment? In this transition, your IT department will encounter many challenges, such as navigating how to: Deploy new applications and services to a growing team Accommodate employee…

607 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