yJOBS, system daemon requests

greek, heracles-promachus (leader in battle)

daily use in production

yJOBS is a personal shared library created to standardize command line arguments, the flow of execution for those arguments, and the verbosity of feedback provided for service daemons and related utilities.

this one was necessary. i had too many daemons presenting varying interfaces, more or less security, and variations on similar code. just not a tenable situation. yJOBS is stable, but evolving. i guess like all my code ;)

command line requests are grouped into 7 categories. i currently have 28 possible requests, of which different subsets are allowed/disallowed for any given daemon or utility.

yJOBS also controls feedback verbosity. when a task is important or critical, silent execution can leave me with worries, no matter how much i trust the code. nearly all options have three versions, for example…

  • —verify, silently check quality and security of local file/contents

  • —cverify, same, but give a one-line result confirmation

  • —vverify, same, but provide useful details for debugging

it may not seem like a big deal, but this was a massive gain for me. old daemons became more resilient. new daemons were provided valuable features at little cost.

complex example.

this is polymnia refereshing its database. the —gather option, works through the registered entries (—register) in the application specific world file (world.txt) and updates their data (—update) in the central database. used as —gather, the process happens with zero noise. confirm (—cgather) is the left side and verbose (—vgather) is the right side example. most options have one-line confirm feedback, but —gather is complex. warnings are shown in yellow, fatal events in red. positive confirmation is shown in green.

obviously, confirm and verbose are a first line debugging tool. typically, most issues are file are input related and the application itself is the best tool to explain — it found the error so it certainly can explain it ;) its like a spell or grammar checker. these are user tools.

while not appropriate to every one of my daemons and utilities, many benefit at least from the standardization and rationalization of redundant code. a good example of an exclusion is kharon, my process one, which must be kept light and without many dependencies.

there’s obviously a lot more, but no one needs me to belabor this. review the code or ask questions.

source code is GPL3 licensed, https://github.com/heatherlyrobert/yJOBS

Previous
Previous

regular expressions with artemes-agrotera (prd)

Next
Next

scheduling grammar with ysched