Monkey Barrel script - installation disabled
|
|
Kevin Lim wrote a cool script (Monkey Barrel), to enable a functionality we all want. Unfortunately a client side only solution has many issues: Privacy - your complete browser history is sent to userscripts.org, including https pages Scalability - our server cannot handle being hit every time you go to a new page. We 100% want this feature, and Kevin prototyping is a good start. Lets continue prototyping without killing the site. Our server load increased by 5-10x due to this script. That brought us to 100% load on the server, and I had to act drastically, hence disabling installation and adding the editorial comment above. |
|
|
We plan to implement a (caching) API (JSONP?) some time in the future, that would hopefully decrease the server load for this type of request, though even then making a request for every page load might be too hard on the server. Keep this in mind for any script that makes lots of HTTP requests - having the script cache results is a courtesy to the site provider. Using APIs where available will help them track usage (and make the script less fragile). Obviously not all site providers will realize the extra load is coming from a userscript. This is one example of a script that caches requests, though I'm sure there are better examples – please link them. To discuss what policy Userscripts.org should have for when to disable scripts (if ever), go here. |
|
|
Thanks for catching this guys. I've implemented a new version of MonkeyBarrel that only makes extra requests when the user initiates by clicking an added button. I'll look at caching when I have some spare time (maybe later this wknd) |
|
|
Thought I should add this link (as mentioned on the greasemonkey-users mailing list): http://simonwillison.net/2005/Apr/11/etiquette/ |
|
|
Is there anyway userscripts.org can post a 'static' plain text index of domain specific scripts which can be updated every 24 hours or so in which this script can download and then check against the domain being browsed (done locally)? The killer app in the script is that it makes you aware of script availability you probably wouldn't have check into otherwise. Having to click and find out about each domain really hinders usefulness and I'm probably going to disable it in the next few days simply because of the double "rendering" just so a monkey button can be over-layed on top. It might as well be a search engine plugin rather than a Greasemonkey script in its current state. |
|
|
something like this is definitely something we want to do - maybe json, maybe txt, maybe rdf, ... maybe all of above. Right now we are concentrating on fixing existing issues before adding new features. Soon! |
|
|
I was thinking that as a stopgap solution, Monkey Barrel could be rewritten using Google instead of us.o, Google could easily take the extra load, page-rank already submits them every page. On the other hand that does make the privacy issues worse, but then again Google probably already knows everything about me as I use the I'm feeling lucky from the address bar a lot. |
|
|
alien_scum: That might work, depending on how often Google re-indexes this site and how up-to-date you want the information to be. |
|
|
This is a charming solution. Perhaps we can limit the queries to once a domain, rather than every page load for a modestly higher level of privacy. |
|
|
I've written a google version using caching. It updates the cache every ten days, for pages without scripts. Google seems to be quite quick in it's indexing it found my radiotimes script which is only three days old. I'm not sure about my caching technique i kept it really simple so it adds a value for each domain is that bad? |
|
|
alien_scum: Great! One value per domain is OK, but using a single value is better. Just use a hash that is serialized and unserialized. |
|
|
Nice work, alien_scum! But there are still a few things, like what Lior Z pointed out in your script's comments:
Here's my fix: var tokens = href.match(/([0-9a-z_\-]+\.)+/i); var query = (tokens[tokens.length-1]=='co')?tokens[tokens.length-2].replace(/\./g,''):tokens[tokens.length-1].replace(/\./g,''); I also worked out a way to have it display the number of scripts from that search term. As well as a few other minor details, such as having its position 'fixed' instead of 'absolute'. Feel free to incorporate these features if you'd like. EDIT: Apparently, the number it gives is not entirely accurate. But that is the fault of Google. |
|
|
I like the idea of having the number of scripts, but as Henrik pointed out I need to overhaul the caching so I'll put it in then. I was also thinking that the monkey head could shrink over time, then grow if the number of scripts increases. |
|
|
alien_scum: Like I just commented, yours is a fantastic script. I personally feel the monkey's head is too prominent, so I thought maybe it should be set to disappear after a few seconds, or be half-transparent. |
|
|
My biggest problem with the monkey head is that on a lot of sites it blocks some of the links. Making it semi-transparent won't fix this, but I love the idea of having it shrink over time. |
|
|
alien_scum said: the monkey head could shrink over time, then grow if the number of scripts increases. Not to be nitpicky but I'd prefer color scale. ;) Thanks guys! |
|
|
I've finally finished the cache and updated the script so it displays the number of new scripts and shrink over time. I also moved it to the left so it should get in the way less. |
