Saturday, March 19, 2016

The Enforcer - Progress Report

I've been making good progress on the Enforcer, so I thought I should give an update.  But first, time for a confession. 

The current published version of the Mesmerizer is 0.98m, not the 0.98l that I intended.  The day after I released 0.98l, I needed an expression evaluation function for use in the Enforcer.  Partly because I'm lazy, but mostly to ensure consistency between the Mesmerizer and the Enforcer, I decided to reuse the expression evaluation code from the Mesmerizer in The Enforcer.  This has the big advantage that you'll only have to become familiar with one syntax for Reverse Polish expressions, as the expressions are almost identical between the Mesmerizer and the Enforcer (the only difference being that the Enforcer doesn't implement the isdefined operator).  For my first test of the ported expression code I had it add 1 and 1 - and to my surprise I found it couldn't do it.  It turns out that I'd omitted the plus and minus operators in the original Mesmerizer code.  Perhaps adding and subtracting aren't things that a trigger rule needs to do very often, but it was still embarrassing to discover they weren't there.  Adding them was trivial, and so I re-issued the Mesmerizer as 0.98m with the fixed code.  I took the opportunity to rationalize (and update this blog to correctly document) a couple of operators whose argument order was the reverse of what you'd expect.  I've sent out the 0.98m update to people who bought from vendors;  I'm in the process of updating Marketplace purchasers.

Now onto the good news - the Enforcer is coming on well.  For those of you who haven't waded through this blog, the Enforcer is a device that connects to one or more CHAOS Communications Hubs and provides two distinct functions - management of the Hubs and programmable control of users.  The Hub management features include providing a single point where users can be viewed across all your Hubs, and the ability to "bridge" Hubs together so that chat and/or command traffic on one Hub can be forwarded to another Hub, linking the user communities of the two Hubs.  The user control aspects are somewhat similar to event triggers within a Mesmerizer - the differences are that they are stored in and executed out of the Enforcer, so a given event response can be shared by multiple users, and can be defined or changed even when the affected user(s) aren't logged in.

Event rules in the Enforcer can:
  • issue Mesmerizer commands, by default to the Mesmerizer that generated the event, although you can specify a different recipient
  • send instant messages to specified users
  • send email
  • set and use variables, which  can be either global and long-lasting, or transient and exist only for the duration of the event.
  • call other event rules
  • contain conditional logic
Most events are triggered by a Mesmerizer connected  to one of the Hubs associated with the Enforcer.  There are a few standard events - logon, logoff and location change, but I recently decided to add custom events.  This requires a new "signal" Mesmerizer command to signal an event, so the Enforcer release will be accompanied by another Mesmerizer update.  There are a few events that are triggered by things other than a remote Mesmerizer - a Hub web address changing generates an event, for example, so that an Enforcer rule can be defined  to send an IM and/or email to interested web users to inform them of the new address.  I will probably allow for custom events to be locally-generated too, so that Enforcer rules can be used to automate multiple-command sequences that would otherwise have to be manually typed into a Communicator.

I don't yet have a launch date, but I don't expect it to be much later than the end of April.

No comments:

Post a Comment