News for hackers. Stuff that matters.
Re:Fuchsia OS Introduction by zamalek on Tuesday March 26, 2019 @12:14AM (#19489247)
I really wonder about this kernel IPC hype. I watched a video on React+Redux by Facebook engineers about a week ago, and the reasoning behind creating the things in the first place. Feelings about React+Redux and how they are overused aside:

Redux came first and it happened because the "interaction graph" between various components on the website became virtually impossible to resolve cognitively. The engineers (especially on-boarding engineers) faced troubles understanding how everything worked in concert and, especially, the side-effects of a single change. The nail in the coffin for the engineer was Facebook chat and she was forced to use numbers, instead of lines, to depict interactions because the graph was too dense. Redux forced interaction in one direction, with "back interaction" happening one frame/tick later. Web developers have praised and embraced this architecture.

If you look at the very first image in the article, it moves from a very straightforward application -> VFS -> ext2 -> driver -> disk graph to a [potential] rats nest. It runs counter to the hard lessons that Facebook have learned with complex distributed systems.

Is this why nothing has really come from Mach/Hurd? Up until putting 1 and 1 together a few minutes ago, micro-kernels sounded so clean and elegant. They now seem unwieldy. Perhaps there is exists another layer of architecture that can tame the dependency/interaction graph; isolation really does sound like a good idea, but we need a better way of doing it.

Re:Fuchsia OS Introduction by bluejekyll on Tuesday March 26, 2019 @12:30AM (#19489311)
> Is this why nothing has really come from Mach/Hurd?

Mach 3.0 was the kernel used in NeXT and the original Mac OS X release. It was quite a bit later replaced with a rewritten kernel XNU, that’s basically a hybrid. The reason as I understand it, message passing in the kernel is expensive when crossing user space so often.

I wouldn’t call that nothing coming of Mach, it did really well!

Also, I’d say that micro-kernels are closer to the paradigm of react/redux (redux the message bus, react the user space servers) than to a monolith design like Linux.

Re:Fuchsia OS Introduction by zamalek on Tuesday March 26, 2019 @01:12AM (#19489457)
You're completely right, I shouldn't have mentioned Mach.
Re:Fuchsia OS Introduction by lukeh on Tuesday March 26, 2019 @04:08AM (#19489994)
They all used hybrid kernels. Mach 2.5 in NEXTSTEP and OS X Server 1.0, Mk (3.0) in macOS.
Re:Fuchsia OS Introduction by stdcli on Tuesday March 26, 2019 @02:23AM (#19489662)
I think instead of comparing this to a front end web framework, you should consider how Fuschia is designed using capabilities (similar to the concept of a system call, and how a system call handler works) around a fundamental restructuring of a kernel: originally named Magenta, now called Zircon, to fundamentally optimize for the evolving modular architecture of advanced mobile computing. Understanding how the OS design flows from the original kernel design is key to understanding Fuschia OS as a whole. This article from two years ago does a pretty job of justifying its' existence (in this article, Zicron is referred to as Magenta as it had not been renamed yet): https://lwn.net/Articles/718267/ but I would actually love to hear feedback/constructive criticism of the kernel architecture itself.

I remember where I was and what I was supposed to be doing when I was instead reading the HN article that posted this lwn article (above) about Magenta 2 yrs ago, after finding Eric Love's Guide to Linux Kernel Development, and found this a fascinating read to compare to, given my learnings in kernel dev at the time.

Re:Fuchsia OS Introduction by elliotec on Tuesday March 26, 2019 @12:49AM (#19489379)
Redux's initial release was 2 years after React...

https://en.wikipedia.org/wiki/Redux_(JavaScript_library)

https://en.wikipedia.org/wiki/React_(JavaScript_library)

Perhaps you're talking about the Flux architecture? Not the same thing. Care to share the video you mentioned?

Re:Fuchsia OS Introduction by zamalek on Tuesday March 26, 2019 @01:09AM (#19489448)
You're right, it was Flux. I'll have to dig around for it. Edit: https://www.youtube.com/watch?v=nYkdrAPrdcw
Re:Fuchsia OS Introduction by minism on Tuesday March 26, 2019 @02:36AM (#19489693)
Oh wow, I remember watching that, it's crazy to revisit that talk after so many years.

Redux and Flow are somehow branded as alternatives to MVC, when they are precisely MVC (store=model, dispatcher/reducer=controller, etc). It seems that Facebook (and many others) implemented MVC very poorly and pretended to abandon it instead of admitting they just did it better on the next attempt.

If anything, the success of redux simply reinforces the fact that MVC is a very useful pattern for UI applications. But, it bothers me that newer developers might be persuaded by the anti-MVC branding.

Re:Fuchsia OS Introduction by underwater on Tuesday March 26, 2019 @04:51AM (#19490148)
Flux dispatcher are not really like controllers. They don't allow for any business logic. The stores are like combined controller/models, though.

A key design feature of Flux is that many unrelated (or related) stores can respond an event, and that there is a defined lifecycle for handling events. I don't believe those really map to MVC.

Re:Fuchsia OS Introduction by mpweiher on Tuesday March 26, 2019 @03:48AM (#19489921)
So glad I am not the only one!

What I found interesting was that the original developer(s) of react.js seems a lot more up-front about this:

https://omny.fm/shows/future-of-coding/1-1-how-reactjs-was-c...

Of course, the whole idea of, in-theory, re-creating the UI at every refresh cycle is not part of MVC, so that is new and interesting. Considering all the work that has to be done to undo that abstraction (as it doesn't really match reality), I am not sure how useful it actually is.

https://blog.metaobject.com/2018/12/uis-are-not-pure-functio...

Re:Fuchsia OS Introduction by elliotec on Tuesday March 26, 2019 @02:03AM (#19489586)
Thanks for the follow up!
Re:Fuchsia OS Introduction by fluffycat on Tuesday March 26, 2019 @12:42PM (#19493473)
I guess Google engineers has some experience with those hard earned lessons before Facebook even existed. The diagram you mentioned is very typical of microkernels and subject of research for decades.
Re:Fuchsia OS Introduction by snvzz on Tuesday March 26, 2019 @01:03AM (#19489423)
>Is this why nothing has really come from Mach/Hurd?

Because Mach. First generation microkernel. Slow. The microkernel world has moved way past that, whereas Hurd has stayed behind still using Mach. [0]

[0] https://blog.darknedgy.net/technology/2016/01/01/0/

Re:Fuchsia OS Introduction by TomMarius on Tuesday March 26, 2019 @02:48AM (#19489734)
Could you please name the most significant differences?
Re:Fuchsia OS Introduction by snvzz on Tuesday March 26, 2019 @02:52AM (#19489745)
Mach is first generation, which should be seen as proof of concept (microkernel being the concept), and was slow.

The second generation was spawned by Liedtke's L4, which basically attacks the performance problem of the first generation, making it negligible.

The third generation makes capabilities a first class citizen, core to the design. Its main representative is seL4.

As an added note, multiserver is a better fit for SMP than locks and the lock contention they imply.

Re:Fuchsia OS Introduction by TomMarius on Tuesday March 26, 2019 @03:31AM (#19489874)
Thank you! How did they tackle the performance problems?
Re:Fuchsia OS Introduction by snvzz on Tuesday March 26, 2019 @10:39AM (#19492248)
The paper "From L3 to seL4: What Have We Learnt in 20 Years of L4 Microkernels?"[0] covers most of this from a 20 years after perspective.

[0] http://sigops.org/s/conferences/sosp/2013/papers/p133-elphin...

Re:Fuchsia OS Introduction by TickleSteve on Tuesday March 26, 2019 @09:34AM (#19491603)
Mach wasn't the first generation, there were the Aleph and Accent kernels that were predecessors to Mach.
Re:Fuchsia OS Introduction by snvzz on Tuesday March 26, 2019 @09:54AM (#19491797)
Mach is first generation. It isn't THE first generation. Just one microkernel (Mach v3 that is) which is still part of that generation.
Re:Fuchsia OS Introduction by sagartewari01 on Tuesday March 26, 2019 @05:09AM (#19490217)
S
Re:Fuchsia OS Introduction by snvzz on Tuesday March 26, 2019 @06:38AM (#19490582)
Can you please elaborate?
Re:Fuchsia OS Introduction by m33k44 on Tuesday March 26, 2019 @02:17AM (#19489638)
Ask the Symbian guys and gals :)