Rules based policy engine

matt joyce matt.joyce at
Fri Jul 18 01:01:08 CEST 2008

I have always wanted many more features on my phone, than any phone I've 
owned has provided.
I expect the majority of people who are excited about Openmoko have 
similar day dreams.

I'd like to propose a rule based policy engine.
In essence this would be an event based system, a service that other 
services could refer to, to influence their behaviour.

These devices are inherently personal, just as other computing devices 
are, so it reasonable to expect everyone will have slightly different 
The problem with a great many people wanting specific features, or 
personal requirements, is that some will be realised and some will not.
Some requirements might be very similar, but not quite right, and some 
features may compete unproductively, clash.

By creating a rule based policy engine, I think it would be possible to 
give the user the ability to describe the way their phone should work, 
for them, without each feature being developed for them.

Here are some examples of how I would like use this concept to make my 
phone more personal, and how I would like to teach my phone to be smart.

   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.

Some rules would be permanent, some would be one off
   If John's phone is detected via bluetooth, please let me know (I need 
to see him, when he comes in.)
   Do not disturb until 13:00 (I need to get some work done)
   No calls until this contact calls me (I'm expecting an urgent call)
   Loud volume for the next hour (It's noisy here)
   Silent for an hour (meeting)

Some events might be :
- In/out calls, sms, emails
- Arriving/departing somewhere
- Enter/leave a time period
- Discovery/loss of a bluetooth device (infer person is nearby/left)
- Discovery/loss of a WIFI

Similarly ,states which could be queried might be :
- Call in progress
- Location is within a defines area
- Time is in a period
- Battery is low
- USB is connected

Some definitions
- Groups of contacts
- Lists of GPS co-ords
- time periods

Some actions
- Answer/Don't answer call
- Set volume profile
- switch on/off
- start/stop an application
- manipulate hardware

It would be quite similar to rule based filters many email systems use 
(outlook, thunderbird, gmail, procmail), or firewalls for that matter.
Who knows, perhaps it could learn and suggest rules based on behaviour.

I'm sure creative people can explore and extend this idea.
Does anyone think this has merit, is achievable and worth pursuing?



More information about the community mailing list