[jboss-dev-forums] [Design of JBoss Portal] - Identity model

julien@jboss.com do-not-reply at jboss.com
Sun Nov 12 12:52:45 EST 2006


Bolek,

I spent a couple of hours on that prototype that we discussed recently.

The prototype is be some kind of stateful facade in front of the 4 modules we have today in the identity2 package. The state life cycle being managed by one unique object (session). It's very similar to hibernate/JCR except that it target user/role etc..

The benefits are that it offers a stateful view over the 4 modules. As well as a life cycle for scoping the different updates. Of course the goal is not to reinvent the wheel, the main motivation is that the modules can address different persistent store (DB, LDAP), there are even several implementations possible of some of them (membership module).

So we would have that architecture :

XXXModules 
--------------
Stateful session

I have come to the conclusion that :

1/ the different modules needs to offer simple stateless operations, which seems to be the case today with the 4 different modules we have. If I retrieve data from a module and then use the module to update state affecting that data, then the object I retrieved is stale and the client should either get an updated object or compensate the state change. For instance :


  |    Set roles = membershipmodule.getRoles(user);
  |    membershipmodule.addRole(user, admin);
  | 
  |    // Needs to be updated
  |    roles = membershipmodule.getRoles(user);
  | 

2/ on the decision about to develop or not further more that embryon, I am not sure we need it right now. I think that for now we should keep what we have and ensure that we keep the same mind with the existing modules. Probably that the main motivation for that is that most of our operations are read only operations at runtime, and only the UserPortlet and RolePortlet needs to update those, so if those portlets are coded correctly there should not be any issue.

Of course we could still develop that later if we have a need for it.




View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985260#3985260

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985260



More information about the jboss-dev-forums mailing list