1
我想爲我們的項目之一 - Online Buying and Selling使用drools。使用Drools根據事件執行操作
事件就像買一本書,買筆,買一個kindle。 這些事件存儲在數據庫中。
現在,根據之前發生的事件,我想確定結果。
好比說,如果一個人具有以下序列,
1. Buy a book at a price.
2. Sell the same book at a higher price.
然後
Do something based on that.
如果有人這樣做,
1. Buy a kindle.
2. Purchase a book in Science Section of books.
然後
show him the relevant content in the UI.
我在數據庫中列出了所有事件。 現在我已經編寫了要完成的操作界面,並且我還完成了事件發生時傳遞客戶的界面。
現在,什麼會給我最好的表現來處理事件,並根據事件的順序做出決定。我無法將所有事件都存儲在內存中,因爲我有很多這些事件。