Die Präsentation wird geladen. Bitte warten

Die Präsentation wird geladen. Bitte warten

The Elektra Initiative Markus Raab Markus Raab Linux in ein wirklich voll integriertes System verwandeln.

Ähnliche Präsentationen


Präsentation zum Thema: "The Elektra Initiative Markus Raab Markus Raab Linux in ein wirklich voll integriertes System verwandeln."—  Präsentation transkript:

1 http://www.libelektra.org The Elektra Initiative Markus Raab Markus Raab Linux in ein wirklich voll integriertes System verwandeln.

2 http://www.libelektra.org Zukunft und Gegenwart Wohin geht der Desktop? Wohin geht das System? Ist der Desktop unabhängig vom darunterliegenden System?

3 http://www.libelektra.org Aktuelles Panorama Java, UNIX Commercial ✗ Kein einheitlicher Namensraum ✗ Keine API um auf Konfiguration zuzugreifen ✗ Keine Integration, Konfiguration ist die Seele der Software Wir haben einen 1 + 1 = 2 Status

4 http://www.libelektra.org Elektrifizierung “proprietäre” Konfiguration “proprietäre” Konfiguration Applikation ✗ Konfiguration ist stark abhängig von der Applikation ✗ Konfiguration wird nicht mit anderer Software geteilt Offene Konfiguration Offene Konfiguration ✔ Konfiguration repräsentiert durch Standards ✔ Verschiedene Programme können Konfigurationen teilen App AApp BApp C Elektrifizierung

5 http://www.libelektra.org Elektrifiziertes Panorama Java, UNIX Commercial ✔ Einzelner systemweiter Namensraum ✔ Einfache API ✔ Integration Wir suchen nach einem 1 x 1 = 1 Status Elektra

6 http://www.libelektra.org Konfigurations Utopie Cross and Non-Cross Platform Software Java, Apache, Samba, KDE, /sbin/init, inittools FileSystem SingleFile WinReg FileSystem SingleFile FileSystem SingleFile OpenDir FileSystem SingleFile Backends Elektra API & Namespace :: Abstraction Layer Bindings

7 http://www.libelektra.org Fokus bei Elektra Integration 1.Definition von key/value Paaren, Hierachie, Namensraum und Semantik. 2.API Implementierung für Zugriff auf key/value pair Namensraum. 3.Produzieren von guten Patches für Software wie X.org, Samba, KDE's KConfig XT und Gnome's GConf.

8 http://www.libelektra.org Key Database Semantik Umfassende Hierachie von key/value pairs designen.

9 http://www.libelektra.org Linux/UNIX key/value DB Schwierig Software so zu paketieren, dass es mit anderer Software zusammenspielt. Eigennütziges Konfigurationsformat! Wo liegt die Datei? Section "InputDevice" Identifier "Mouse0" Driver "mouse" Option "Protocol" "IMPS/2" Option "Device" "/dev/input/mice" Option "ZAxisMapping" "4 5" Option "Emulate3Buttons" "yes" EndSection In Fedora 2: /etc/X11/xorg.conf Debian Sarge: /etc/X11/XFree86.conf Sonstige: Niemand weiß es :-)

10 http://www.libelektra.org Wie wäre es so? Section "InputDevice" Identifier "Mouse0" Driver "mouse" Option "Protocol" "IMPS/2" Option "Device" "/dev/input/mice" Option "ZAxisMapping" "4 5" Option "Emulate3Buttons" "yes" EndSection ✗ Benötigt menschliche Augen und Gehirn ✗ Benötigt ein Manual ✗... und vi ✔ Jedes Bit an Information ist leicht zugänglich. ✔ Verständlich und editierbar von jedem Programm (Ohne Konfigurationsparser schreiben zu müssen, sondern nur max. binding) ✔ Fertig für GUIs und CLIs.

11 http://www.libelektra.org Elektra Design Grundsätze 1.Unix look'n'feel und Standards für Namespaces 2.Überall und immer zugänglich, sogar für /sbin/init. Absolut keine Abhängigkeiten auf Librarys, Netzwerk Dienste oder Sprachkodierungen. 3.C mit POSIX, native unter Linux, BSD, Unix – sonst portierbar 4.Hat kein Wissen über die Semantik. 5.Kann bis zu Dateisystemsicherheit skaliert werden. 6.Daemon und Binäreformate nur wenn erwünscht. 7.Freie Aufbewahrung.

