Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > OT: squid-type cache for XML?

Reply
Thread Tools

OT: squid-type cache for XML?

 
 
CptDondo
Guest
Posts: n/a
 
      11-14-2006
OK, this is OT for this group, but I really have no idea where to post this.

I am working on a project where a 'client' periodically queries a number
of 'servers'. The exchanges are done using XML.

There is one client and an awful lot of servers (hundreds), and
bandwidth is limited. It can take hours for the client to query all of
the servers in round-robin fashion. (We can't use exception reporting
or have the servers report for technical reasons.)

My solution is to develop intermediate proxy-cache boxes, which would
query servers in their subnet and cache the results. The client then
would only need to query the proxies.

This seems like a pretty simple idea, and there solutions out there for
html proxies doing this sort of thing.

Is anyone aware of anything out there for xml queries?
 
Reply With Quote
 
 
 
 
Benjamin Niemann
Guest
Posts: n/a
 
      11-14-2006
Hello,

CptDondo wrote:

> OK, this is OT for this group, but I really have no idea where to post
> this.
>
> I am working on a project where a 'client' periodically queries a number
> of 'servers'. The exchanges are done using XML.
>
> There is one client and an awful lot of servers (hundreds), and
> bandwidth is limited. It can take hours for the client to query all of
> the servers in round-robin fashion. (We can't use exception reporting
> or have the servers report for technical reasons.)
>
> My solution is to develop intermediate proxy-cache boxes, which would
> query servers in their subnet and cache the results. The client then
> would only need to query the proxies.
>
> This seems like a pretty simple idea, and there solutions out there for
> html proxies doing this sort of thing.
>
> Is anyone aware of anything out there for xml queries?


Proxies like squid work on the protocol level (HTTP) - they do not care what
kind of data is being transferred.
If you are using HTTP to fetch the XML data, then you should be able to use
any generic HTTP proxy including squid.
Just make sure that the data is cachable at all: proper HTTP headers, data
is fetched using GET, not POST...
You could install cronjobs on or near the proxy servers, which pull the data
(via the proxy) and just drop it - to make sure the data is in the cache,
when your client comes around. A simple bash script with lots
of 'wget -O /dev/null http://...' might be sufficient.

HTH

--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de/
 
Reply With Quote
 
 
 
 
CptDondo
Guest
Posts: n/a
 
      11-14-2006
Benjamin Niemann wrote:

> Proxies like squid work on the protocol level (HTTP) - they do not care what
> kind of data is being transferred.
> If you are using HTTP to fetch the XML data, then you should be able to use
> any generic HTTP proxy including squid.
> Just make sure that the data is cachable at all: proper HTTP headers, data
> is fetched using GET, not POST...
> You could install cronjobs on or near the proxy servers, which pull the data
> (via the proxy) and just drop it - to make sure the data is in the cache,
> when your client comes around. A simple bash script with lots
> of 'wget -O /dev/null http://...' might be sufficient.


That's a neat idea....

I don't control the client so I'll have to see if the XML-over-HTTP will
work, but at least I can talk intelligently to my (human) client about
the issue....

--Yan
 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      11-14-2006

CptDondo wrote:

> It can take hours for the client to query all of
> the servers in round-robin fashion.


> My solution is to develop intermediate proxy-cache boxes,


This isn't proxying (and so I don't think Squid will help).

If you had a squillion clients querying one server with an identical
request, then you could cache that. What your problem is though is one
client querying lots of endpoints -- effectively many totally separate
requests. You can't cache that - even worse is that you might cache it,
and all "servers" appeared to report the same result!

You might be able to proxy this by setting up proxies (custom-written
but simple) somewhere that had good bandwidth to the servers, then
reported their results in some "denser" fashion to the client. This
isn't a transparent proxy though.

Chances are that you could even do this in-house, maybe even by just
re-writing the client to be multi-threaded. Is it really bandwidth
that's the problem here, or latency?

 
Reply With Quote
 
Toby Inkster
Guest
Posts: n/a
 
      11-14-2006
CptDondo wrote:

> I am working on a project where a 'client' periodically queries a number
> of 'servers'. The exchanges are done using XML.
>
> There is one client and an awful lot of servers (hundreds), and
> bandwidth is limited. It can take hours for the client to query all of
> the servers in round-robin fashion.


XML is fairly bulky. Have you thought of compressing the entire exchange
with gzip? Ought to reduce bandwidth by about 60% or so.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET Cache vs Window System Cache Sergey via DotNetMonster.com ASP .Net 0 11-15-2006 03:33 PM
no-cache - need to reload page from server and not the cache John HTML 2 10-29-2006 05:35 PM
client-side cache vs server-side cache vs ajax vs asp.net callback =?Utf-8?B?b25l?= ASP .Net 1 03-08-2006 12:25 PM
Page.Cache vs HttpContext.Current.Cache DesignerX ASP .Net 5 01-20-2004 10:55 PM
Cache::Cache Stale Segments Jeff Nokes Perl 0 09-30-2003 04:34 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57