Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Networking Emulation (Games) Virtualization Linux Hardware

Linux Kernel Running In JavaScript Emulator With Graphics and Network Support 177

New submitter warmflatsprite writes "It seems that there have been a rash of JavaScript virtual machines running Linux lately (or maybe I just travel in really weird circles). However until now none of them had network support, so they weren't too terribly useful. Sebastian Macke's jor1k project uses asm.js to produce a very fast emulation of the OpenCores OpenRISC processor (or1k) along with a HTML5 canvas framebuffer for graphics support. Recently Ben Burns contributed an emulated OpenCores ethmac ethernet adapter to the project. This sends ethernet frames to a gateway server via websocket where they are switched and/or piped into TAP virtual ethernet adapter. With this you can build whatever kind of network appliance you'd like for the myriad of fast, sandboxed VMs running in your users' browsers. For the live demo all VMs connect to a single private LAN (subnet 10.5.0.0/16). The websocket gateway also NATs traffic from that LAN out to the open Internet."
This discussion has been archived. No new comments can be posted.

Linux Kernel Running In JavaScript Emulator With Graphics and Network Support

Comments Filter:
  • by Joining Yet Again ( 2992179 ) on Tuesday November 12, 2013 @11:38AM (#45401823)

    Can we go back to trying to target for time+space efficiency rather than buzzwords?

    • by Anonymous Coward

      They are, this is the most efficient Linux kernel running in JavaScript, through WINE, on Red Hat, in a VMware image, on a tablet running KitKat flavored Android (... a Javaclone on an ARM).

    • That version is coming. It's very buggy though and will take another 2 years to get to alpha. In the mean time enjoy this "working well enough for what the developer wanted" version.

  • by ArbitraryName ( 3391191 ) on Tuesday November 12, 2013 @11:43AM (#45401883)
    A lack of network support was what was holding back a JavaScript VM running Linux from being useful. No other reason whatsoever.
  • Imagine a Beowulf cluster of these! It would be the slowest, worst cluster ever!

  • by sl4shd0rk ( 755837 ) on Tuesday November 12, 2013 @11:53AM (#45402047)

    ..er, forget it.

  • by OlivierB ( 709839 ) on Tuesday November 12, 2013 @11:58AM (#45402107)

    The most incredible thing is the speed at which it runs: 11.5 MIPS.

    My desktop dual-core Xeon W3503@2.40Ghz barely manages 40 MIPS in Chrome.

    The iPhone 5s is crazy fast by most standards

    • "my desktop dual core"

      isnt multiple cores irrelevant in the single threaded javascript environment?

      • You're right. The task manager was hovering around 100%, and but I forgot there was another chrome window running in the background

      • With the introduction of Web Workers, JavaScript is no longer single threaded. It's pretty nice!
      • by BZ ( 40346 )

        It depends.

        Once you're in steady state, and if you don't use workers and don't use the new parallel processing primitives people are proposing for JS, you're right.

        But during JIT warmup, and any time you have to JIT a new function or new codepath it matters because on multicore hardware you can do background compilation.

    • Yes, the 5s is incredibly fast. With a Geekbench score of 2523, it's faster than a 2011 Mac Mini (which were not slow machines by any means). It matches my last workhorse, a 17" MacBook Pro, which clocked in at 2524.

      Incidentally, it doesn't take a weatherman to know which way the wind blows. Intel recently started up ARM production for the first time ever, and Apple has been referring to the A7 as "desktop class." It's only a matter of time before they ship the first ARM MacBook.

      All of this is relevant to J

      • by Anonymous Coward

        "Intel recently started up ARM production for the first time ever, "
        Nope - see http://en.wikipedia.org/wiki/XScale

        I still have some Palm Zire 71/72, and Windows CE/Mobile devices with Intel ARM CPU's.

      • by vux984 ( 928602 )

        Yes, the 5s is incredibly fast. With a Geekbench score of 2523, it's faster than a 2011 Mac Mini (which were not slow machines by any means).

        Which 2011 mac mini are you talking about?

        http://browser.primatelabs.com/geekbench2/search?page=2&q=mac+mini+2011&utf8=%E2%9C%93 [primatelabs.com]

        The scores for a 2011 macbook range from 5500 to 9500 depending on the model.

        So... less than half as fast as a low end computer from 2 years ago? Ok... I'll buy that.

        And the 5S is in the same ballpark as a Galaxy Note 3, Sony Xperia Z1

  • by barlevg ( 2111272 ) on Tuesday November 12, 2013 @12:04PM (#45402181)
    Can this Linux kernel run a Javascript VM? If so, can that VM run the Linux kernel? And if so, can that kernel run a Javascript VM? And if so...
    • In principle yes. But we have to cross compile the Javascript engine. And this is very difficult because the most important Javascript engines are very complicated to build and support only ARM and x86 CPUs.
  • by Anonymous Coward on Tuesday November 12, 2013 @12:11PM (#45402261)

    It's amazing to me that "tech for the sake of tech" posts like this elicit much the same responses I would expect from a non-nerdy audience. At what point did slashdotters become mostly a group of curmudgeonly old-men who care only about what use can be made of new things and who find NO INTEREST what-so-ever in new and different ideas?

    THIS is why it takes that ex-jock-turned-business man to make money on technology. Somebody who isn't an old-fart slashdotter who "ho-hum"s everything new. This community is SUCH a disappointment.

    • The majority of SLASHDOTTERS and the majority of TROLLS are two different groups. js
  • First post! (Score:5, Interesting)

    by Fwipp ( 1473271 ) on Tuesday November 12, 2013 @12:18PM (#45402337)

    From my OpenRISC ORK Javascript Emulator Running With Network Support

    i.imgur.com/zJPsjCT.png

    • Hope you realized you just sent your Slashdot password through some dude's hacked together relay server in, most likely, clear text... Also there are a bunch of other Slashdotters on the same virtual subnet with full root access to theirs, yours, and everyone else's virtual machine on that very subnet.

      Very cool post, but you may want to change your password now.

      and ...

      Just don't do any online banking that way. ;-)

  • Wonderful now that I can finally run a full operating system in a browser, I can finally deliver a rich client server experience in my web-based applications :-)

  • There are many times when I need to do remote admin on a machine from a location where I don't have SSH available. Currently that usually involves some type of hacky browser-based terminal emulator. Actually running a Linux based OS in the browser would be perfect for such occasions, assuming I'm someplace where making outbound port 22 connections isn't a problem.

    • Considering that most smartphones will happily run a terminal program...and you can get bootable linux on a usb stick or a whole linux computer on an HDMI plug.

      • Considering that most smartphones will happily run a terminal program...and you can get bootable linux on a usb stick or a whole linux computer on an HDMI plug.

        I'm talking about a device where installing additional software or plugging in a physical device that I probably don't have with me anyway is either not possible or not desirable.

    • There are many times when I need to do remote admin on a machine from a location where I don't have SSH available. Currently that usually involves some type of hacky browser-based terminal emulator.

      Yes some web based SSH clients are better than others, but I assume the response time would be much quicker than emulating an entire OS as running an SSH client within it.

      Actually running a Linux based OS in the browser would be perfect for such occasions, assuming I'm someplace where making outbound port 22 con

      • Yes some web based SSH clients are better than others, but I assume the response time would be much quicker than emulating an entire OS as running an SSH client within it.

        Did you try the demo? I was quite surprised at how snappy it was. Point taken that the definition of "hacky" is subjective :)

    • If you have web access, then you can download PuTTY. Much simpler/easier than waiting for an OS to load in your browser ... just to run "ssh".

      • If you have web access, then you can download PuTTY. Much simpler/easier than waiting for an OS to load in your browser ... just to run "ssh".

        The wait time of the demo really wasn't that unreasonable. Installing Putty isn't possible if I'm on a platform it doesn't support or on a device where I can't install or run additional software.

  • Ok, supposing that instead of presenting a command line to the browser user the websocket/javascript instead installed a reverse command line back to the server, essentially giving a remote user access to the internal commands within the browser via the javascript kernel. All the remote user needs is a bug. plugin, or other feature that allows the browser to perform operations on the websurfer's host, like a fly-by install of malware or scraping the user environment of all information available. What preven
  • by locopuyo ( 1433631 ) on Tuesday November 12, 2013 @04:24PM (#45405503) Homepage
    I am having trouble setting up WINE with this. Can someone help me setup WINE so I can play Crisis on my Nexus?
  • I think a setup like this would be good to develop a OS prototyping engine. Instead of working low to high level like most operating systems you could work at all levels to perfect the upper level look & feel and adjust the lower level to correct for problems affecting higher level & security. Sort of like what going from type writers to word processors did for writing.
  • However until now none of them had network support, so they weren't too terribly useful.

    And with it they cure cancer, solve world hunger and make perfect soufflé?

The opossum is a very sophisticated animal. It doesn't even get up until 5 or 6 PM.

Working...