[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: moving along on rules language
> From: Anwar M. Haneef <anwar@xxxxxxxxxxxx>
--Alex, Please repost this (inclusing the confession) in case
it does not get broadcasted via the mailing list :-)
Before I begin this discussion, I have a confession to make: I have to
admit that I have a bias towards an XML-based approach since it's the
norm these days and its considered 'cool'. I also have a friend
running a very successful company that develops devices for XML-based
transaction processing. Inspite of these reasons for a bias, I believe
P does seem rather interesting for rule processing. I hope that our
mailing list can help identify which solution would be most suitable
for our needs.
>> On the other hand, Alex's proposed P language seems to entertain a
>> more flexible mechanism for expressing expressions. Maybe this is
>> due to my lack of experience in languages, but this is one major
>> issue I had with developing IRML-based Processing Point rules for
>> content delivery based on QoS and device characteristics.
>
>Could you please post an example or two where IRML lacked expression
>power you needed?
Maybe most of the examples I could give could be represented using
IRML, but the difficulty in writing it in XML (esp. in case the rules
are generated by hand) seem daunting. Its when I sat down and tried to
express a few of the rules I needed in a content delivery system for
multi-homed mobile devices that I realized how compact P language
rules can be as compared to an IRML rule - again this is a comparison
of manually generated and written rules. An example of my requirement
would be:
device := identify_device_category( Http.request.property("User-Agent") );
if( (device.category == "smartPhone") &&
(device.hasCapabilityToRender(Http.response.property("Content-Type"))) )
{
//nic = network interface card
for each ( nic in device.getNICs() )
{
leastDloadTime := _LARGE_VALUE;
if( (downloadTime :=
nic.timeToDownload(Http.response.property("Content-Length"))) <=
_MAX_WAIT_TIME )
{
if (downloadTime < leastDloadTime )
{
leastDloadTime = downloadTime;
selected_nic := nic;
break;
}
}
}
}
send_content_to_nic(nic, Http.response.message);
Again, this might be a specific area (that I work in) that might have
such complex rules for processing at, say processing point 4 in an
OPES box, but as more and more network connected multi-homed mobile
devices become popular, maybe we need to identify a rule language that
can accomodate future needs.
The related earlier work by Ng, Tan and Cheng from Panasonic
(draft-ng-opes-irmlqos-00.txt) seemed to try to develop an IRML
subsystem for QoS considerations. I wonder what happened to that.
Using IRML for evaluating expressions seemed very clumsy - forgive me
for saying this :-)
>> Also, would it be possible to mix the features in IRML and P to
>> develop a mechanism by which structure could be defined by the
>> XML-based IRML while P syntax is used for expressions,
>
>What would be the benefit of using XML then?
The assumptions under which I made that statement was that P language
parsing would be more difficult to implement, and the assumptions that
an XML-based rule language would be easier to edit visually. Alex says
otherwise, which is most probably true since there has been not
objections to that from the list. I admit I have limited experience in
this area to debate it.
Even in case proponents of XML-based rules can give a convincing
argument for converging to an XML-based rule language, which I am sure
must be there, IMHO, I would still think that the relative ease with
which more complex rules can be expressed via 'P' make it something
even IRML-based rules engines should support, at least as an add-on -
much like how Javascript may be included with HTML to enhance the user
experience or, like in my earlier example, how ASM code is implanted
into C/C++ code for delegating more flexibility and control to the
developer - or administrator in our case.
Regards,
Anwar
---------------------------------------
Anwar M. Haneef
Senior Research Engineer
Mobile Platforms and Services Lab
Motorola Labs, Schaumburg, IL 60196
Phone: (847)-576-4939 (o)
Mobile:(847)-514-5192 (m) Pvt.ID: 934
http://www-unix.ecs.umass.edu/~ahaneef
----------------------------------------