8 ms·
A Go unikernel running on x86 bare metal
- cnst 6y agoAnyone's using this in production? Or any other unikernels? tl;dr: a unikernel means there's no standard OS other than the runtime execution environment specifically just for Golang in this instance; which means it should be much faster and much more lean (at the price of not having standard tools like SSH and all)
- bokohut 6y agoNot yet but planning and executing towards it. To add to others points and your own which may not be as obvious to some but my background stems from the financial world and security has always been a problem, breach du jour. The way things are done now are nothing short of broken, PCI and more, and all the glue holding the shattered "window" panes together certainly doesn't lead to anything secure or even a "window" you can see through. I'm certain there are millions that will disagree, job security of course, but when one has maintained critical uptime services on M$ as long as I have one begins to question there must be a better way. Solve your own problems first I always say as I am currently architecting that path, the sixth time of my career actually but this occurrence is different entirely.
- deleted 6y ago[deleted]
- deleted 6y ago[deleted]
- ed25519FUUU 6y agoVery curious. Can you elaborate more? Do you use Go in the finance world, and hope to use the unikernel to lower your attach surface? I didn't realize Go was a very common language in finance.
- bokohut 6y agoI am building an new way to conduct a technology business end to end in entirety, hardware through software, THE BIG PICTURE. Obviously these are my words and likely further explanation could be redefined in other terms based on ones understanding however I have done this several times before with extreme security and efficiency in mind at every decision made, AUTOMATION because PEOPLE ARE THE PROBLEM. My background is payments, finance and banking which I need not elaborate the security that has been in this arena alone for quite some time but anyone nowadays, even a 7 year old, can use any search engine and find a recent breach referencing lost financial information and EVERYONE reading this has likely been issued multiple new credit cards or worse. There are several people and companies working towards unikernels and the like but my jam, and always has been, is to apply the new way of thinking to a business, a serial puzzle master if you will. In short you are correct in using ONLY GO for absolutely EVERYTHING to reduce technical debt, ZERO TRUST architecture, automated everything and much much more. Might sound like hogwash to some but once more, if my past is an indication of my future as I love a challenge. It is what you cannot see that matters most.
- scns 6y agoI would suggest looking into OCaml unikernels if you work in finance.
- SAI_Peregrinus 6y agoFreeRTOS is a unikernel by that definition (by every definition I've seen, though they still use the term "Library OS" which seems essentially synonymous). It's quite common in embedded devices.
- aidenn0 6y agoBy that definition, older unixes were unikernels for the C runtime.
- Joker_vD 6y agoWell, that's not entirely wrong. After all, the libc is pretty much a part of Unix API today.
- pjmlp 6y agoActually is the other way around, libc is the part of UNIX API ISO was willing to put into the language standard, while the remaining part of the C UNIX runtime ended up as POSIX.
- SAI_Peregrinus 6y agoWell, the usual definition I see for unikernels also stipulates that there's only a single process. So FreeRTOS is still a unikernel, but early UNIX wouldn't be. Though the distinction between "process" and "thread" gets very fuzzy when you have only a single address space.
- ignoramous 6y agou/eyberg's https://nanovms.com/ https://nanovms.com/ look promising but they aren't self-service right now.
- convolvatron 6y agoI work a little on nanos..it clearly needs alot of usability work, stability, and feature work. but could you say explicitly what you mean by 'self service'?
- ignoramous 6y agoIf I've got some code I want deployed to nanovms cloud, say, there doesn't seem to be a way to do so. All I see on the website is "schedule demo".
- eyberg 6y agoWe don't actually do any hosting. This is a very common misconception. OPS - https://ops.city https://ops.city can deploy to any public cloud and can run on openstack/kvm/vsphere as well.
- hawk_ 6y agoYes I'd very much like to know if there's a JDK or rust unikernel someone has used in production - commercial or open source.
- eyberg 6y agohttps://github.com/nanovms/ops-examples/tree/master/rust/01-hello-world https://github.com/nanovms/ops-examples/tree/master/rust/01-... && https://github.com/nanovms/ops-examples/tree/master/java https://github.com/nanovms/ops-examples/tree/master/java to get you started - i don't know any of our users that are using those in prod though atm
- pjmlp 6y agoThese guys do all sorts of embedded deployments for Java, bare metal, real time OS or just plain Linux. https://www.aicas.com/wp/ https://www.aicas.com/wp/ https://www.ptc.com/en/products/developer-tools/perc https://www.ptc.com/en/products/developer-tools/perc http://osv.io/ http://osv.io/
- deleted 6y ago[deleted]
- andy_threos_io 6y agoAt least one or two order of magnitude more systems are using unikernels or rtos rather than a full-blown os. You can write a small scheduler even for a small 8bit microcontrollers (avr). The main purpose of the unikernels or small rtos are handling multiple running contexts (aka threads or tasks). I wrote several smaller kernels for embedded sytems, before starting threos.io . It's much easier to handle multiple tasks. ex. one of our project was a wireless voting terminal, one task handles the communication (RF) interface (protocol, error correction etc.), the other handles the user interface (buttons leds etc), and one task is handling the vote application program or logic. The tasks are communication over message passing. All of this running in a cortex-M3 with 8k-32kb ram. A more common example are wireless RF modems (WIFI, GPRS, GPS, Bluetooth etc.), nearly every RF modem uses some kind of unikernel or rtos.
- brmgb 6y agoHonest question: why use a unikernel on bare metal? I can see the lure on top of an hypervisor. You already have an actual kernel running which you can use it to administer the machine. Why pay the performance price of a full kernel in your vm if you are only going to run one application ? On bare metal however, you will probably need to bundle a ton of things if you don't want to end up with an unmanageable device. That leaves the performance gain of compiling everything together or actually disposable devices (maybe for embedded?) as potential use cases I can envision. Is there more ?
- toast0 6y agoWhy pay the performance price of a full kernel in your machine if you are only going to run one application? I'm not the author, but running on bare metal is more fun than running in a hypervisor. And removing layers from your stack lets you see what the cost and value of the layers are. I've only done bootstrapping on x86 and 8-bit processors (which is just set your reset vector), but x86 has a lot of isoterric setup stuff, and learning about the magic is interesting, if not totally useful. Also, some runtime environments have a lot of manageability within; probably less than an OS, but maybe enough. Not sure about Go.
- vbezhenar 6y agoOne reason to avoid bare metal is drivers. There is a lot of hardware around. New hardware is released every day. And you need to write and maintain drivers for that hardware. That's a tremendous effort and hardware manufacturers usually write drivers for a very few operating systems and Go unikernel certainly won't be one of them. Using virtualization provides a simple common layer, so host operating system can deal with drivers and guest operating system can deal with more interesting things.
- toast0 6y agoOf course you'll need to write a OS specific driver for critical hardware like interrupt controllers and system timers, but drivers for other things like network cards and disk controllers can be reused if you adopt the other OS's interfaces. Things like ndiswrapper exist to use windows drivers on Linux or FreeBSD; Linux, FreeBSD, and NetBSD also have a large pool of drivers, which can be used depending on which system's driver model you like best.
- Abishek_Muthian 6y agoThe README is concise and well written in my opinion, I was wondering how useful it would be without standard libraries before I clicked the link, the first paragraph says it has support for network libraries and went on to show Mario running in this!
- asim 6y agoThis is fascinating to me as I reorient https://go-micro.dev https://go-micro.dev towards something of an embeddable distributed systems framework. Really cool work, thanks for sharing.
- nullspace 6y agoHi Asim, your project is really interesting to me. Just curious, do you have go docs or tutorials hosted somewhere?
- asim 6y agoNot at this time. Google's pkg.go.dev only renders a subset of licenses and I now use polyform noncommercial. There is a repo of examples github.com/asim/examples for v2. With v3 I'll look to create some new examples and docs.
- tmaly 6y agoThis would be interesting if it could run on a raspberry pi. I see it is only x86 right now.
- rolleiflex 6y agoIf this could run on ARMhf/ARM64 it would be the holy grail of appliance-style hardware. I suspect this would require incorporation of some rPi-specific drivers, so it's a hard sell. Nevertheless this is perhaps more possible for rPi than for any other type of device because it's a well defined hardware target with a fixed BoM with no major part changes through the supported lifetime. I would support a kickstarter aiming to produce this for Pi.
- userbinator 6y agoThe RPi SoC also has nearly no real documentation, unless you are Broadcom or NDA'd by them.
- eyberg 6y agoNanos is specifically targeting ARM64 for the raspberry pi 4 and expect that support to land formally very soon. (I'm with the project).
- saiganesha5svkv 6y agoWhat are the differences between Unikernel and RTOS? Both are lean. Except for the fact that RTOSes are usually coded in C/C++ mostly. And Unikernel implementations are present in various languages. Other than that what is the difference? Moreover, RTOSes provide all those Real-Time guarantees.