What I want to build is an application that sits online and it's used by different groups that each have their own intranet. Now, because of a stupid security policy the data can't sit outside the intranet. How would you go about building an app that it's still online, so you can push updates to everyone at once, but has a DB on each intranet's server? My initial plan is to use Node.js and MongoDB.
I'm facing a similar problem right now, so here's my take on it, not really mongo or node specifc.
http://facade/server/resource
becomes a request to http://server/resouce
. http://facade/resource
go to each server, retrieve results and return all of them in some aggregated form. Obviously there are more details to take into account, like permissions (can everybody publish to each server? if not, who can?), but the general idea is there.
If your db really has to be onsite, and your app really has to be offsite, then probably your only option is to set up a secure connection from your app, to the onsite db, and pretend as if its hosted locally to the app. This may/may not violate the security policies. You could in theory lock it down pretty well, with a vpn between the two networks. But this is not for the faint of heart, performance will suffer, and it does have security issues. It also means a bit of work for every site.
If the only reason you're wanting it to be "online" is for pushing updates as you stated, then you'll do better installing the app on-premise, and getting it to poll into a central server for notifications about new versions, download updates to itself, and install them automatically. Once you've created this, a new installation requires no new work.