Monday, December 24, 2018

Using args

I often map a push pop stack onto it, not problem.  Default uses args to create a list of tokens, which it must followed with their interpretable format.  Xchars will use args to queue up messages, then call the appropriate call back to flush.  Easy to do, Xchars is a loadable, has access to the console loop look up table.  Threads are a not brainer, as long as groups of threads can agree when a portion of args is locked.

Args and Argc are the only arguments in every call across the console loop. It is the only place for interference, and it is a linear countable array, easy to protect in a consensus algorithm, even across the enterprise. One could put the entire corporate capital in a linear array, protected, but easily addressed by qualified parties.  Each word points to a string, a bit map, a valid crypto signed contract, a balance sheet, current cash flow.  Everything in a linear addressable array, thread proof.

In Xchars here is my plot.  The client opens a screen and requests call back.  Th client may refeence the command string in one argument, or use the default callback.  Xchars will reserve that spot in args list by doing this:

*argc += MESSAGESIZE;
return(CONTINUE);

Continue is an args reservation word, Default uses it to signal to ExecCommand not to reset Argc.  Args list is presumed to be infinite, an loadable may reserve part of it, as long as they are part of a continuing sequence. Both Default and Xchars may hit the continue button, and both need to exit the continue state, eventually.  None of console internal command call continue, they block and do the task, returning SUCCESS, causing ExecCommand to reset the 'program counter'.

But this is all local, within the loadable set. It relies on a single point of control, the console loop.  Multiple console loop interacting on the network require another loadable, the args consensus loadable.  The consensus loadable is a generic consensus algorithm for console loop, works inmost applications that multi thread across the corporation.  Console loops use it to protects args.

Where is the loadable consensus algorithm? In a snippet somewhere, I have to go find it when the time comes.

No comments: