offloading dojo.js loading?

Development-related discussion, including bundled plugins
User avatar
vapier
Bear Rating Trainee
Bear Rating Trainee
Posts: 10
Joined: 29 May 2013, 01:21

offloading dojo.js loading?

Postby vapier » 29 May 2013, 01:30

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 ?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: offloading dojo.js loading?

Postby fox » 29 May 2013, 07:36

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.

User avatar
vapier
Bear Rating Trainee
Bear Rating Trainee
Posts: 10
Joined: 29 May 2013, 01:21

Re: offloading dojo.js loading?

Postby vapier » 29 May 2013, 07:43

and the "completely obvious reasons" are what ?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: offloading dojo.js loading?

Postby fox » 29 May 2013, 07:49

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.

macfly
Bear Rating Disaster
Bear Rating Disaster
Posts: 82
Joined: 27 Mar 2013, 23:07

Re: offloading dojo.js loading?

Postby macfly » 29 May 2013, 08:40

+1

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

phz
Bear Rating Disaster
Bear Rating Disaster
Posts: 77
Joined: 18 Mar 2013, 18:32

Re: offloading dojo.js loading?

Postby phz » 29 May 2013, 09:25

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.

User avatar
vapier
Bear Rating Trainee
Bear Rating Trainee
Posts: 10
Joined: 29 May 2013, 01:21

Re: offloading dojo.js loading?

Postby vapier » 29 May 2013, 09:38

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.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: offloading dojo.js loading?

Postby fox » 29 May 2013, 09:55

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

User avatar
vapier
Bear Rating Trainee
Bear Rating Trainee
Posts: 10
Joined: 29 May 2013, 01:21

Re: offloading dojo.js loading?

Postby vapier » 29 May 2013, 10:28

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 ?

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: offloading dojo.js loading?

Postby sleeper_service » 29 May 2013, 10:35

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! ;)

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: offloading dojo.js loading?

Postby sleeper_service » 29 May 2013, 10:38

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:

User avatar
blainemono
Gaping Anus of Eternity
Gaping Anus of Eternity
Posts: 246
Joined: 05 Jun 2009, 18:13

Re: offloading dojo.js loading?

Postby blainemono » 29 May 2013, 10:44

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

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: offloading dojo.js loading?

Postby fox » 29 May 2013, 10:47

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.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: offloading dojo.js loading?

Postby fox » 29 May 2013, 10:51

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


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

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: offloading dojo.js loading?

Postby sleeper_service » 29 May 2013, 11:10

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


Return to “Development”

Who is online

Users browsing this forum: No registered users and 4 guests