12 http://www.libelektra.org Key Hierachie key/value pairs für System key/value pairs für aktuellen User Avi's persönliche keys Luciana's persönliche keys Valeria's persönliche keys Die system/* Hierachie ist gespeichert unter /etc/kdb/ Die user:$USER/* Hierachie unter ~$USER/.kdb/ Die user/* Hierachie ist eine Abkürzung für aktuellen User.

13 http://www.libelektra.org Key Hierachie :: system/... key/value pairs für System Gleichwertig zu /etc/fstab Gleichwertig zu /etc/group Statische gefundene Hardware Gleichwertig zu /etc/inittab Netzwerk Konfiguration Applikationsspezifisches Applikation 1 Applikation 2 Gleichwertig zu /etc/passwd

14 http://www.libelektra.org Key Hierachie :: user/... key/value pairs für aktuellen User User's environment (statt ~/.bashrc) User's aliases Erste env var Zweite env var $PATH setzen Drittes environment key/value pairs für Applikationen Temporäre key/value pairs

15 http://www.libelektra.org Key Namen Dieser kleiner Punkt macht die ganze Hierachie inaktiv.

16 http://www.libelektra.org Key Eigenschaften ➢ Name ➢ Value ➢ Value type ➢ User domain or owner ➢ Kommentar ➢ System UID & GID ➢ Access Permissions ➢ Active or inactive key ➢ Last change time ➢ Last access time system/users/root/shadowPassword = $1$yM93nU user:valeria/env/env2/PATH = $PATH:/usr/sbin

17 http://www.libelektra.org Elektra Library Architektur Integrieren von Software zu einer Plattform.

18 http://www.libelektra.org Library Generic Linkage Application /lib/libelektra.s o libelektra- {backend}.so Pure dynamic (in)dependencyPure dynamic (in)dependency ✔ Nicht sichbar mit ldd ✔ Über Environment beeinflussbar $KDB_BACKEND ✔ Je nach Pfad variabel (neues Feature) Dynamic single dependencyDynamic single dependency ✔ Sichtbar mit ldd ✔ libelektra.so versteckt Backends Application process space

19 http://www.libelektra.org Lokale Backends Application /lib/libelektra.s o libelektra-filesys.so libelektra- berkeleydb.so libelektra-fstab.so libelektra-filesys.so libelektra- berkeleydb.so libelektra-fstab.so ➔ filesys backend Bietet high-security Möglichkeiten mit ACLs und per key owner/mod. Sicherheit durch Kernel gewährleistet berkeleydb backend Sehr kompakt und schnell Weniger Sicherheit (nur user/system) ini backend Ähnlicher Zustand wie jetzt Sicherheit per config Lesbar und editierbar Possible other backends xorg.conf passwd/group smb.conf ldap und viele mehr... Application process space

20 http://www.libelektra.org Dämon Architektur Application /lib/libelektra.s o libelektra-daemon.so Server Protokol über unix domain sockets ➔ Client-Server Architecture Kommunikation zum Server über libelektra-daemon.so Der Server selber verwendet auch libelektra.so um key/value zu speichern. single point of failure Application's space Server's

21 http://www.libelektra.org GConf ist fett und dependent... bash$ ldd /usr/lib/libgconf-2.so.4 libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 libORBit-2.so.0 => /usr/lib/libORBit-2.so.0 libm.so.6 => /lib/tls/libm.so.6 libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 libdl.so.2 => /lib/libdl.so.2 libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 libpthread.so.0 => /lib/tls/libpthread.so.0 libc.so.6 => /lib/tls/libc.so.6 libpopt.so.0 => /usr/lib/libpopt.so.0 /lib/ld-linux.so.2

22 http://www.libelektra.org Elektra ist leicht... bash$ ldd /lib/libelektra.so libc.so.6 => /lib/tls/libc.so.6 /lib/ld-linux.so.2 => /lib/ld-linux.so.2 ✔ Verwendbar bei Restriktionen (kein Netzwerk, kein /usr), sogar bei /sbin/init ✔ Auch ohne Dämon verwendbar No single point of failure Kein Kommunikationsprotokol notwendig Keine Sicherheitslöcher möglich Sicherheit über OS Einfach und sauber

