Cloud Foundry: Design and Architecture
Derek Collison discusses the goals, the design premises and patterns employed in creating the architecture of Cloud Foundry, VMware’s open source PaaS, unveiling internal architectural details.
The content has been bookmarked!
There was an error bookmarking this content! Please retry.
Posted by Rickard Öberg on Nov 20, 2008
The goal of modeling domain concepts through objects set by OOP has for a long time been handled in insufficient ways. What is the fundamental problem with how we have tried to do this so far? Is there a better way to deal with it? In this article we introduce the concept of Composite Oriented Programming, and show how it avoids the issues with OOP and reignites the hope of being able to compose domain models with reusable pieces.
Read: Composite Oriented Programming with Qi4j
Introducing SQLFire: a memory-optimized, high performance SQL database
Banking Case Study: Scaling with Low Latency using NewSQL
VMware vFabric SQLFire - Test drive the data management system with memory speed, horizontal scalability and a familiar SQL interface
I like the idea of bringing composites or Mixins to Java although I'm not sure about dispatch performance for something like this. Also liked the introduction of multi-module layers to object assembly and enforcing layer/module separation.
... and check out www.qi4j.org. Rickard in his modesty 'forgot' to mention it.
How does this differ from Ruby's mix-ins?
Design with composition instead of inheritance? Yes!
Actor-Role and object inheritance patterns in Nicola's Streamlined Object Modeling (www.streamlinedmodeling.com) ...
... and with the Party,Place,Thing - Role pattern in Peter Coad's Java Modeling in Color with UML (dn.codegear.com/article/29871)
I am trying to like this but I do not understand where such an approach would be useful in a real world applications? I mean real applications are usually very focused - a person can be a developer or maybe a speaker, but if I am writing a bug tracking app I only need to model "assign to developer" behavior and I don't care if that developer can also speak well :) Without such examples this idea appears too "academical" for me.
Gregory
On performance, as always it will depend on your usecase if it is good enough or not. What I can say is that this technique is the same as I used in the SiteVision CMS, and which is now powering about 150 Swedish government websites, including one with a veeeery high load one day of the year: the IRS on income tax declaration day. The performance stats I got from that was more than good enough (overall performance of course does not solely depend on invocation performance though). But you should try it yourself. There are some microbenchmarks included in the source, so you can run that on your own machine for numbers.
Good question. I'm not a Ruby-developer so I don't know. One of the things that I think separates this implementation from most implementations though is the ability to use private mixins, i.e. mixins that are only available internally in the object (sort of like "public" and "private" methods in a regular class). This can be very useful to hide implementation details.
My experience from previous apps using this approach is that each object will often have a primary concern related to the domain, but then it might have 10+ mixins which are of the generic kind (identity, timestamps, ACL's, metadata, tree hierarchy, etc.). And if you have generic mixins it is also much easier to do generic UI's, which is almost the real gain, in terms of lines of code saved, since UI's tend to cost a lot in coding.
For this reason I think the approach is generally applicable. It also allows you to think more in terms of roles (i.e. "how does the CLIENT want to perceive this object?") rather than the usual class-oriented thinking (i.e. "what am I?"). Role oriented modeling, which by nature is heavily interface-oriented, leads to better separation of concerns and more reusable code.
I'm planning to compose several domain models (several enterprise applications) developed by third party providers. I think it's a good idea to make a concept proof with Qi4j, but can I get bottlenecked fairly with persistence issues in a EJB3 enviroment?
Thanks
This approach sounds like traits (www.iam.unibe.ch/~scg/Archive/Papers/Scha03aTra...), a form of which is implemented in Scala (lamp.epfl.ch/~odersky/papers/ScalableComponent....).
It looks a bit familiar.
There are clearly some good ideas here, but an early warning sign of things to come is to compare "conception" with "realization". (C.f first 3 paragraphs of JSP's specification from Sun ..).
@Mixins({DeveloperMixin.class, SpeakerMixin.class, AlumniMixin.class})
public interface HumanComposite
extends Developer, Speaker, Alumni, Composite
{}
Related:
www.howtodothings.com/home-and-garden/a4417-how...
Classes are dead. Long live interfaces!
Related?
www.youtube.com/watch?v=mriBc6NjUhg
Hello Rickard,
Is there any example of qi4j being used in a webapp with UI and persistence code? I am curious to see how developers could benefit from using COP in regular webapps and how it could change day-to-day design.
Thanks,
Rafael
Derek Collison discusses the goals, the design premises and patterns employed in creating the architecture of Cloud Foundry, VMware’s open source PaaS, unveiling internal architectural details.
Andrew Watson talks about the work of the OMG, where CORBA is alive and well (hint: in your car), UML and UML Profiles vs. custom Modeling languages, DDS and other middleware, and much more.
Sohil Shah discusses creating iPhone and Android enterprise mobile applications based on cloud services using the open source platform OpenMobster.
Paul Sanford presents the transformations supported by data throughout its life cycle, and how that can be better done with Splunk, an engine for monitoring and analyzing machine-generated data.
A common “best practice” for unit tests is to only write a one assertion in each test. I intend to question this advice by showing that multiple assertions per test are both necessary and beneficial.
John Rauser presents the architectural and technological evolution of Amazon retail websites starting with 1994 and ending with adopting Amazon Web Services.
Michael Stal discusses system architecture quality, how to avoid architectural erosion, how to deal with refactoring, and design principles for architecture evolution.
Every developer has had to integrate with another system, API or component. Tis article provides strategies to handle the change and for he separating system boundaries.
13 comments
Watch Thread Reply