Web Server in your Browser (Chrome Apps API)(github.com)
github.com
Web Server in your Browser (Chrome Apps API)
https://github.com/GoogleChrome/chrome-app-samples/tree/master/webserver
9 comments
Yes, quite a shame too, since I used it actively. I'm glad that Chrome will now be supporting a similar functionality (albeit in a somewhat hackish way for the time being). Can't wait to see what develops of the new Chrome networking stack.
Opera will always be my first browser love, though <3!
Opera will always be my first browser love, though <3!
Would love some feedback on how to make the API less hackish.
I'm a traditionalist (to me TCP connections use socket API in C) so can someone put this in context for me:
- could I write some JS script that runs directly in Chrome that accepts a socket connection, receives some data, sends responses and displays something in the browser?
- could this theoretical app be directly "deployed" from a web page on server in our LAN?
- does this solution help with my current situation where I have to help users poke holes into their McAffee firewall?
Could be useful for me since I frequently send small test utils to my team that communicate with our embedded systems via socket connections.
- could I write some JS script that runs directly in Chrome that accepts a socket connection, receives some data, sends responses and displays something in the browser?
- could this theoretical app be directly "deployed" from a web page on server in our LAN?
- does this solution help with my current situation where I have to help users poke holes into their McAffee firewall?
Could be useful for me since I frequently send small test utils to my team that communicate with our embedded systems via socket connections.
Your first point, this is just the JS implementation of the socket API. So yes, Chrome can accept a connection and send it back.
2nd point, yes, as long as you bind it to your IP address.
3rd point. Honestly not sure.
2nd point, yes, as long as you bind it to your IP address.
3rd point. Honestly not sure.
I would say probably not on #3 ... however, given the general NAT concept and such, having an outgoing connection could poke the hole, but this isn't how a listening service usually works, so it would require something else. However, once the session is negotiated, then HTTP (in theory) should work, although it is stateless at that level, but anyway, this is all a lot of bother because at this point you should go ahead and do something that's less of a kludge since you're already doing NAT traversal.
JS implementation of the API, or JS shim over the system API?
The operating system within the operating system.
It's JavaScript all the way down, folks.
It's JavaScript all the way down, folks.
Shameless plug: and also https://github.com/ubercomp/jslm32/ (includes a mechanism that generates Javascript on the fly).
When do we get to get rid of everything else?
This is only useful for Chrome Apps (which are meant to run locally on your machine) and will probably not be enabled for any real web surfing. Hosting HTTP on port 80 is probably the least useful real-world sample for this capability.
I selected a web server, because a lot of web developers want to run localhost test environments easily and also on Chrome OS.
Ideas like crowdsourced distributed hosting now come to my mind :)
I wonder if also using a sandboxed localstorage as a memcached would be useful? I guess you would have to account for bandwidth, response time, and available memory. Also account for variable CPU usage, but I wonder if you could train an algorithm to account for these factors. I could see it being a great way to "get paid for using X Extension".
https://addons.mozilla.org/en-US/firefox/addon/pow-plain-old... (apparently discontinued)
https://addons.mozilla.org/en-US/firefox/addon/browser-serve... (not tagged to work on linux :\)
https://addons.mozilla.org/en-US/firefox/addon/browser-serve... (not tagged to work on linux :\)
Firewalls are going to impede this from being used for widespread p2p apps. Is there a practical way to do UDP/TCP hole punching ala skype?
http://samy.pl/pwnat/ allows to establish a bidirectional connection between two machines behind NATs, but one of them must know the IP of the other's NAT, so this still requires a peer discovery system.
Also, I don't know if Chrome's socket API is sufficiently low level to craft ICMP packets. If I understand properly, it only offers a TCP socket.
Also, I don't know if Chrome's socket API is sufficiently low level to craft ICMP packets. If I understand properly, it only offers a TCP socket.
How do apps like bit torrent do it today?
Universal Plug and Play
Manual Rule Adding
Third Party Server[deleted]
now can i have a rhythm-box,nautilus ..all running inside my browser :D !!
They just recently removed the feature from the version 12 builds. I think that it was an interesting concept but it never caught hold.