23 http://www.libelektra.org Key DB administrieren Skripte, GUIs, CLIs, XML und alles für einfache Administration.

24 http://www.libelektra.org The kdb Command: Perfekt für Skripte bash$ kdb get system/filesystems/boot/mpoint bash# kdb set system/sw/xorg/Screen/Display/Modes 1280x1024 bash$ kdb export system/sw/myapp > myapp.conf.xml bash# kdb import myapp.conf.xml bash$ kdb edit -R user/sw/myapp bash$ kdb ls -Rv system/sw/myapp bash$ kdb monitor system/init/id/runlevel bash$ kdb rm user/env/alias/vnc bash$ kdb ln system/sw/myapp/key1 user/sw/myapp/key1 Manual + kdb help vorhanden!

25 http://www.libelektra.org XML Import and Export bash$ kdb export user/env/alias > file.xml bash$ kdb import file.xml <keyset xmlns="http://www.libelektra.org" xsi:schemaLocation="http://www.libelektra.org elektra.xsd" parent="user/env/alias"> <key basename="ls" type="string" uid="aviram" gid="aviram" mode="0664" value="ls -Fh --color=auto" Make 'ls' command more cleaver <key basename="vnc" type="string" uid="aviram" gid="aviram" mode="0664"> vncserver -geometry 900x650 Instant creation of a VNC server

26 http://www.libelektra.org Editieren von key/value pairs Beliebiger Editor um XML Datei zu editieren Neu hinzugefügte werden, kommen hinzu. Veränderte werden übertragen. Auch löschen funktioniert.

27 http://www.libelektra.org kdbedit: The Elektra GUI Edit Tool auch für Beginner Hierachische Struktur Alle Funktionen Exportieren und Importieren Wenn alles versagt hast du hoffentlich das richtige Backend gewählt.

28 http://www.libelektra.org Desktop Applikationen Elektra als Startpunkt für besser integriertes Arbeiten.

29 http://www.libelektra.org Aktuelles Konfigurationspanorama Lesen und Schreiben Kein Zugang

30 http://www.libelektra.org Integrated Elektrified Panorama Möglichkeiten die sich ergeben: Web Proxy nur einmal für alle Browser Wichtige Shortcuts gelten für alle Applikationen (ermöglicht individuelles arbeiten!) Alle Werte nur einige API Aufrufe weit entfernt.

31 http://www.libelektra.org Die API Was ist vorhanden um auf Elektra key/value pairs zuzugreifen?

32 http://www.libelektra.org Fertig um jetzt benutzt zu werden. ➢ Vorhanden ✔ C/C++ ✔ Shell ✔ XML ✔ Ruby ✔ Java ➢ Bald da... ✔ Python ✔ Scheme ✔ (any contribution for a language binding ?)

33 http://www.libelektra.org Nur 3 Klassen KeyDB KeyKeySet Classes

34 http://www.libelektra.org C API Methods ksNew() ksDel() ksInsertKey() ksInsertKeys() ksAppendKey() ksAppendKeys() ksToStream() ksFromXML() ksCompare() ksNext() ksRewind() ksLookupByName() ksLookupByValue() ksLookupRE() keyNew() keyDel() keyDup() keyIsSystem() keyIsUser() keyIsDir() keyIsLink() keyToStream() keyGetType() keySetType() keyGetName() keySetName() keyGetUID() keySetUID() keyGetGID() keySetGID() keyGetAccess() keySetAccess() keyGetOwner() keySetOwner() keyGetCommentSize() keyGetComment() keySetComment() keyGetDataSize() keyGetString() keyGetBinary() keySetBinary() keyGetLink() keySetLink() keyGetMTime() keyGetATime() keyGetCTime() kdbOpen() kdbClose() kdbStatKey() kdbGetKey() kdbGetChildKeys() kdbSetKey() kdbSetKeys() kdbGetRootKeys() kdbMonitorKey() kdbMonitorKeys()

