juliangruber / anarchyos

AnarchyOS
MIT License
74 stars 1 forks source link

the stack #6

Open juliangruber opened 10 years ago

juliangruber commented 10 years ago

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

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.

heapwolf commented 10 years ago

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

mmalecki commented 10 years ago

Why not use some existing kernel? Options are:

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.

heapwolf commented 10 years ago

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

mmalecki commented 10 years ago

Also see CoreOS.

heapwolf commented 10 years ago

+1 for SmartOS because DTrace and USDTs.

juliangruber commented 10 years ago

yeah def. not write our own kernel. Reuse!

juliangruber commented 10 years ago

@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)

heapwolf commented 10 years ago

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.

dominictarr commented 10 years ago

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

miketheprogrammer commented 10 years ago

+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.

juliangruber commented 10 years ago

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.

dominictarr commented 10 years ago

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)

groundwater commented 10 years ago

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).

heapwolf commented 10 years ago

FreeBSD now has good support for dtrace thanks to @indutny

On Monday, March 3, 2014, Jacob Groundwater notifications@github.com 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

miketheprogrammer commented 10 years ago

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

jwerle commented 10 years ago

@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 ! :]

groundwater commented 10 years ago

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.

jwerle commented 10 years ago

@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)