View Single Post
Old 12-03-2011, 10:27 PM  
raymor
Confirmed User
 
Join Date: Oct 2002
Posts: 3,745
Quote:
Originally Posted by Cyber Fucker View Post
Interesting approach... however, it cannot use browser bookmarks... I'm building a tool that will be on a website, and many users will be using it. I would like to offload my server though, if the queries may be done on client-side then there is no reason for me to rip my own server which can also lead to blocking its IPs within various places and abuse. If I will not find a proper client-side solution that could be combined into the website I will have to put it on some external VPS cause I cannot afford any problems with the main server.
The same script can be attached to a button on a page. Within a page, you do run into cross domain restrictions. You can deal with that by proxying through the origin server, or using yql:
http://james.padolsey.com/javascript/cross-domain-requests-with-jquery/

Javascript can also be divorced from cross domain restrictions by being packaged as a Firefox addon.

That's going to be the challenging part about JavaScript - working around cross domain restrictions in some way. Doing it server side would be easier certainly.

Being worried about your main server being blocked due to too many requests, a small VPS might be reasonable. If you expect a large volume of users, but want to minimize the hardware requirements, code written in C will handle roughly 150 times as much traffic on the same hardware compared to PHP. Perl is roughly three times as fast as PHP, and still so similar that a lot of code is both valid Perl and valid PHP. So if you were going to do it server side, just changing a few lines to make it Perl rather than PHP triples your throughout or so:

http://xodian.net/serendipity/index....-vs.-Ruby.html

Last edited by raymor; 12-03-2011 at 10:28 PM..
raymor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote