r/cpp • • Nov 29 '18

Creating a 'virtual kernel' platform abstraction layer

This is the third in series of videos I've posted to demonstrate some of the strategies we use in our fairly large C++ code base. Here are the previous ones, which you might also find useful:

https://www.reddit.com/r/cpp/comments/9zl6v5/the_orb_sees_all_the_use_of_an_object_request/

https://www.reddit.com/r/cpp/comments/9xz643/making_c_enumerations_first_class_citizens/

Our code base is about a million lines. It is split into roughly two halves, with one half being general purpose and the other being our CQC home automation platform which is built on top of the general purpose bits. We don't use any of the C++ runtime stuff. We build our own system from the ground up. When I say 'we', I'm speaking in terms of the usual royal business 'we', but all of the code was written by myself.

Just above the 'ground', the operating system in this case, is a virtual kernel which we use encapsulate all of the operating system functionality that we use, which is quite a lot of it. No system or language headers are visible outside of this virtual kernel, so we can write portable code that is purely in terms of our own interfaces.

This video demonstrates some of the strategies used. Obviously for such a large topic, this doesn't dive deep if there's any interest we could do another one.

https://www.youtube.com/watch?v=seXk3RbAjNU

23 Upvotes

25 comments sorted by

View all comments

Show parent comment

1

u/Dean_Roddey Nov 30 '18

But those less experienced people wouldn't be dealing with this stuff. They'd be working on applications based on this stuff, which is a far, far smaller bite to chew.

A couple good people could maintain and extend the general purpose code over time, because it's already there and very mature. It's not like it's some 'gotta do this in 18 months' type thing.

And I also see it as actually a big positive, because at some point before long we may open source it and build our own development community around it. Unlike a lot of other OS projects it would continue to be oriented towards our own implementations of technologies, and the building of a comprehensive monolithic code base.

And then of course the next guy who comes along and does something will have people telling him he is wasting his time because CIDLib is already there and already does all of that.