The design criteria for the queue alert module mentioned in the previous post include :
Support for retries by the queue processor:
The design of a queue alert module must consider the retries by the queue
processor for the same message. All exception paths including dead letter
queues should be considered for the same treatment.
Non-invasive: When possible,
we should consider a non-invasive approach that doesn’t require instrumentation
of the queues. In other words, it can work for any version of the queues and
doesn’t affect the queue processing. It could work by sniffing the data changes
or the logs.
Polling: Any polling
approach must be robust and rely on relieving high CPU usages during its
processing.
Support for transactional as well
as non-transactional messages: The alerts module must work for both kinds
of messages so that the user can specify the criteria and not be limited to
only a set of messages. Concurrent processing of both messages must be
supported.
Support for distributed
transactions: When
transactions involve messages across queues, this alert module should enable
evaluating those messages as part of the transaction or at least log the
transaction and the actions taken with the transactions so that the final state
can be determined by the alerts module.
Support for clusters: The queues may not all be local to a
machine and could be distributed on different nodes in a cluster or they may
all be in a failover cluster. Alert module should target the messages and the queues
and even the machines.
Scoping of alerts: Alerts need not be registered at the
message level. They could be registered at the queue level or at the machine
level. Whatever the hierarchy chosen would take care of all the alerts at the
inner scope by the outer scope. This means that the CRUD on the alerts at a
queue scope automatically performs the same at the message scope.
Changes to the rules or registration
of alerts: Alerts registered
with the alerts module will not take effect until the system reconfigures. This
enables the changes to the alerts to be picked up for processing by the module
and gives time for setup and cleanup operations by the module.
Deployment: The alerts module should come in a
standalone service or executable so that it can be an add-on to existing queue
processing. The module itself could be deployable by copying or via an
installer.
Automatic
administration of rules, actions, messages and queues could be performed where
possible.
The use of message format: When interacting with the queues to read
the messages, the alerts module will evaluate the fields of the messages
against the criteria specified in the rules by the user. The message format
should not be opaque and as in the case of MSMQ should expose known fields for
evaluation against the rules.
Control of concurrency: The alerts module could make the
invocation of actions registered with the rules as concurrent so that the
evaluation of an action for a message does not block other.
Full-text or key-value search
over message body: The
expressions to search over the text of the messages could be resource intensive
and optionally enabled. Rules to perform such search could be outside the
alerts mechanism and done with the help of an indexer. As such this may not be
in scope for the alerts module.
Text messages versus binary
messages: The alerts module
should support both formats. The module should rely on the fields versus the
contents. Subsequent processing of say JSON vs. XML text could be offloaded to
other systems.
Asynchronous communication
mechanism: This could be
enabled between producers and consumers so that they don’t block each other.
Performance: Volumes of hundred thousand transactions
per submission that reach millions of transactions per day and involve several
messages across different queues should be targeted. Working on a set of few
messages or queues or rules or alerts at a time could enable this.
No comments:
Post a Comment