anarchyos icon indicating copy to clipboard operation
anarchyos copied to clipboard

the stack

Open juliangruber opened this issue 11 years ago • 18 comments

there's some confusion about what this will be on the technical site:

  • an os written in javascript?
  • an os written in c?
  • an "os" that you launch on top of a host os?

I'm quite sure we need to be able to run C applications, so just javascript / browser is not an option.

An entire os would allow for most flexibility but is a huge amount of work and slows down adoption times.

If we can make it so that you can run anarchyos on top of your host os - which needs to be *nix based - we'd have the best of both worlds and can still level up to a whole os later.

juliangruber avatar Oct 06 '13 12:10 juliangruber

Can you quantify huge amount of work VS. the other option?

heapwolf avatar Oct 06 '13 13:10 heapwolf

Why not use some existing kernel? Options are:

  • Illumos/SmartOS kernel (not sure if they are kept in sync or not or if they can be extracted)
  • Hurd
  • Linux
  • ...probably few others less know kernels, but we're risking incompatibility and lack of adoptions

Writing your own kernel is hard - I tried. If we want it done this year, it'd be a full-time job for 20 people. I'd strongly use something that already exists.

mmalecki avatar Oct 06 '13 13:10 mmalecki

I don't think writing a kernel crossed anyone's mind ;)

heapwolf avatar Oct 06 '13 13:10 heapwolf

Also see CoreOS.

mmalecki avatar Oct 06 '13 13:10 mmalecki

+1 for SmartOS because DTrace and USDTs.

heapwolf avatar Oct 06 '13 13:10 heapwolf

yeah def. not write our own kernel. Reuse!

juliangruber avatar Oct 06 '13 13:10 juliangruber

@hij1nx thinking iteratively starting with the value prop, just the package management, which gives most outcome, and then doing the more tedious parts (if even)

juliangruber avatar Oct 06 '13 13:10 juliangruber

Even before that, I like what's going on here -- https://github.com/NodeOS/NodeOS#nodeos Conversely, it's a lot of blot to just choose a prepared distro and build on top of it.

heapwolf avatar Oct 06 '13 13:10 heapwolf

the stack: a portable package manager that runs over any host os + an optimised distro. so there us high-anarchy and low-anarchy, just like levelup and leveldown

And also, "low" can be replaced with something compatible, and most of the things in "high" are usable across platforms.

This is a pattern we've seen across many successful node projects - even node itself has node.js and libuv

dominictarr avatar Oct 10 '13 18:10 dominictarr

+1 for SmartOS or Linux. High/Low Abstraction will definitely improve adoption speeds. Especially with the systems such as docker which would make it incredibly easy to deploy AnarchyOS anywhere.

miketheprogrammer avatar Feb 28 '14 16:02 miketheprogrammer

Have you tried installing smartos on your laptop? :P Initially it should run on mac and any linux type distro, not like a full os but still doing it's work, only later when we need to reach further down the stack will we go with some or our own linux flavor. The vm currently boots ubuntu.

juliangruber avatar Mar 01 '14 12:03 juliangruber

we absolutely need to be able to run native apps. the best way would be with native client - which allows sandboxing of LLVM bytecode. This means that instead of os level sandboxing you can have process level sandboxing. which will be massively more secure. Security is essential to enable the level of distribution we are talking about. (i.e. totally distributed)

dominictarr avatar Mar 03 '14 01:03 dominictarr

I'm planning on using cgroups, and namespaces to isolate running apps on node-os eventually. You can build entire lxc-containers from the technology, but there's no reason you can't just run single apps like this. Since node dependencies are relative to the modules root directory, you can't essentially chroot each app in its own container. (though the node binary may need to be statically linked to libc).

groundwater avatar Mar 03 '14 07:03 groundwater

FreeBSD now has good support for dtrace thanks to @indutny

On Monday, March 3, 2014, Jacob Groundwater [email protected] wrote:

I'm planning on using cgroups https://en.wikipedia.org/wiki/Cgroups, and namespaces https://en.wikipedia.org/wiki/Cgroups#Namespace_isolationto isolate running apps on node-os eventually. You can build entire lxc-containers from the technology, but there's no reason you can't just run single apps like this. Since node dependencies are relative to the modules root directory, you can't essentially _chroot_each app in its own container. (though the node binary may need to be statically linked to libc).

Reply to this email directly or view it on GitHubhttps://github.com/juliangruber/anarchyos/issues/6#issuecomment-36485803 .

Paolo Fragomeni Founder, Here is How http://hereishow.to

github.com/hij1nx twitter.com/hij1nx

heapwolf avatar Mar 03 '14 07:03 heapwolf

@juliangruber I have not tried installing SmartOS on my mac, but I have it installed on my linux boxes.

miketheprogrammer avatar Mar 03 '14 16:03 miketheprogrammer

@hij1nx I love the approach that nodeos has taken

furthermore, I like the idea of a low (down) and high (up) level api for building things. It will allow users to rapidly create things and not worry about the environment it is running on except that they are ensured it will run on nodeos. like @dominictarr said this is analogous with libuv to node or leveldown to levelup. a community of "low level" module makers can grow in parallel as a community of "high level" (user land?) module makers grows much like the creators of native node modules (level bindings) to those who augment it (leveldown => levelup).

@juliangruber I'm super stoked to see this gaining attention again ! :]

jwerle avatar Mar 03 '14 16:03 jwerle

On a related note, I really want to build up node bindings for all of the Linux and POSIX system calls. Your comments would be greatly appreciated here NodeOS/NodeOS#21

Nothing about that is node-os specific, and it may be worth its own project at some point, but until it gains momentum I'm housing it under the node-os project.

Aside from the syscalls, I'm not looking to make node-os POSIX compliant. I want to make low-level systems stuff, like programming with DHCP, or mDNS easier to hack. For example, someone could create a better DNS, or some other way to discover hostname mappings.

e.g.

  1. change /etc/resolv.conf to 127.0.0.1
  2. run a leveldb backed dns server
  3. provide normal janky dns resolution
  4. provide a private dns space, that used leveldb replication to propagate name changes

There are tons of possibilities, and node seems like the perfect platform to facilitate the madness.

groundwater avatar Mar 03 '14 19:03 groundwater

@groundwater I agree. I thinking giving the user a unix like experience is important, but it doesn't need to be posix compliant in implementation. The low level implementation for runtime can handle that.

PS: it would be interesting to see an eco system of bindings out there that could be consumable by other bindings (skip NODE_MODULE(module, init) and allow consumers to pass in their own v8::Handle<v8::Object> to an init() function)

jwerle avatar Mar 03 '14 19:03 jwerle