Hi Bob.

Thank you for your feedback!

The reason why I didn't put "why rule engines are needed on Android"
in the post and on the site (except a little bit on the history page)
is because I'm primarily Java SE/J2EE guy and no expert in Android.
This is why the post is a question. It is for Android experts to
decide whether it is needed and how it can be used. If the community
shares these thought with me, I'll gladly publish them in the Event
Bus online documentation, given posters permission.

My reasons to believe that there is a need are listed below:
- About two years ago Sun Java ME guys from JCP approached me and said
that Hammurapi Rules (the predecessor of Event Bus) is the only rules
engine which runs on Java ME and that there is a great need in rule
engines on mobile devices. They wanted to come up with Java spec for
rule engines on mobile devices. (Then Oracle acquired Sun and it
didn't go anywhere.) This was the primary factor to build Event Bus in
a way that it runs on both Java SE and Android.
- I think that there are a lot of events flying around in a mobile
device. A mobile device communicates with the external worlds and
these communications aren't fast. This is why parallel predicate
evaluation and parallel handler execution was introduced.
- I also thought about leveraging it in UI as you described, but again
- I do not possess the "expert power" in this area - I know how to
build UI's, but I don't do it on a daily basis. So I decided that it's
better not to say something than to say something wrong.

Event Bus supports retractions - you can remove event from the bus and
all conclusions based on this event will be invalidated. However, in
the current release retraction does not activate any handlers, as it
used to be in Hammurapi Rules. Thank you for pointing it out - I'll
add the concept of retraction-activated handlers to the bus.

Do you mind if I incorporate your feedback into the Why section on the
Android page?
---
Best regards, Pavel.


On Nov 29, 10:07 pm, Bob Kerns <[email protected]> wrote:
> Hi, Pavel. I would like to see the Code of Hammurapi ... I hope it's
> not written in cuneiform! :=)
>
> Great name! I think it would be helpful if you were to be a bit more
> explicit about what makes you believe there is a need for aruleengineon 
> Android.
>
> I've written moreruleengines than I can recall offhand, and a big
> fan ofruleengines in general, but I'd find it hard to characterize
> just why and when you need one on Android. I imagine people less
> familiar withruleengines would find it even more difficult, even
> when they're facing a problem well-solved with it.
>
> So I'd encourage you to write a bit more about why and how you see it
> being useful on Android.
>
> Looking over your site, it looks like you are using something similar
> to a Rete network for your matching. And that you've extended this
> with asynchronous execution of predicates and handlers? Perhaps one
> scenario is when you have slow interactions (e.g. network
> interactions) which have to asynchronously interact with the UI, and
> not block the event thread? Expressing this as Hammurapi rules might
> be a good way to to integrate such background interactions and the UI?
> This would avoid a lot of threading pitfalls and UI coordination
> headaches.
>
> I have found thatruleengines are a very nice way to manage complex
> UI concerns, such as when buttons should be activated, what values
> should populate drop-down lists, etc. Especially when theruleengine
> supports retraction -- so that if one of the conditions that led to a
> button being activated is no longer true, the button is then
> deactivated automatically. Do you support any form of retraction --
> reversing an action (un-asserting a fact) when the condition that led
> to it is no longer true?
>
> Given how simple individual Android screens are, and how they are
> spread across multiple activities, I'm not sure whether this makes
> android need rules less -- or more! Perhaps more, as the logic around
> maintaining the various bits of state across activities should perhaps
> be best managed in a way decoupled from individual screens.
>
> On Nov 28, 12:53 pm, Pavel Vlasov <[email protected]> wrote:
>
> > Hello,
>
> > I've searched this forum and the web and got an impression that there
> > is a need for aruleengineon Android, but there are very fewrule
> > engines which can run on it.
>
> > I'd like to share with the community that Hammurapi Group has recently
> > released Hammurapi Event Bus (http://www.hammurapi.com/dokuwiki/
> > doku.php/products:event_bus:start), which is a forward-chainingrule
> >engineand an event dispatchingengine. It runs on Java 6 and Android
> > 2.0+.
> > ---
> > Best regards, Pavel.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to