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
>

------------------------------------------------------------------------------
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

Reply via email to