Monday, January 7, 2019

My consensus snippet

In my consensus snippets, all the consensus snippets are a networked, likely using one of the chat snippets.

Consensus snippetsconstantly agree on what memory of available for reservation.  Thus any request for a shared section of args is immediately granted, locally.  The caller can begin using it, locally,  but the consensus snippet then has to get agreement that that section is no longer available.  The conflicts are resolved by counter proposal, and the caller may have his reserved section moved, implicitly,.    The caller thus does not block on reservation, args list assumed infinite, but will block on commit or send of  args list as in a normal output function.

This system is stable, but linear and mornings will jam up as everyone gets up and running. This method also is a two step, the intuitive approach is to block on the args list request. But if I end up doing it, I am going to experiment, and mess with it a bit.  An alternative is for the consensus snippet to go ahead and reserve space, just in case. Then when its reservation is low, reserve some more.  But this thrashes the reservation table something fierce. The direct approach is to block on request, I guess, maybe that is default.

The complexity arises also when console loop burps, it has to reset its current local argc but leave the reserved heap pointers untouched, except the burping thread which loses reservation.  So console loop generally will have to do thread management, and has to know when a linux command has reserved args, then call the consensus snippet for release on thread failure. Then console loop has to issue a syntax error to whom?"  The controlling syntax engines needs an error call back.  The controlling syntax engine leaves the message in error rectangle, the equivalent of stderr. All of this is within today's everyday technology.

We don't provide the remote procedure call since all calls have one format, all that is necessary is a commit, likely nothing more than a local call to exec command.  Undefined data is expected to be standard linux command form, so the arrival of reserved memory results in a call to exec command, which the consensus snippet can do directly. Just watch reentrancy because consensus snippet is a thread.

No comments: