4 ms·
Hey all, I put browserver together in my free time over the last week. It's still a bit of a toy, but I think it's useful to explore ideas around extending web
by jedschmidt 14y ago
Hey all,
I put browserver together in my free time over the last week. It's still a bit of a toy, but I think it's useful to explore ideas around extending webhooks all the way to the browser, to simplify our increasingly complicated web architectures.
It's already late here in Tokyo, but I'll be up for a bit if anyone wants to chat/brainstorm about approaches like this (and also to make sure the server stays up).
- quarterto 14y agoSimple question: how the fuck?
- mcantelon 14y agoBasically a web browser reaches the Node HTTP server and gets assigned a throwaway hostname on the Node server. The browser and the server have a bidirectional connection (probably WebSocket via Socket.io or something). The throwaway hostname can be queried, via an HTTP API, and will, upon request, query the web browser through the bidirectional connection then will relay the results back.
- ivix 14y agoYeah, it's not quite a HTTP server, more of an API-driven backend to a HTTP server. Still neat.
- shurane 14y agoSimple statement: stop being so cool. On a related note, keep at it. I hope you go places. And where/how did you get the idea? Things like this make me wonder why I'm not having fun creating neat (and useful!) things.
- madrobby 14y agoI'm slightly disappointed that it's implemented in more than 140 bytes. Keep on being awesome. :)
- brettbergeron 14y agomind = blown
- javajosh 14y agoI had this idea, too, the killer application is actually demos and talks, I think. The speaker sets up their browser server, asks the audience to hit a URL, and then demonstrates in real time aspects of the system. It's also a very neat way to bring WebKit Inspector to bear on server style code. Glad you did it! I presume that you have a wildcard subdomain at the DNS level and then some Node parsing magic to correctly proxy. Why subdomains though? Why not just a tag like browserver.com/29adfija02 ?
- jedschmidt 14y agoI chose hosts over paths for disambiguation because I want the request passed to the proxy to be as close as possible to that passed to the browser.
- BrendanEich 14y agoAlso you get same-origin protection, FWIW.
- wamatt 14y agoThis does sound sort of interesting, but after thinking about it I don't get why this is cool. Can someone explain a practical use case? How is it different, in practice, from say running a Node.JS on localhost and using localtunnel?
- HerraBRE 14y agoHey! I am doing something very similar with PageKite (http://pagekite.net/ http://pagekite.net/), although the server does not run in a browser. I've decided to try to get authors of similar tools together on a mailing list to discuss whether we can agree on a common protocol so our clients/servers (connectors/relays, backends/frontends) can be interoperable. Join us: http://mailman.klaki.net/mailman/listinfo/revprotun http://mailman.klaki.net/mailman/listinfo/revprotun