[rules-users] Best practices for Web UI and REST Services

Miguel Paraz mparaz at gmail.com
Mon Nov 5 06:58:46 EST 2012


Hi,
I'm connecting Drools to the Web, both for UI (via JSON+JavaScript),
and REST services.

What are the best practices, or, are there reference apps for this?

As I understand it, the architecture is like: there must be a single
thread running Drools, then with concurrent data structures (e.g.
BlockingQueue) to talk to the web threads.

For synchronous requests, we can send Commands from the web, and
receive BatchExecutionRequests to send back to the UI.

For asynchronous events, this is more challenging - we can have live
queries that are connected to listeners which push the changes to the
UI layer. For the Web UI, the results will need to be queued up until
the client picks them up, For the REST service, we can trigger a
callback to the client's URL.

Any experiences here?

Thanks!
Miguel


More information about the rules-users mailing list