[ANN] Work in progress - PCF

[size=8pt]* PCF stands for Peerbox Configuration Framework[/size]

What is PCF?

  • PCF is extensive framework for using, tweaking and maintaining Peerbox.

  • In a way it is API for Peerbox

But why do we need this?

Imagine this as GUI (or Desktop Environment) for GNU/Linux OS. GNU/Linux can naturally work without GUI using CLI interface. This is how Linux is used on servers. However this way of using Linux rejects some users as they see using terminal (CLI) as something that requires special skills and programming talent. That may not be true, but fact remains. If want users to be happy, present it with GUI.

But, PCF is not a GUI as Peerbox will always be headless and will never require monitor/keyboard/mouse to operate it.
PCF will serve underlying OS and wrap it into abstraction layer that will allow creation of Web-app to control Peerbox.
So, it is a GUI, but in browser.

Let me present that visually:

[center][/center]

Flow of information will be something like this (red is downward, green is upward):

USER – WebApp – PCF (DAEMON component) – read firewall rules – DAEMON — WebApp – USER

To sum it up in a sentence:
In WebApp, USER click on “Firewall” tab. This generates request (in JSON) that is sent to PCF on Peerbox. PCF understands this call, and has hardcoded function that will get this information from OS. When PCF reads information about firewall it packs it to JSON and sends it back to WebApp which in turn presents this to USER in lovely way.

** See post bellow for planned/completed DAEMON features **

Beside WebApp PCF will feature CLI interface for configuring Peerbox for people who do not wish to use it via browser.
Backend of this CLI application is that same DEAMON, and they will also communicate over https.

Possibly, if I do not find better solution this CLI app will start when user logs in to new Peerbox installation for first time. This will allow user to configure the OS and load settings from former Peerbox installation.

PCF is being coded in Node.js, this is second iteration of PCF. First one was coded in Python but I’ve moved to Node.js as WebApp programming is far more easier in Node.
It is written in coffee-script, a language that translates to JavaScript. I do this since for me coding in coffee-script is far more easier due to similarity with Python (my native language) and I’m far faster this way.
Some will say that quality of Javascript code that is outputted by coffee-script is unmatched, and this is important to ensure quality of code and avoid unnecessary bugs and possible security issues.

Do mind that this first time I work with Node.js and coffee-script. Development will probably be far slower since I have to learn ahead of my coding. This system works so far.
I will release first source code after basic WebApp/CLI client is complete. Coding of WebApp will probably go even slower since I have no experience at all.

List of planned/completed features of backend (DAEMON), completed are striketrough.

DAEMON component of PCF:

  • Setting up timezone
  • Setting up user login password
  • Controlling ppcoind (Start/stop/restart/status)
  • PPcoind startup arguments (-resync, -reload, -proxy, etc…)
  • Firewall
  • Shutdown/Reboot
  • Yubikey/Google Auth
  • System update
  • Filesystem encryption
  • PPcoind backup (wallet, all of it…) [Almost complete]
  • Filesystem resize (if you have bigger SD card)
  • Peerbox backup (save every setting)

Fantastic idea, as always peerchemist!

Development is paused to resolve this issue with node.js and PAX enabled kernel: https://code.google.com/p/v8/issues/detail?id=3595