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

Monday, November 07, 2005

3 Players, 2 Visions and 1 Destination

3 Players

Microsoft, Sun, Google

2 Visions

Microsoft – A Desktop (Computer) in every home.

Sun Microsystems – Network is the Computer

Microsoft’s vision of ‘A Desktop in every home’ has helped the spread of internet and its economy which is considered around $100 billion dollars (The Search by John Battelle). This indirectly helped to realize the vision of Sun Microsystems ‘Network is the computer’. Sun Microsystem's Java platform, fast tracked the internet software development (Web site / portal development using Java technologies like servlets, enterprise java beans etc) which helped the normal users to get more value out of internet and letting it being part of their daily life.

Most of the computing for the common person revolves around the web browser and it became the interface to giant network (or should we say the Computer) called internet.

What did Google do over here?

Google not only made internet a utility for the common person, it became an infrastructure for the small-scale business industries, which revolves around Google Search. Google’s $3 billion dollar Advertisement revenue in the last 3 years shows a new business model where a 3000 strong Google engineering team busy building software’s (Gmail with 2.5+ GB storage with POP3 access, Google Earth, Google Maps, Google RSS Reader, Google Desktop Search) to give away free (The Google Future by George F Colony – CEO Forrester). This new business model is credited or known as Google’s model however the actual credit goes to Bill Gross the Chairman and Founder of the Idea Labs.

1 Destination

An inter-connected digital world where all the electronic devices are connected (computers, cars, cell phones, house hold appliances, RFID enabled passports etc) together creating a single giant computer ('The Network is the computer').

Owned by everyone and owned by none!

Two great visions from two rival companies merged into a single destination.

Here is the role for the fourth player, the player who focuses on Security and its vision.

Secure every digital bit

A bit which is getting transferred on the wire or getting stored in any storage devices (hard disks / memory sticks / DVD's etc) or processed inside any CPU’s (Central Processing Unit of any devices – like computers, cell phones, cars etc).

Here is an interesting thing I found about what Google could do (potentially) in the future from New York Times :-)

By RANDY SIEGEL (the president and publisher of Parade Publications).

Google 2084 - Copyright 2005 The New York Times Company

http://www.nytimes.com/imagepages/2005/10/10/opinion/1010opart.html

Wednesday, March 09, 2005

Cache SOAP services on the client side

Design patterns let you cache SOAP services and improve performance

SOAP (Simple Object Access Protocol) services are progressing from lab prototypes to real-world applications. If, while developing distributed Java applications that interact with SOAP services, you experience network-traffic overhead issues from repeated SOAP HTTP calls, read on. In this article, Ozakil Azim and Araf Karsh Hamid describe how to create transparent, client-side caching for SOAP services using the Business Delegate and Cache Management design patterns. (2,700 words; March 8, 2002)

By Ozakil Azim and Araf Karsh Hamid

Read more in Javaworld -
http://www.javaworld.com/javaworld/jw-03-2002/jw-0308-soap.html


I co-authored this article with Azim when we worked together in netForensics (the best times of netForensics) and we build one of the best architecture for SIM Solutions.