[Newbie] best strategy for querying multiple servers at a time
- From: Guilhem Bonnefille <guilhem bonnefille gmail com>
- To: libsoup-list gnome org
- Subject: [Newbie] best strategy for querying multiple servers at a time
- Date: Tue, 23 Mar 2010 14:14:41 +0100
Hi,
I've just discovered libsoup. So, here is a small introduction of myself.
I'm working on viking application. This is a desktop based GPS data
editor with abilities to display maps downloaded from internet.
http://viking.sf.net/
Currently, the network layer uses libcurl in a multi thread
programming logic. I plan to change this for a simpler solution. So,
I'm looking around libsoup. But, as I'm completely new to libsoup, I'm
unable to elect the better design for viking. Here is the important
informations (I think).
Viking is tile oriented, i.e. when it needs to refresh part of its
display, it computes all missing tiles and starts downloading them.
Furthermore, it can connect many servers at a times (for example
official OpenStreetMap, hiking related OpenStreetMap server and
terraserver). Of course, all these servers do not have the same
responsiveness.
The question is: what design should I select:
- a single SoupSessionAsync, queuing all requests to all servers?
- a SoupSessionAsync per server?
For a concrete example, imagine I need to download tiles from servers
s1 and s2. At a selected zoom level, I need to download 9 tiles on
each servers. So, I queue all the 18 requests. But, s1 is faster than
s2 (for example twice faster). So, I wished to retrieve 2 tiles from
s1 and 1 tile from s2, then 2 tiles from s1 and 1 tile from s2... and
so on. And I don't want to download all tiles from s1 BEFORE
downloading tiles from s2.
Any tips are welcome. Thanks in advance.
--
Guilhem BONNEFILLE
-=- JID: guyou im apinc org MSN: guilhem_bonnefille hotmail com
-=- mailto:guilhem bonnefille gmail com
-=- http://nathguil.free.fr/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]