JUpdater

Last updated
JUpdater
Developer(s) Andreas Launila
Stable release
0.5 / March 24, 2006
Operating system Platform independent
Type Autoupdate utility
License LGPL
Website www.lokorin.com/jupdater/

JUpdater is a project which aims to create a utility that allows developers to quickly implement version checks into Java programs. The utility ensures that the user can always be notified of new versions, and easily upgrade to the latest version from within the program, without having to do anything. The utility only downloads the files that are out of date, saving bandwidth.

Contents

JUpdater is split into two parts. A small Java client, which can easily be implemented into existing programs, and a PHP server part, which keeps track of the versions and provides the client with all the info it requires. The project is still in development, possibly containing bugs. Any program that is to be updated via JUpdater has to be contained in a jar file.

Client

DKP Log Parser's JUpdater client implementation's GUI. Dkplp update.jpg
DKP Log Parser's JUpdater client implementation's GUI.

A small bundle of classes, a JUpdater client, has to be added to programs so that they can compare their versions with a central server. The client requires JRE 1.5 or greater.

The client provides three main operations.

  1. Update a specified jar file by comparing all files' MD5 checksums, this is done in several steps described below.
  2. Check if a new version is available on the server by using the Implementation-Version attribute in the jar manifest.
  3. Check if a new version is available and get the corresponding changelog by using the Implementation-Version attribute.

An interface can optionally be implemented in order to listen to the update process. This information can then for instance be displayed in a GUI for the user.

Server

JUpdater requires a central server that contains information about the latest version. The clients connect to the server in order to check if there are new versions and to download the changes and changelog. The server requires PHP 4.3 or greater and MySQL 4.0 or greater.

How updating works

