SUMMARY: alfs direction

Gerard Beekmans gerard at linuxfromscratch.org
Fri Nov 25 11:09:04 PST 2005


Jeremy Huntwork wrote:
> 1) The server portion of the client (alfsd?) is written in C and listens 
> on a specific port that we can designate. Encryption or authentication 
> is a more advanced issue that hopefully we can address later.

I agree.

> 2) The client can be written in anything (we want to allow modularity 
> and the ability to develop clients for any setup), but our POC code and 
> the main client written by the ALFS team will be written in C.

Seems like that's the best way to go for now. And like you said, if 
somebody doesn't like it, they can write their own client and server.

> All of this could be done in plain text, or in a very simple XML format 
> that describes commands for the daemon, but the actual LFS execution 
> commands are always in shell script or plain text.

I think that is workable yes. This XML doesn't need to be stored in a 
profile either. It's something the client generates by itself. I could 
see something like this:

Client sends a <start-install-commands> tag.

Server acknowledges that it's ready to receive the commands and anything 
that is now received by the server is stored in some kind of temp file.

Client sends </start-install-commands> tag.

Server now saves the file, makes it executable (simple chmod 755 would 
do the trick) and sends a ready signal to the client.

Client can then initiate the installation by sending some kind of start 
signal.

This could be trimmed too. You're only going to send commands if you 
want them to be executed right away. So after client sends the closing 
tag or some kind of control marker, server saves, makes script mode +x, 
runs it and sends output to client. It may have to first send a marker 
to the client to make sure the client can accept script output to 
display to the user.

Now the real question that comes to my mind:

XML or XML-alike. When I say XML-alike it can look like XML if we want 
but do we need a DTD and all that?

The server could do without libxml and simply do text comparisons. It'll 
be a case or if statement that compares like "if received string == 
"<my-tag"> { jump to routine that does this function }

You get the idea I'm sure.


-- 
Gerard Beekmans

/* If Linux doesn't have the solution, you have the wrong problem */




More information about the alfs-discuss mailing list