Rules based policy engine

Matt Joyce matt.joyce at
Fri Jul 18 02:56:24 CEST 2008

On Fri, Jul 18, 2008 at 9:59 AM, Alexey Feldgendler <alexey at>

> On Fri, 18 Jul 2008 01:01:08 +0200, matt joyce <matt.joyce at>
> wrote:
> >    If it can be reliably established that my physical location is one of
> > my favourite restaurants please switch my phone to vibrate, unless my
> > babysitter calls.
> >    If I miss a call or I receive an SMS from from any of my work
> > contacts during work hours, and I don't respond, please remind me.
> >    If it's not during work hours, do not take any calls from contacts
> > exclusively in my work contacts.
> >    If my home wifi is available and my battery is not too low, don't use
> > GPRS for data.
> >    If it a WEEKDAY and 06:00, turn on, play alarm, connect to WIFI and
> > start getting email and rss.
> >    At 21:00 on weekdays, switch to standby.
> >    If my battery is low and I'm at home, remind me to charge.
> >    If I'm at home disable my auto-lock.
> The problem with this is that one needs to think like a programmer to
> describe your "ideal phone" as a set of rules like these.

Programmers are people too. :)

> Not only does
> one have to think analytically and dissect their concept into orthogonal,
> machine-checkable rules, but from your examples it's also clear that for
> such a wide range of possibilities a whole *language* with *expressions*
> (at least boolean) is necessary.

Yes, this is precisely what I want, although it need not be overly complex.
Thunderbird's filter system is easy enough, MokoRules would be more complex,
but the process can be broken down into small steps.

I've always thought Outlook's rules wizard was pretty good.

I'm frequently impressed by non-technical staff at work, who write rules to
make their outlook work for them.

> Moreover, if one *is* a programmer, and has learned the rule expression
> language, there will be bugs in the rulesets, like overlooked priorities
> or excessively permissive conditions, and you'll spend some time debugging
> it, probably missing a few important calls and alarms now and then in the
> process. Next step would be debugging tools for rulesets, allowing to
> simulate times of day, different conditions and incoming events to test
> the rules. Next, backup and revision control for rulesets. This is where
> madness lies: you have to modify and debug a program in a declarative
> logic language when you start dating someone because it breaks all your
> carefully polished ruleset.

Agreed.  This is about granularity, and the examples I gave were off the
cuff and may well be unworkable in RL.
Sanity check can be developed too, and packaged in groups to meet the needs
for Novice, Competent, Pro.
Freedom to make mistakes.

> Sounds like a topic for XKCD. Randall, are you
> by any chance reading this?

I know what you mean.

> I understand that you must be thinking, "This phone is fully programmable,
> so I can make it do whatever I want". True. Now, by defining sets of
> possible conditions and actions and letting the user make rules out of
> these, you're basically saying: "Here is a computer. You can program it to
> do whatever you want". While this might be usable for someone who is a
> programmer (and who's willing to be a programmer when they deal with their
> cell phone), it's not a killer application. It's an absence of
> application; it's rather an interpreter for a programming language in
> which a user can write themself a killer application.

Yes, that's what I want, I'd be happy with text config files to start with.
Even an offline webapp to make/test the rules, is not disagreeable to me.
People could publish their recipes, rulesets.

> The key to making a phone do what you, I or someone else wants is rather
> in analyzing our requirements and figuring out what parts are constant and
> what are changing. Of course, all people want different things, and the
> same person wants different things at different times. But the number of
> dimensions in the space of all reasonable people's demands is still much
> less than that of the space of all possible rulesets. Only a small subset
> of all possible rules, let alone rulesets, makes any sense at all, while
> the vast majority is nonsensical, such as "When WiFi is available and
> John's phone is nearby, mute all calls", or "If I have unread SMS on
> Thursday, prefer GPRS". Analyzing and isolating the axes of user demands
> is much harder than developing a ruleset-driven engine, but at least it
> has a chance of becoming usable.
This reminds me of a Richard Dawkins quote, speaking about the search space
of DNA, "But, however many ways there may be of being alive, it is certain
that there are vastly more ways of being dead, or rather not alive."

I think what your saying is that the more variables there are, the more
possibilities of non-useful, or counter productive rules there will be.
If you are, then I agree, but let's not discount the users ability.

I don't want a dumbed down phone, a lowest common denominator, I can buy one
of those already.
I say we start with lot of possibilites and see what bubbles up, see what
methods can be developed to help us not make daft rules.

I'm not saying a rules based approach will suit everyone, but I look forward
to hear from those who are intrested.

Your comments are totally aprieciated and have given me cause to think
though some areas I have not considered, but it has not disuaded me one bit.


-------------- next part --------------
An HTML attachment was scrubbed...

More information about the community mailing list