wiki:Venux

Version 11 (modified by Thanatermesis, 7 months ago) ( diff )

corrected grammar with ai

/elive/images/tux-lego.png

A Venux Operating System is something very simple to create and without much effort because it will be based on its own evolution just like things in nature. I wrote some concepts of design on this page that I think are the best way to create a functional VOS, evolutive and non-destructive. If you want to read the functional/real example, go to the History Example section.

This document describes how we can actually build a Venux system. Just don't be impatient, start with something basic and let the computational evolution do the rest.

Core

First of all, you need an operating system to install the software (Venux is only a software, it requires an operating system to work in and with). We have it: GNU/Linux

Modularity

When I discovered modularity in the software, I then understood that it is the real key to making good software. The modularity principles should be applied always and every time we write big software. All my ideas are based on modularity. Do not forget that.

The idea of modularity is basically to connect things between themselves. Why is this good? Imagine a car in a single piece. If something breaks or needs to be changed, you need to trash the entire car. But by using modularity (pieces), you can change only the required piece. You can create a better piece, but you need to maintain the compatibility to plug it with the other ones. And if you need to strictly change the method of how it is plugged, then you need to change the piece where it is plugged in too. With modular software, the same thing can happen.

Pieces

We can make all the pieces of the puzzle of Venux in, for example, a big C application. C is good, stable, portable, and is the best-optimized language, but we don't need optimization yet. The system is very new, and to write pieces in C is something pretty time-consuming compared to writing them in other languages.

So, the pieces need to be simply applications, different applications. Every application (piece) does a different type of task. For example, one application retrieves the data, another one adds the data, another parses the data, another does special calculations, etc. Every application returns data as a result of what was asked.

Plug in Pieces

Like in a car, to plug piece A into piece B, it needs to be compatible. For that, every application needs to have a header data of how it works (data asked, data returned, options, etc.) and a version number. Think about it like individual programs that understand if they are compatible with each other.

Example: Plug in Pieces

Piece B knows the version number of piece C before it connects to it. If the version number of piece C is higher than that of B, then piece B checks if it is available for an update. If there's an update, then update it and ask its parent if it has an update available too. When there are no updates available, piece B checks if the specs of piece C (header of how it works -> data management) are compatible with it. If not, then it uses the old version of piece C that is still available on the system.

Version Numbers

The version number is simply the actual date (day + time + microseconds). By doing this, we ensure that every time a bigger number means a newer version, never the inverse.

Updates

An update is a package. They are done automatically and very fast when required. Old updates are never deleted; they are stored in a historical archive that can be accessed by Venux if needed. Historical versions will only be deleted if they have been inactive for a minimum number of years.

Packages Technology

Packages need to use the NIX packaging technology. This is a package system that includes the features of both static and shared libraries, so anything that is compiled and packaged with NIX will NEVER be deprecated. It will always work even if a thousand years pass, and you have multiple versions of a package (application) running in the same system. You can use any of these versions at the same time. Never can a conflict between versions or libraries happen with this technology.

Evolution

Evolution is very simple: Somebody has a better idea for a piece—more efficient, faster, etc.—then writes it and presents the proposal/result to the Venux Operating System. Venux, like all other things on the Venus world, evaluates the proposal. It does a thousand different calculations of the good things and the bad things to know if it is "good" or "bad" compared with the actual system, the specs, the resources required, and maybe even the votes from the humans about if they like it or not. If it is accepted, then the operating system includes a new version that will be updated automatically by the system itself. The rest of the pieces will connect to this one if it is compatible, and there is no need to wait for an update too. But everything continues working thanks to the packaging technology, simple as evolution.

Communication

The pieces need to use a standard method of communication. The communication is also just another piece of the modularity. When the communication system evolves to something better, its version changes and its specification changes too if needed. Then all the pieces that use communication (almost all of the Venux system) know that they need to be updated before they can use the new communication protocol.

As explained in the Packages Technology section, the Venux system can work with both communication protocols at the same time while there are any pieces that still need to use the old protocol and have not been updated yet.

Interface

The interface is just another piece. It is a layer between the computer and the human to communicate in the best way possible. This piece is connected with the pieces that communicate with the data by the communication and also by using the communication it is shown to the human.

The Evolution rule will use the best interface too. For example, first it will exist in a command-line interface, then somebody will propose a better one graphically. The evolution of the system will use the graphical one after the required pieces are connected to the new one. Then later, an interface that is easier to manage or with more possibilities appears, same process... etc.

History Example

First version of the Venux system: there are 3 bash scripts that were written by somebody in less than a day. They are:

  • data-get
  • interface
  • data-add

They are very basic and work in a very simple way. Running the interface, you will have 2 options: to get data and to add data. For example, we add the data gold, then we add its specs (composition, category, atomic weight, heat fusion, etc.), and we also add silver. Then later we want to know the specs of the gold and we use data-get. It works, very simple and functional.

Later, somebody adds a new piece that gets all the data stored on Wikipedia, parsing the HTML pages and getting the values of every element of this world.

Later, somebody adds a new piece that calculates the impact of every piece with nature.

With this idea, somebody creates a piece of choices calculation. For example, we need the best material to use in the sea. The Venux system will calculate the best choice, an abundant material for the actual needs. It also does calculations of future probability needs that are considered too. It checks the resistance of the material with the salted sea, the impact on nature, etc. So this piece shows the best choice possible, a lot better, faster, and more efficient than a human with studies.

Later, we see that the system becomes very slow by retrieving data because we have a lot of data and we have made data-get in a very fast way. We just wanted it working. Then somebody creates a better way to store data, compressed data, sorted alphabetically, etc. At the same time, someday somebody will present again a new version of data-get with a lot more optimized algorithms for faster searches. Then again, a future day, somebody will present a better algorithm that uses probability and usage statistics to retrieve the data even faster, etc.

Somebody creates a piece to back up all the data, just like the pieces and everything.

The interface changes to something better. We can now use tags and other special features. But for that, we need to update also data-get and data-add to use tags too. The interface is presented and accepted, but until there are data-add and data-get compatible with the new version of the interface using tags, it will not be used. Somedays later, somebody finds that the tags are added to the new elements but not to the old elements and writes a new version of interface that requests to add tags when the element doesn't have any yet. This version of the interface is updated but has not changed its compatibility, so it is directly used by Venux.

The data is stored in XML, which is slow to parse. Then somebody writes a piece that converts all the XML data to something more binary, faster to search by data-get. Someone also writes a feature in data-get to be compatible with the new structure of the data, and some days later, writes another piece that manages the XML as the original ones, updating the binary versions when the XML is updated.

Some time later, it is found that the binary form can't manage some special features of the XML version. We can still go back to the XML version while the new version of the binary form is being rewritten.

Main Feature Concepts

  • Filesystem: BTRFS or an

equivalent filesystem with a lot of special features like snapshots, subvolumes, object-level mirroring and striping, checksums (integrity) of data, incremental backup, fs mirroring, etc.

  • Development: Use GIT because it is a lot more advanced than the other ones as a distributed version control system.
  • Database: We need, in the start, a good way to manage the data. I recommend using just plain text files since it is the easiest to manage, hack, and convert. We can migrate it to databases or other things in the future when required.
  • Languages: Since everything is modular at the application level, we can use any kind of language. Sometimes we need optimization (C) and sometimes we need to code it quickly (Python). The evolution will do the rest.

EXTRA

When creating the Venux system, we need to remember the rules of the Art of Unix Programming. Don't take it as a joke. These rules are full of wisdom and essential for a correctly made Venux system. If you like them, the full book is a good read too.

Note: See TracWiki for help on using the wiki.