Wednesday, December 14, 2005

Metaphor and Fortress - New programming Languages

Advances in programming languages from Assembly, C, C++ to C# or Java absorbed the complexities of programming. However, modern software development is not just programming. Lot of work happens outside the programming. Dr. Alan Perlis a prominent US Computer scientist said that “A good programming language is a conceptual universe for thinking about programming.” Metaphor is such a next Generation Language by Victoria Livschitz of Sun Microsystems.

Features of Metaphor

Following are the Four Features of the Metaphor Language
  1. Distributed Runtime Environment
  2. Contextual Programming
  3. Support for autonomous executable entities
  4. Support for Software evolution and re-use
1. Distributed Runtime Characteristics of Metaphor

A Distributed Runtime Core (DRC) will have the functionality of the current application containers and the middleware. DRC comprises of a P2P (peer-to-peer) network of Virtual Machines (Local to every host on network - LVM).

For example (from Victoria's interview with Janice - Dec 1, 2005) if a developer specify a program that a car has 4 wheels, at runtime the executable for each wheel may be loaded in the available LVM (Local Virtual Machine) by the Distributed Runtime Core (DRC). The communications between wheels and the rest of car will be handled by the DRC (even if it is inter process communication or computer to computer communication) without the explicit control by the developer or the network administrator.
Distributed Runtime Core will provide some basic needs of Distributed Applications such as
  • Load Balancing
  • Fault Tolerance
  • Remote Communications
  • Mobility of Services and their containers
  • Quality of Service
  • Service Level Management
All the above can be embedded into a runtime environment for the language.

2. Contextual Programming

Contextual Programming defines applications abstractions and codifies a programmer’s thought process. It doesn’t do any real work; it creates logical entities and not executable entities. It will be used by the designers who need to fix, extend or reuse the context.

3. Autonomous Executable Entity

Executable Entities are the loosely coupled constructs in the Contextual Programming. Executable Entities makes a program to be practical use to end customers. The real work will be done by the Executable Entities in the Contextual Programming. Now why is it Autonomous Executable Entity? Even if we talk about concurrent programming, It is still on top of sequential automaton. New Multi Core CPU’s (Sun UltraSPARC T1 Single CPU with 8 Cores supports 32 Threads running parallel while Intel dual Core single CPU runs 4 threads parallel) stresses the concept of multi threading applications and the future belongs to these types of new CPUs.

As per Victoria, The application runtime consists of Autonomous Executable Entity interact with their environment and each others asynchronously, respond to external environmental changes and take decisions accordingly. This means that behavior of an Autonomous Executable Entity might differ from environment to environment!

4. Software Evolution and Reuse

Metaphor focuses on three types of reuse mechanisms.

  1. Derivation

A new metaphor is created by changing the properties of an existing one.

  1. Composition / Decomposition

A new metaphor is created by fusion of several existing ones or fission of an existing metaphor (into several metaphors).

  1. Adaptation

A new metaphor is created for a different domain by morphing certain properties. This differs from derivation in the sense that the two metaphors are properly isomorphic. i.e., It looks similar in structure or appearance however different ancestors.

Fortress: A New Programming Language for Scientific Community

In the internet era Java brought down the software development time (of ‘n’ tier applications). It eliminated lot of common programming errors and made programmers more productive by providing API’s for everything (from networks, to threads to GUI), doing automatic memory management, getting rid of platform dependencies, and of course multi threaded programs to utilize multi processor hardware.

Fortress builds on these strengths and goes beyond these. It is specifically designed to be an adaptive language which means language features are pushed into libraries rather than warped in compilers. Fortress assumes that parallel processing is the norm, using thousands or millions of threads. Fortress supports source code in three (ASCII, Unicode, Two Dimensional) formats to support mathematical notations.

Multi Core CPUs

Birth of Multi Core CPUs is going to change the way multi threaded applications were built. The difference will be like the usage of sockets API in C or Java or the usage of Threads in C or Java. Java abstracted a lot of complexities away in these two critical APIs for distributed computing, which brought down the development time of building distributed applications. With more CPUs (and least expensive) with parallelization capabilities ‘n’ tier computing will be the way to go.

Current hurdles for the Intel, Sun, IBM and other Hardware vendors with multi core CPUs will be picking the right memory technologies. "If you can't keep the cores fed fast enough from memory, you haven't gained anything," says AMD chief technology officer Phil Hester. Couple of interesting articles on MIT Technology Review titled Multi Core Mania and Making Multi Core Fly.

Conclusion

Today we have single CPU with 8 cores and 32 parallel threads (Sun UltraSPARC T1) and imagine the state of these technologies after a decade. GRID computing for the common man (a digitally connected world) will be a reality.

With new direction in chip design which focuses on parallel computing (with multi cores) on least expensive hardware, and new programming languages focusing on abstracting away the complexities required for parallel computing will lead to true GRID computing to the common man (a digitally connected world).

  • Digitally connected Home appliances (Air Conditioner, Refrigerator, Washing Machines etc)
  • Convergence of the Media Centers (Sony® VAIO® VGX-XL1 Digital Living System)
  • Convergence of Apple iPod, Cell Phones, Handheld Devices. I know this will be controversial – However, carrying to many devices doesn’t sound too exciting either.

Imagine the year 2015. Parallel computing with Autonomous Executable Entities will be a reality!

Further Reading

  1. Janice J Heiss – Envisioning a New Language: A Conversation with Sun Microsystems' Victoria Livschitz
  2. Alan F Blackwell and T R G Green – Does Metaphor increase Visual Language Usability?
  3. Peter Norvig – Design Patterns in Dynamic Programming
  4. Gregory Neverov and Paul Roe – Metaphor: A multi stage Object Oriented Programming Language
  5. Sun Microsystems – Sun UltraSPARC T1 Processor
  6. MIT Technology Review - Faster Plastic Circuits
  7. Sun Microsystems – Fortress: A new Programming Language for scientific computing
  8. MIT Technology Review – Multicore Mania
  9. MIT Technology Review – Making Multicore Fly
  10. MIT Technology Review – Good bye, Gigahertz
  11. InfoWorld - Sun charges Sun Fire T2000 with UltraSparc