I am building a chemistry application with django that focuses on reactions. It bonds an atom to an existing molecule. The reaction event triggers a bunch of (a) validations to make sure the feasibility of the molecule checks out (b) subsequent events as the molecule
Nested Functions:
So I could have my logic layer just keep feeding Python functions into other Python functions, but my fear is that this will become a tangled mess quickly. I also want to have a record of the steps with success/fail and other basic stats, so one hanging process is probably not the best.
PubSub:
So I could have multiple functions that subscribe/ listen for a reaction and then run/ don't run based on criteria. Using something like django-redis-pubsub.
Workflows:
Enter workflows. I suppose I could structure the whole reaction process as a giant workflow which would have better transaction atomicity? Should I combine this approach with a pubsub?
rule NAME: input: "path/to/inputfile", "path/to/other/inputfile" output: "path/to/outputfile", "path/to/another/outputfile" script: "path/to/script.py"