[jboss-as7-dev] RFC: Model normalization
Heiko Braun
hbraun at redhat.com
Wed Mar 23 15:41:13 EDT 2011
The following are three responses to query server-config resources:
Take a look at the "jvm" property and imagine the number of if-statements
you need to come with to deal with the three different representations.
[INFO] {
[INFO] "path" : null,
[INFO] "system-property" : null,
[INFO] "interface" : null,
[INFO] "jvm" : {"default" : null},
[INFO] "name" : "server-one",
[INFO] "group" : "main-server-group",
[INFO] "auto-start" : true
[INFO] }
[INFO] {
[INFO] "path" : null,
[INFO] "system-property" : null,
[INFO] "interface" : null,
[INFO] "jvm" : {"default" : {"heap" : {
[INFO] "size" : "64m",
[INFO] "max-size" : "256m"
[INFO] }}},
[INFO] "name" : "server-two",
[INFO] "group" : "main-server-group",
[INFO] "socket-binding-group" : "standard-sockets",
[INFO] "socket-binding-port-offset" : -106,
[INFO] "auto-start" : true
[INFO] }
[INFO] {
[INFO] "path" : null,
[INFO] "system-property" : null,
[INFO] "interface" : null,
[INFO] "jvm" : null,
[INFO] "name" : "server-three",
[INFO] "group" : "other-server-group",
[INFO] "socket-binding-group" : "standard-sockets",
[INFO] "socket-binding-port-offset" : -6,
[INFO] "auto-start" : false
[INFO] }
IMO we need to think thoroughly about the following questions:
- Can the model be normalized somehow?
- How do we deal with inherited properties?
- Would it make sense to separate the actual state from the structural information?
Ike
More information about the jboss-as7-dev
mailing list