2011-02-09 54 views
0

我正在構建一個客戶端/服務器應用程序,它的核心將有一個相當複雜(但不是大型的10,00對象)對象模型。多個客戶端需要查看模型(通過Eclipse RCP GUI),但服務器將是唯一可以直接編輯模型的節點。我希望將模型的編輯發佈給客戶。新客戶將能夠請求該模型並註冊更新。尋找實現分佈式MVC模式的分佈式緩存解決方案

真的是一個相當標準的模型 - 視圖 - 控制器模式。

任何人都可以推薦好的,開源的,複製的緩存解決方案,它將處理我的對象模型的分佈,並將更改分發給模型。我希望將'deltas'發送給客戶端,而不是每當一個字段發生變化時發送完整模型。

而且,我需要能夠複製的對象圖,並保持連貫性,例如,如果我有一個「人」的對象:

public class Person implements Serializable { 
private Person manager; 
private String name; 

    public Person (Person manager, String name) { 

添加三個人到我的緩存:

Person boss = new Person(null,"TheBoss"); 
Person employee1 = new Person(boss,"employee 1"); 
Person employee2 = new Person(boss,"employee 2"); 

cache.put(new Element("boss",boss) 
cache.put(new Element("employee1",employee1) 
cache.put(new Element("employee2",employee2) 

然後更新「老闆的名字:

boss.setName("TheBossXX"); 
cache.put(new Element("boss",boss) 

我希望下面的代碼返回‘TheBossXX’的所有節點上:

Person e1 = (Person) cache.get("employee1").getValue() 
Person b1 = e1.getManager() 
LOG.info(b1.getName()); 

換句話說,我想我的解決方案知道哪些對象互相引用並在所有節點上維護這些替代權。

有興趣聽​​到您的建議。

尼克

回答

0

我建議Spring Web Flow。

 Spring Web Flow compliments the Spring MVC. 

這裏是鏈接Spring Web Flow Demo