Page 1 of 3

offloading dojo.js loading?

Posted: 29 May 2013, 01:30
by vapier
Google hosts a lot of common ajax libraries on ajax.googleapis.com for people to reference rather than loading from their own website. obvious advantages:
    * Google has much faster connections than any of us
    * the server is load balanced around the world so you get a system close to you (i.e. it's a CDN)
    * since it's a different domain, the browser will allow loading of it in parallel to other connections (so it doesn't get caught in the queue talking to the main ttrss instance)

for example:
https://ajax.googleapis.com/ajax/libs/d ... jo/dojo.js
https://ajax.googleapis.com/ajax/libs/s ... aculous.js

the dojo.js that comes with ttrss seems to be slightly different. can that be rectified so that we can leverage the Google hosted ones instead ?

Re: offloading dojo.js loading?

Posted: 29 May 2013, 07:36
by fox
You personally can leverage whatever, but this isn't going to happen in trunk for completely obvious reasons.

>* Google has much faster connections than any of us

That's not exactly how this works.

Re: offloading dojo.js loading?

Posted: 29 May 2013, 07:43
by vapier
and the "completely obvious reasons" are what ?

Re: offloading dojo.js loading?

Posted: 29 May 2013, 07:49
by fox
Not depending on nor providing marketing information to some kind of cloud (no matter if the owner is seemingly benevolent) on your installation is one of the major points of tt-rss.

Re: offloading dojo.js loading?

Posted: 29 May 2013, 08:40
by macfly
+1

Thats exactly why we (or at least i) switched to tt-rss.

Re: offloading dojo.js loading?

Posted: 29 May 2013, 09:25
by phz
Currently, if one runs the TT-RSS backend on a local machine (which probably is very common), it is possible to access TT-RSS even if the internet connection is down, which is actually quite a nifty feature. Inserting an external dependence by default would be "unexpected", to use a nice word. Also, for all these local TT-RSS instances, it is clear that the LAN connection should be a lot faster than what even the almighty Google can produce.

This seems like a request catered for those with "hosted services" in different forms, and, well, we all know how the FAQ feels about those :-) . But by all means do it on your own installation if it provides value.

Re: offloading dojo.js loading?

Posted: 29 May 2013, 09:38
by vapier
except you aren't really transmitting any details, nor receiving any. your cookies aren't included in the HTTP request, and the HTTP result doesn't set any. the only information Google sees is the referrer and your IP address. i guess for the tinfoil hats, even that is too much information.

making it a config.php knob for people to make their own choices should be simple enough.

this still doesn't answer my question about how tiny tiny rss deviates in its shipping dojo.js vs the stock one Google is hosting.

Re: offloading dojo.js loading?

Posted: 29 May 2013, 09:55
by fox
>making it a config.php knob for people to make their own choices should be simple enough.

Yes, if there's anything tt-rss needs is more configuration options. Well done.

>this still doesn't answer my question about how tiny tiny rss deviates in its shipping dojo.js vs the stock one Google is hosting.

I have no idea what you are talking about.

Re: offloading dojo.js loading?

Posted: 29 May 2013, 10:28
by vapier
fox wrote:>making it a config.php knob for people to make their own choices should be simple enough.

Yes, if there's anything tt-rss needs is more configuration options. Well done.


and your middle ground is ... nothing ? you don't want to default people into using fast CDN's due to minor information leakage (the URL of the ttrss instance and the IP address of the user), and you don't want a config option to control it.

fox wrote:>this still doesn't answer my question about how tiny tiny rss deviates in its shipping dojo.js vs the stock one Google is hosting.

I have no idea what you are talking about.


from the post that started this thread:

vapier wrote:https://ajax.googleapis.com/ajax/libs/dojo/1.8.3/dojo/dojo.js

the dojo.js that comes with ttrss seems to be slightly different. can that be rectified so that we can leverage the Google hosted ones instead ?

Re: offloading dojo.js loading?

Posted: 29 May 2013, 10:35
by sleeper_service
fox wrote:>this still doesn't answer my question about how tiny tiny rss deviates in its shipping dojo.js vs the stock one Google is hosting.

I have no idea what you are talking about.


well, fox, it's obvious, he wants to pay you to dissect google's dojo.js and compare it funciton by funciton, perhaps line by line, to the one in ttrss.

send him your hourly rate and a contract! ;)

Re: offloading dojo.js loading?

Posted: 29 May 2013, 10:38
by sleeper_service
vapier wrote:the dojo.js that comes with ttrss seems to be slightly different. can that be rectified so that we can leverage the Google hosted ones instead ?
[/quote]

all this arm waving and leg stamping over a 133k file? :roll:

Re: offloading dojo.js loading?

Posted: 29 May 2013, 10:44
by blainemono
vapier wrote:and your middle ground is ... nothing ?


Let's put it this way: your idea is stupid because you don't know how this shit works.

Note: judging by the amount of red flags your posts rise I'm tempted to say in this case "this shit" equals to "anything in the world".

Re: offloading dojo.js loading?

Posted: 29 May 2013, 10:47
by fox
vapier wrote:and your middle ground is ... nothing ? you don't want to default people into using fast CDN's due to minor information leakage (the URL of the ttrss instance and the IP address of the user), and you don't want a config option to control it.


Due to the nature of tt-rss license I can't prohibit you doing whatever with the source, which includes printing it out and wiping your butt with it. If you want it, by all means, load dojo from CDN. Nobody is stopping you.

It will stay the way it is now in trunk for reasons outlined in above posts in this thread - which involves privacy concerns (I personally don't give two shits about) and independence of third party run services (which I care about).

Also, in my experience, the most likely bottleneck in your internet connection is your last mile, not your hosting service or CDN. Unless you run tt-rss on a particularly overloaded shared hosting which is not supported anyway you won't see any tangible performance improvement.

In short, there will be no knobs and no trunk support for CDN.

the dojo.js that comes with ttrss seems to be slightly different.


That's scientific approach right there.

Re: offloading dojo.js loading?

Posted: 29 May 2013, 10:51
by fox
sleeper_service wrote:all this arm waving and leg stamping over a 133k file? :roll:


Do du -hs lib/dojo lib/dijit :p

Re: offloading dojo.js loading?

Posted: 29 May 2013, 11:10
by sleeper_service
fox wrote:
sleeper_service wrote:all this arm waving and leg stamping over a 133k file? :roll:


Do du -hs lib/dojo lib/dijit :p


well, fair enough, but he was only specifying one file, how'm I'm supposed to read his 'mind'? :lol:

while my php is rusty, my js is non-existent ;)