Three-layers update system

Everything need update in this era, especially, internet products, like a cafe game update system.

There are kinds of roles in the cafe game update system, following are some of them.

1. a cafe client, it has one instance in each cafe client pc, in another word, it will be a group of client in a client, from several clients to hundred ones.

2. a cafe server, it serves the clients in the cafe, it has only one instance

3. a cafe game disk server, it serves the clients in the cafe, it could have multi instance, or it doesn’t exist in certain cafe, because it’s a optional componet

4. the central server, it manages all license logic, stats logic

5. the resource center server, it manages all games index, all file servers

6. file servers, it stores all games, managed by the resource center server.

in the meantime, there is also a billing system for cafes, it also has cafe clients, and cafe servers. The two system run the same time at the same machines in certain cafes.

In order to bring latest features to these products, we need an update system to update them role by role, layer by layer.

There are 3 types of update in these systems.

1. direct update, no child application, like a central server, file server and etc, it get the update from a http server.

2. update and control the update of children, like a cafe server, it get the update from a http server, and delivery the client update to clients through p2p technology.

3. update locally, like a cafe client, it updates from cafe server, it doesn’t request latest version from internet directly, it get the update files through p2p.

What’re the main componets in this sytem.

1. application updater and the updater interface module, it’s used for purpose one

2. cafe server updater and the updater interface module, it’s used for purpose two

3. cafe client updater and the updater interface module, it’s used for purpose three.

4. update package generator, it’s used for building a update package that will be downloaded by application updater and cafe server updater.

What’s the core libraries used in this system.

1. libcurl: used for fetching latest  update infromation from a http server.

2. libhttpdl: I wrote this for multi connection, multi task download, used for downloading all files inside a update package, it supports downloading progressively, http & https. it’s based on boost::asio.

3. libarchve: used for extracting files from zip.

4. libtorrent: used for p2p transferring.

5. libenet: used for comunication between cafe server and cafe client, so that the cafe client can fetch the latest file info from a cafe server, and then transfer files through libtorrent

6. liblogger: I wrote this for logging purpose, more flexible than log4cxx.

And finally, the features:

1. two kinds of update, self update, cafe update

2. multi products are able to update in the same machine at the same time.

3. cafe clients are update locally to reduce the update time and bandwidth consumption.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s