Here's an in depth description of what actually happens behind the scenes when performing a complete update check.

  1. The JUpdater instance's updateJar method is called with the name of the jar file to update and the relevant program name.
  2. The client opens a connection to the server and sends the program name (via HTTP Post).
  3. The server establishes a session and responds with the session id and the server's jar URL for that program. From this point on the client and server are in a session and the server therefore remembers what program the client wants to update during all further requests connected to that specific update.
  4. The client stores the server's response and sends a request for the file list of the server's jar file via XML-RPC. The server responds with a list (taken from the server's database).
  5. The client calculates MD5 checksums for all local files that it can find (looking in the file list from the server), the rest are given a checksum of 0. The client then sends the result to the server (via XML-RPC).
  6. The server checks all MD5 checksums against the entries in the database and returns a list of all the files for which the checksums did not match (i.e. a list of all files that are out of date). The following array is sent back for each file that is out of date: [filename, size, correct md5] (all of those things are read from the database).
  7. If nothing is out of date then the client stops here, otherwise it continues.
  8. The client requests a changelog from the server (via XML-RPC). The server responds with all changes (as entered by the administrator) made between the client's versions and the latest version.
  9. The client displays the changes and asks the listener with shouldStartDownloading() if it should download the files.
  10. If false is returned from the method then the client stops here, otherwise it continues.
  11. The client starts downloading the out of date files one by one into a temporary storage. For each file the client calculates the MD5 checksum and make sure that it matches, otherwise it tries again (until it's out of tries).
  12. The client begins to patch once all out of date files are downloaded. It copies the current jar's up to date files into a new jar file and then writes the downloaded files into that jar. Once all is done without errors it replaces the old jar with the up to date jar, hence completing the update.

See also

Related Research Articles

In distributed computing, a remote procedure call (RPC) is when a computer program causes a procedure (subroutine) to execute in a different address space, which is coded as if it were a normal (local) procedure call, without the programmer explicitly coding the details for the remote interaction. That is, the programmer writes essentially the same code whether the subroutine is local to the executing program, or remote. This is a form of client–server interaction, typically implemented via a request–response message-passing system. In the object-oriented programming paradigm, RPCs are represented by remote method invocation (RMI). The RPC model implies a level of location transparency, namely that calling procedures are largely the same whether they are local or remote, but usually, they are not identical, so local calls can be distinguished from remote calls. Remote calls are usually orders of magnitude slower and less reliable than local calls, so distinguishing them is important.

Jakarta Enterprise Beans is one of several Java APIs for modular construction of enterprise software. EJB is a server-side software component that encapsulates business logic of an application. An EJB web container provides a runtime environment for web related software components, including computer security, Java servlet lifecycle management, transaction processing, and other web services. The EJB specification is a subset of the Java EE specification.

<span class="mw-page-title-main">Shareaza</span> Peer-to-peer file sharing application

Shareaza is a peer-to-peer file sharing client running under Microsoft Windows which supports the gnutella, Gnutella2 (G2), eDonkey, BitTorrent, FTP, HTTP and HTTPS network protocols and handles magnet links, ed2k links, and the now deprecated gnutella and Piolet links. It is available in 30 languages.

XML-RPC is a remote procedure call (RPC) protocol which uses XML to encode its calls and HTTP as a transport mechanism.

rsync File synchronization protocol and software

rsync is a utility for efficiently transferring and synchronizing files between a computer and a storage drive and across networked computers by comparing the modification times and sizes of files. It is commonly found on Unix-like operating systems and is under the GPL-3.0-or-later license.

BitTorrent is a communication protocol for peer-to-peer file sharing (P2P), which enables users to distribute data and electronic files over the Internet in a decentralized manner.

<span class="mw-page-title-main">JAR (file format)</span> Java archive file format

A JAR file is a package file format typically used to aggregate many Java class files and associated metadata and resources into one file for distribution.

<span class="mw-page-title-main">BitComet</span> BitTorrent, FTP and HTTP client

BitComet is a cross-protocol BitTorrent, HTTP and FTP client written in C++ for Microsoft Windows and available in 52 different languages. Its first public release was version 0.28. The current BitComet logo has been used since version 0.50.

<span class="mw-page-title-main">FileZilla</span> Free software, cross-platform file transfer protocol application

FileZilla is a free and open-source, cross-platform FTP application, consisting of FileZilla Client and FileZilla Server. Clients are available for Windows, Linux, and macOS. Both server and client support FTP and FTPS, while the client can in addition connect to SFTP servers.

The eDonkey Network is a decentralized, mostly server-based, peer-to-peer file sharing network created in 2000 by US developers Jed McCaleb and Sam Yagan that is best suited to share big files among users, and to provide long term availability of files. Like most sharing networks, it is decentralized, as there is no central hub for the network; also, files are not stored on a central server but are exchanged directly between users based on the peer-to-peer principle.

<span class="mw-page-title-main">Capistrano (software)</span>

Capistrano is an open-source tool for running scripts on multiple servers; its main use is deploying web applications. It automates the process of making a new version of an application available on one or more web servers, including supporting tasks such as changing databases.

In computing, Java Web Start is a deprecated framework developed by Sun Microsystems that allows users to start application software for the Java Platform directly from the Internet using a web browser. The technology enables seamless version updating for globally distributed applications and greater control of memory allocation to the Java virtual machine.

XML Interface for Network Services (XINS) is an open-source technology for definition and implementation of internet applications, which enforces a specification-oriented approach.

<span class="mw-page-title-main">Transmission (BitTorrent client)</span> BitTorrent client

Transmission is a BitTorrent client which features a variety of user interfaces on top of a cross-platform back-end. Transmission is free software licensed under the terms of the GNU General Public License, with parts under the MIT License.

<span class="mw-page-title-main">Metalink</span> File format that describes one or more computer files available for download

Metalink is an extensible metadata file format that describes one or more computer files available for download. It specifies files appropriate for the user's language and operating system; facilitates file verification and recovery from data corruption; and lists alternate download sources.

eMule Free peer-to-peer file sharing application for Microsoft Windows.

eMule is a free peer-to-peer file sharing application for Microsoft Windows. Started in May 2002 as an alternative to eDonkey2000, eMule now connects to both the eDonkey network and the Kad network. The distinguishing features of eMule are the direct exchange of sources between client nodes, fast recovery of corrupted downloads, and the use of a credit system to reward frequent uploaders. Furthermore, eMule transmits data in zlib-compressed form to save bandwidth.

In computing, eD2k links (ed2k://) are hyperlinks used to denote files stored on computers connected to the eDonkey filesharing P2P network.

Windows Vista contains a range of new technologies and features that are intended to help network administrators and power users better manage their systems. Notable changes include a complete replacement of both the Windows Setup and the Windows startup processes, completely rewritten deployment mechanisms, new diagnostic and health monitoring tools such as random access memory diagnostic program, support for per-application Remote Desktop sessions, a completely new Task Scheduler, and a range of new Group Policy settings covering many of the features new to Windows Vista. Subsystem for UNIX Applications, which provides a POSIX-compatible environment is also introduced.

<span class="mw-page-title-main">StableUpdate</span>

StableUpdate is a cross platform library for automatic update of the installed applications on the client side. It supports the automated creation, detection, downloading, installation and removing of the service packs.

<span class="mw-page-title-main">Rufus (software)</span>

Rufus is a free and open-source portable application for Microsoft Windows that can be used to format and create bootable USB flash drives or Live USBs.