There were some on going discussions on the subject in the recent past. Thats why I wanted to bring up this discussion. We were talking about the correct number of bundles, correct size of a bundle, etc. I heard a decision to make Carbon kernel a single bundle as well. Before coming to a conclusion on this subject, let me explain the proper criteria on scoping bundles. I've gathered following information from various sources.
- *A properly designed bundle should be highly cohesive and loosely coupled.* Bundles should perform few related tasks. i.e tightly focused in what it does. Bundles should not have a tight coupling to its dependencies. i.e coupled to an API not to an implementation. - By looking at export and import packages of a given bundle, we can see whether the bundle is properly designed or poorly designed. - If a bundle has too much import package and export packages, then most probably this bundle is trying to too much in too many different areas(Incohesive). - If a bundle is importing many low-level APIs or implementations then this bundle is tightly coupled with other bundles. This theory applies to export packages as well. If a bundle exports too much packages including its low-level APIs and implementations, then this bundle is asking for trouble. Other bundles will get coupled to this bundle. - Poorly designed bundles can contains too many imports or too many exports which results in a nightmare situation if you are trying update the bundle at runtime. Since there are too many wirings to this bundle, an update of this bundle will result in an update of many other dependent bundles which in turn may results in a situation similar to a server restart. By considering the above facts I would say that the decisions on the number of bundles or the size of a bundle in a project actually depends on the context. There is no right answer. Its up to developer of the project to decide on the number of bundles and the size of bundles by adhering to the rules of high cohesive and loose coupling. IMHO, the idea of making Carbon kernel a single bundle is not a good decision. I think we should take above facts as a guide when scoping our Carbon bundles. Thanks, Sameera. -- Sameera Jayasoma, Architect, WSO2, Inc. (http://wso2.com) email: [email protected] blog: http://sameera.adahas.org twitter: https://twitter.com/sameerajayasoma flickr: http://www.flickr.com/photos/sameera-jayasoma/collections Mobile: 0094776364456 Lean . Enterprise . Middleware
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
