When you start an asynchronous task what you are really doing is starting a
backend-process. Think of a backend-process as something taking place in another room of
your house. You're sitting in the den and the new task is working in the basement. What is
it doing down there? Is it still alive? What happened to the last request I asked it to
work on?
Every backend-process needs to address these common multi-tasking issues:
- What if a task hangs in a never-ending loop?
- What if a task abnormally terminates?
- What if a task needs a new asynchronous task itself?
- What if the task create/destroy overhead bogs down the application processing?
- What if a task needs timing?
- What if a task needs canceling?
- What if the System cannot handle any more tasks?
- What is the status of the current request?
- What is the status of a prior request?
- Where is the congestion?
- How to notify someone when an error occurs in a task?
- How to detect and recover from stalls?
- How to tune this multi-tasking environment?
- How can we inquire about the health of the environment?
- How may the multi-tasking environment quiesce and shut down gracefully?
Multi-Tasking has been around for a long time. Developers have been answering these
questions with in-house and proprietary software for decades. The key to handling these
problems is to build a backend process manager.
The way to building a backend-process manager is:
- to separate the threading logic from the application logic,
- to individually control each asynchronous task and
- to build User Interfaces into the environment.
That sounds simple enough. At least until we try it. A mission-critical,
backend-process manager must answer all the common multi-tasking issues, above, and have
the ability to handle:
- components (a request with multiple parts),
- recursion (when nested levels of access are necessary),
- persistence (for shared objects between tasks),
- run-time alteration (to provide a dynamic response to an ever changing
environment.),
- extensions to the base logic (start-up/shutdown hooks and exits),
- logging (of errors and events),
- and, never forget debugging.
Welcome to Tymeac, the backend process
manager.