The client gets the pages from my server, then gets data from wikipedia, 
processes it (on its own bandwidth and account), then sends the processed data 
(subset from the initial retrieval, about 20% remains) to my server (my 
bandwidth account) The user's speed experience so far is that of Wikipedia. I 
avoid bandwidth usage and it scales better, uses mirrors, etc. 
This allows the Wikipedia load to be distributed to the user's local mirror. It 
doesn't get sent back to the client. Once the client is done, it sends the data 
to me and we're done with wikipedia. By bill is low and I don't have to proxy 
any requests, so latency is low. 

I don't know why you think the server posts back to the client. 

Snapshots of wikipedia are good, but I'd rather do the real thing since it 
changes with the times. If someone adds a bitcoin entry, it's immediately 
usable to me. The user's don't need a month for me to deploy my next snapshot 
and my database saves about 14gbs of data on the partition. 




----- Original Message -----
From: Nagaev Boris <bnag...@gmail.com>
To: Jason H <scorp...@yahoo.com>; witty-interest 
<witty-interest@lists.sourceforge.net>
Cc: Koen Deforche <k...@emweb.be>
Sent: Monday, December 2, 2013 10:26 AM
Subject: Re: [Wt-interest] Easiest way to do AJAX to another site from the 
client?

1. Whole english wikipedia in text format is about 15Gb. It is less
than 1-day bandwidth usage by average server.
2. You can get data by Wt::Http from any sites, not only from
wikipedia. You can let client specify URL.
3. As I understand, your server processes data uploaded by the client
and returns result back to client. If client downloads data from
wikipedia, there are 3 data transfers: wikipedia -> client -> server
-> client. If server downloads data from wikipedia, there are only two
data transfers: wikipedia -> server -> client. Link between wikipedia
server and Wt server is much faster than client link in most cases.
So, first variant is about 2 times slower than second one.


Regards,
Boris Nagaev


On Mon, Dec 2, 2013 at 7:03 PM, Jason H <scorp...@yahoo.com> wrote:
> 1. Bandwidth. I don't want to add the load of the Wikipedia requests to my
> site.
> 2. The application does not care about the original retrieval of data from
> wikipedia, just the processed data from the client, using Wikipedia as a
> data source. It could be Flickr as well.
> 3. Lag. if the client has to wait for me to request the data then send it to
> the client, that'll add lag in something I want as snappy as possible. There
> us a UI that the data is loaded into before it is sent back.
>
> Thanks.
>
> ________________________________
> From: Koen Deforche <k...@emweb.be>
> To: Jason H <scorp...@yahoo.com>; "witty-interest@lists.sourceforge.net"
> <witty-interest@lists.sourceforge.net>
> Sent: Thursday, November 28, 2013 5:06 AM
> Subject: Re: [Wt-interest] Easiest way to do AJAX to another site from the
> client?
>
> Hey Jason,
>
> You must have a reason why the server cannot simply query Wikipedia?
>
> You can use CORS Ajax calls these days so there is no need for a link. See
> for example the following snippet from Wt.js:
>
>   var crossDomain =
>     (url.indexOf("://") != -1 || url.indexOf("//") == 0) &&
>     host(url) != window.location.host;
>
>   function createRequest(method, url) {
>     var request = null;
>     var supportsRequestHeader = true;
>     if (window.XMLHttpRequest) {
>       request = new XMLHttpRequest();
>       if (crossDomain) {
> if ("withCredentials" in request) {
>  if (url) {
>    request.open(method, url, true);
>    request.withCredentials = "true";
>  }
> } else if (typeof XDomainRequest != "undefined") {
>  request = new XDomainRequest();
>  if (url) {
>    supportsRequestHeader = false;
>    try {
>      request.open(method, url + '&contentType=x-www-form-urlencoded');
>    } catch (err) {
>      request = null;
>    }
>  }
> } else
>  request = null;
>       } else
> if (url)
>  request.open(method, url, true);
>     } else if (!crossDomain && window.ActiveXObject) {
>       try {
> request = new ActiveXObject("Msxml2.XMLHTTP");
>       } catch (err) {
> try {
>  request = new ActiveXObject("Microsoft.XMLHTTP");
> } catch (err2) {
> }
>       }
>       if (url && request)
> request.open(method, url, true);
>     }
>
>     if (request && url && supportsRequestHeader)
>       request.setRequestHeader("Content-type",
>       "application/x-www-form-urlencoded");
>
>     return request;
>   }
>
>
> Regards,
> koen
>
>
> 2013/11/27 Jason H <scorp...@yahoo.com>
>
> I need to have the browser query Wikipedia and return the results to the
> WApplication (after some processing in the browser)
> I've looked into it and Wikipedia would support this via the CORS mechanism.
>
> I was going to do some JS and include it then call it with
> WApplication.doJavaScript(), but I don't see where I can control <link>
> elements.
> I also have to set the origin header.
>
> Thanks!
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
> _______________________________________________
> witty-interest mailing list
> witty-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest

>
>
>
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
> _______________________________________________
> witty-interest mailing list
> witty-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>


------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to