Is there a Cloud programming model?
I have been participating in a lively cloud-computing@googlegroups discussion focused on Cloud programming models.
When considering Cloud Computing’s impact on application development and architecture, I have continually asked my team the following questions:
- What is unique?
- What is new?
- How does Cloud Computing change application development and application architecture?
Existing Cloud Computing's momentum is predominantly focused on hardware optimization (IaaS) or delivery of entire applications (SaaS).Building momentum for Platform as a Service (PaaS) has proven trickier because many 'old discarded practices' are being rejuvenated, skepticism abounds, and developers are focused elsewhere. Does current day technology, new products, and accepted culture mean that Rapid Application Development (RAD) environments and Fourth Generation Languages (4GL) will be accepted by mainstream developers? Some proponents think so, others feel like Bill Murray in ‘GroundHog Day’ and wonder ‘why will the concept work this time?’
Interest in Cloud is providing an opportunity to re-think the application platform, review vendor messages (e.g. Google, SalesForce.com, LongJump, Bungee), and determine how application development and application architecture should morph to support Cloud benefits and characteristics.
A recent newsgroup thread discussed how Cloud will impact programming models. A focus on 'programming models' is a red-herring.The best 'programming models' innovations are unseen and instead rely on inversion of control and/or container-based interception.Vendors are extending infrastructure containers and frameworks to transparently support improved dynamic virtualization and more flexible topology distribution (hopefully without new APIs and languages).
But what is new today? As Greg Pfister states in his post, technology concepts such as virtual containers (e.g. Java JVM and PHP interpreters) and decoupling from operating systems and hardware (e.g. java bytecode) have been around for quite some time. Additionally, 'inversion of control' (IoC), 'configurations instead of code' (EJB3.0 annotations instead of java interfaces), and declarative languages (e.g. XAML) are also well established.
But has the infrastructure evolved to transparently realize elastic scalability and optimize resource allocation? or, do developers need to program to the Globus toolkit, .NET WCF, or Force.com APEX?
A straw-man use case is "Can Cloud infrastructure inherently support elastic, scalable, and resource-friendly execution of Plain Old Code Object (e.g. Java POJO, C# class, Tcl script)?" GigaSpaces is a good example of a product enabling more seamless Java code scalability and lower resource footprints when compared to traditional application servers (e.g. IBM WebSphere, Oracle AquaLogic). Another example, code written in C++ which interfaces to the Win32 or LINUX internals is often tightly coupled to hardware, does not following 'service-oriented design principles' (i.e. loose coupling, separation of concerns, interoperability), and may contain single points of contention(e.g. synchronization points, resource locking). The application either doesn't support parallelism, or supports parallelism single machine specific manner.
A Cloud-friendly application supports dynamic deployment of modular components. Picking up and moving a C++/Win32 application to another machine requires moving several operating system resources (e.g. memory, file handles, threads, inter-process communication objects). Decoupling resources behind a service interface is a more Cloud-friendly best practice.
<>A few use case suggestions:
If end-users rely on Software as a Service, then their development environment must support service interactions and corporate infrastructure policies (e.g. security, reliability, availability, performance) should extend beyond their internal data center and span external service providers. WS-Policy based specification standards are a step in the right direction. Policies must be externalized from application code to enable more distributed infrastructure decisions. Following JSR250 and embedding security policy within Java code doesn't facilitate communicating the security policy statements beyond the JVM environment. You will find numerous examples of both .NET attributes and Java annotations which are deployment infrastructure descriptors. Embedding deployment details in code is an inefficient programming model and not Cloud-friendly. The application design technique often breaks the service-oriented concept of 'separation and concerns'.
If end-users rely on IaaS to deploy applications, then having more insight into the application footprint will enable more intelligent resource allocation decisions. Slimming down the application footprint to handle a single unit of work will enable more requests to be packed into a machine.