Written June 30, 1998, last updated March 2000
Here are excerpts from a long message I sent to someone explaining what distributed computing, COM and CORBA are all about.
Multi-tier computing allows you to write programs that are distributed across a network. It allows you to build applications that run on a server, and that can be called by client programs. The server can be on one machine, the client on another machine. The two programs work in tandem, each using the resources available on their own machine, and neither impinging significantly on the resources available on the other machine.
One way to begin to understand multi-tier computing is to start by thinking about the simplest, and most primitive form of this technology. What's the smallest, simplest, subset of multi-tier technology that needs to be present before everyone can agree that the technology involved is indeed "multi-tier" technology? In my opinion, the minimum necessary in order to create a multi-tier app is the simple ability to make remote function calls.
A remote function call is a call to a method on a server that resides on a different machine than the one you are currently using. If you are running program A on machine X, and you call a function on program B that is running on machine Y, then you are doing multi-tier computing.
In short, Multi-tier distributed computing, in its simplest possible form, is about making remote function calls. If you have a client program on one machine that calls a function or method on a binary file located on a second machine, then you are doing distributed computing. The crucial point here is that you don't load the server program or DLL into the memory space of your own machine; instead, the function call executes on the remote machine.
Of course, most multi-tier systems over something more complex than the mere ability to call a remote function. Remote function calls are indeed the basis of the technology, but there is more to the subject than the presence of that one single technology. In particular, multi-tier technology involves the creation of servers that provide specific services to clients. The best multi-tier technologies also leverage the power of object oriented programming.
Multi-tier servers provides services available on the net, which your client program can use when needed. Often, you ask a distributed server application to manipulate some data, like reporting on the latest score of a baseball game, the price of a stock, or the salary of an employee. Each of these tasks are services that are available to client applications. The client asks the server to perform the task. The server does the work, and passes the result back to the client. The client program then formats the result and shows it to the user.
The goal is to distribute the load of programs across the network, rather than having each program run on the client machine. Don't make my machine do all those calculations, let that heavy work be done on the network, and then just return the answer to me so I can look at it.
The web is a classic example of a distributed architecture. You have the browser on one machine, and executables such as a server or a CGI app running on a second machine. The client asks the server to do something, and it sends back an answer. You don't need to load the server into the address space of the client. The work is done on the server, it is distributed across the network. All that is sent back to the client machine is the result of the request or query.
We can pass datasets back and forth as parameters to a function or method. I can be in a client program and ask a server to execute a query and return a data set to me as a parameter or as a function result. Then I show the user the resulting data set, and allow the user to edit the data set. Finally, the edited data set can be sent back across the network and the database can be updated.
The user does not need to have any database tools on their machine, nor do they need to configure any databases or aliases. All the work is done on the server. The work load is "distributed" across the network. The client provides the ability to display and edit data, the server provides the ability to safely retrieve and update the data from a database.
You have used systems like this many times, when you browse the web and go to a site that shows you the scores of games, today's weather, or the price of a stock. We all use distributed computing all the time, but there is more that can be done with it than we see on the web. The internet of HTTP, HTML, XML and browsers is one very powerful way to create distributed applications. However, technologies like CORBA and DCOM allow us to create object oriented systems that more closely mirror the architectures in stand alone applications.
Using CORBA or DCOM we can create lots of servers that live on the network. One server might represent a payroll department, another the human resources department, a third might return stock quotes, and a forth might give you football and baseball scores. Its like the internet, only you can call each of these servers from inside a standard Delphi, Java, VB or C++ program.
On the internet, if you request a set of data, you get back a display of that data in HTML format in a web browser. That is convenient for some purposes, but it is not exactly what the programmers of a payroll or inventory application really want to accomplish. At some point they may want to display data on the web, but often they simply want to perform calculations on data that is spread across multiple servers.
COM is part of the plumbing of distributed computing. It is one of the pieces needed to build a certain kind of distributed architecture. CORBA is a different technology that performs more or less the same functions as COM.
More technically: COM is a technology for describing a type of object oriented programming that works between different languages, DLLs and programs. It defines a system for creating objects that run not just on one computer, but on a wide range of computers. Com supports many different compilers and languages. Its OOP running on the Operating System level.
DCOM is a way of distributing objects across a network. With DCOM you can create objects that live on a wide range of servers, and can be called from inside your Delphi, VB, Word, Excel or C++ program.
DCOM and COM are Microsoft technologies, and work best on Windows.
CORBA is another OOP based distributed computing model, just like DCOM. The difference is that it is designed to run cross platform rather than only on Windows machines. It allows you to create objects on UNIX machines that can be called by programs running on a MAC, a Windows machine, or on another UNIX machine. Again, its all about making remote function and method calls.
COM and CORBA are currently battling for supremacy, much the way the MAC, Windows and UNIX used to battle for supremacy. Now the OS wars are pretty much over, or at least in remission. But COM and CORBA are battling for mind share in the distributed computing market.
COM has a wider range than CORBA, in that it is built into the Windows operating system and does many other things besides helping you create distributed applications. For instance, the whole Windows 98 interface is based on COM. CORBA has the potential to be better than COM at answering the needs of Corporate customers, in part because it plans to emphasize business rules and business needs, and in part because it is cross platform, and most big businesses have some need for cross platform apps. CORBA is also very good at keeping network applications up and running 24 hours a day, seven days a week. In particular, it is good at creating redundant resources that can take over if one particular service fails. For the general programmer, COM is more complete and much easier to use than CORBA at this time, but CORBA is growing quickly, and has a very ambitious agenda. If CORBA can realize its goals, it will be very powerful indeed. In its current implementation, CORBA does a good job at keeping its servers running all the time, while COM is not quite so reliable. But again, both these technologies are evolving very quickly