35 http://www.libelektra.org The API is Fully Documented !! http://www.libelektra.org/elektra-api/ ✔ API doc in Doxygen ✔ API man pages ✔ Viele Code Beispiele ✔ Programing Tutorial

36 http://www.libelektra.org Current Ecosystem ➢ kdbedit GUI tool, um Key database zu editieren ➢ /sbin/init patch, statt /etc/inittab ➢ X.org patch, statt /etc/X11/xorg.conf ➢ Kconfig (kde4) and GConf backend (WIP) ➢ Einige Programme wie z.b. Samba ➢ NSSwitch module User Datenbank und Authentifizierung ➢ GLibC patches fstab, resolver, etc ➢ Language bindings

37 http://www.libelektra.org Demo

38 http://www.libelektra.org The Elektra Initiative needs YOU ! Rede darüber Paketiere es, portiere es Neue Programme könnten es verwenden Verwende es in eigener Software Es ist frei. Es ist für dich.

39 http://www.libelektra.org Ende Danke fürs zuhören

40 http://www.libelektra.org Backup Charts...

41 http://www.libelektra.org Thank You ➢ Elektra Initiative community Multiple storage backends Maintaining Subversion repository, etc Patches, usefull software, language bindings, etc Works on XML, kickoff for the Doxygen documentation

42 http://www.libelektra.org Elektra Initiative Avi Alkalay Avi Alkalay Linux, Open Standards Consultant Turning Linux into a Trully Integrated Operating Environment

43 http://www.libelektra.org Events About (pt_BR) GNU/Linux, BSD e outros Unix atuais são uma soma de componentes intependentes coletados num bazar. Cada um já tem um sistema singular de configuração que não se integra com nenhum outro. A Iniciativa Elektra tenta integrar as partes de software através de uma infraestrutura comum de configuração, representada por uma árvore hierárquica de chaves e valores (key/value pairs). Tenta transformar um sistema "1+1=2" em um "1*1=1". Similar ao GConf, só que mais seguro, mais rápido e para todo o sistema. 2 nd option Hoje cada componente do SO tem um arquivo de configuração diferente. Elektra é uma iniciativa para unificar e simplificar o zoológico de formatos de configurações de software, propondo uma árvore de chaves e valores universal, padronizada e portável, e uma bilioteca multiplataforma para seu acesso.

44 http://www.libelektra.org Requirements for the Elektra Project ✔ Task force to build an integration ecosystem ✔ Universal key-value pair namespace and API to store base system and user configuration atoms ✔ Cross Platform ✔ No dependencies, Unicode ready, secure, lightweight, POSIX compliant (highly portable) ✔ Available anywhere, anytime, even to early boot stage programs like /sbin/init ✔ Manageable by simple system tools like vi, cp, grep, etc. Plain text storage

45 http://www.libelektra.org What Elektra is Not ✗ NOT Webmin, Linuxconf or YaST-like software ✗ NOT client-server software ✗ NOT an OS service that can become unavailable ✗ Does NOT access SQL databases ✗ NOT an alternative to LDAP or NIS

46 http://www.libelektra.org ➢ KeyDB class ✔ Retrieve and commit Keys and KeySets, recursively or not ✔ Retrieve and commit individual Keys value, by absolute name or relative to parent ✔ Monitor and notify changes in Keys and KeySets ✔ Create and delete regular, folder or symbolic link Keys Things you can do with the Classes

47 http://www.libelektra.org ➢ Key class ✔ Get and Set key properties like name, root and base name, value, type, permissions, changed time, description, etc ✔ Compare all properties with other keys ✔ Test if changed, if is a user/ or system/ key, etc ✔ Flag it and test if key has a flag ✔ Export to XML ➢ KeySet class ✔ Linked list of Key objects ✔ Insert and append entire KeySets or Keys ✔ Work with its internal cursor ✔ Compare entire KeySets ✔ Export to XML Classes continued...

48 http://www.libelektra.org KDE, QT and Elektra OS (Linux/BSD/Windows) Elektra API QT (class QConfig) KDE (class KConfig) KDE App QT Application (cross platform)


Herunterladen ppt "The Elektra Initiative Markus Raab Markus Raab Linux in ein wirklich voll integriertes System verwandeln."

Ähnliche Präsentationen


Google-Anzeigen