Programming Languages for Mobile Code TOMMY THORN Inria/Irisa

Programming Languages for Mobile Code TOMMY THORN Inria/Irisa

Programming Languages for Mobile Code TOMMY THORN Inria/Irisa Sun’s announcement of the programming language Java more than anything popularized the notion of mobile code, that is, programs traveling on a heterogeneous network and automatically executing upon arrival at the destination. We describe several classes of mobile code and extract their common characteristics, where security proves to be one of the major concerns. With these characteristics as reference points, we examine six representative languages proposed for mobile code. The conclusion of this study leads to our recommendations for future work, illustrated by examples of ongoing research. Categories and Subject Descriptors: A.1 [General Literature]: Introduction and Survey; D.3.2 [Programming Languages]: Language Classifications—object- oriented languages; C.2.4 [Computer-Communication Networks]: Distributed Systems—distributed applications; D.4.6 [Operating Systems]: Security and Protection—access controls General Terms: Languages, Security Additional Key Words and Phrases: Distribution, formal methods, Java, Limbo, mobile code, network programming, Objective Caml, Obliq, object orientation, portability, Safe-Tcl, safety, security, Telescript 1. WHY MOBILE CODE? uated) as any other document [Rouaix 1996]. The expression “mobile code” has vari- ous different meanings in the literature. —Mobile agents are code-containing ob- Just to take three examples, let us cite jects that may be transmitted be- the following. tween communicating participants in a distributed system [Knabe 1996]. —The term mobile code describes any In this survey we refer to mobile code program that can be shipped un- as software that travels on a heteroge- changed to a heterogeneous collection neous network, crossing protection do- of processors and executed with iden- mains, and automatically executed upon tical semantics on each processor arrival at the destination. Protection [Adl-Tabatabai et al. 1996]. domains can be as big as a corporate —Mobile code is an approach where pro- network and as small as a personal grams are considered as documents, hand-held digital assistant. We believe and should therefore be accessible, that this characterization is general transmitted, and displayed (i.e., eval- enough to encompass most usages and This work was performed under the auspices of Dyade (an R&D joint venture between Bull and Inria). Author’s address: T. Thorn, Inria/Irisa, Campus de Beaulieu, 35042 Rennes Cedex, France; email: ^[email protected]&. Permission to make digital/hard copy of part or all of this work for personal or classroom use is granted without fee provided that the copies are not made or distributed for profit or commercial advantage, the copyright notice, the title of the publication, and its date appear, and notice is given that copying is by permission of the ACM, Inc. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or a fee. © 1997 ACM 0360-0300/97/0300–0213 $03.50 ACM Computing Surveys, Vol. 29, No. 3, September 1997 214 • Tommy Thorn precise enough to exhibit the distinctive side effect. This example is a good features of this technique. For example, illustration of some of the benefits it excludes the cases where code is that motivate mobile code: the algo- loaded from a shared disk or down- rithmic description of a complex im- loaded (manually) from the Web. age can be made very compact and Mobile code supports a flexible form general, independent of printer spe- of distributed systems where the desired cifics such as resolution and number nonlocal computations need not be known of available colors. Also, PostScript in advance at the execution site. The ad- printers off-load some of the work vantages of this model are many, includ- ing: burden from the printing host. This compactness, expressiveness, and de- —Efficiency. When repeated interac- vice independence have made Post- tions with a remote site are needed, it Script a de facto standard today. can be more effective to send the com- —Database technology is another area putation to the remote site and to where a form of mobile code has long interact locally. This is especially the case when the latency of the network been used advantageously. The size of is high and the interactions consist of a typical database makes it infeasible many small messages. to transmit it in entirety to a client; —Simplicity and flexibility. The main- thus any database operation must be tenance of a network can be much communicated to and performed by simpler when the applications are lo- the database server. Today, most cated on a server and clients them- commercial databases support the selves install them on their sites on ANSI standard query language SQL demand. Installing new or updated for database access. SQL offers a com- software becomes independent of the pact notation for expressing complex nature and number of clients. In some operations on multiple database rela- cases, it is even impossible to know in tions. advance all the pieces of code that —Documents with embedded executable will be needed at a given site. contents transmitted on the network —Storage. Loading code on demand are another kind of mobile code. Mul- rather than having all programs du- timedia documents in the Andrew plicated on all sites can significantly System [Hansen 1990] can include ex- reduce the total storage requirement. ecutable scripts written in an object- We start with a short review of some oriented script language. These en- of the most well-known examples of ap- riched documents can be sent as plications using mobile code. electronic mail or posted as news arti- cles. The scripts are executed under —PostScripty is a page-description lan- user control and can present interac- guage designed by Adobe Systems. tive dialogues and use graphical facil- PostScript is remarkable in that it is ities. A similar extension for the In- also a stack-based programming lan- ternet multimedia standard MIME guage and is associated with a large has been proposed. This extension en- standard library suitable for page ables the use of embedded executable rendering. Printing on a PostScript content written in Safe-Tcl [Boren- printer consists of composing a pro- stein 1994], a restricted variant of the gram describing the pages to be script language Tcl. printed and sending this program to The usefulness of mobile code has also the printer. The printer then executes been realized for the World Wide this program and prints pages as a Web. One of the problems with the Web is that interactive pages are im- y PostScript is a registered trademark of Adobe practical in general due to network Systems Incorporated. latencies. Even when latencies are ACM Computing Surveys, Vol. 29, No. 3, September 1997 Languages for Mobile Code • 215 not a problem, the content and ap- bile code. Section 5 draws the lessons of pearance of Web pages are con- this study and compares the languages strained by what is expressible with studied. We conclude the article by giv- the HTML language. Allowing embed- ing our perspective on the current state ded executable contents removes the of mobile code programming languages constraints of HTML and network la- and point out directions for future re- tency. Among the many existing pro- search. posals, the most well known is proba- bly Java by Sun Microsystems. 2. PROGRAMMING LANGUAGE —Finally, a fourth class of applications CONCERNS of mobile code addresses the problem of software distribution and installa- From the application classes of mobile tion, traditionally known to be costly code listed in the introduction, we can and difficult. Lucent Technologies has extract a number of common needs in developed Inferno [Lucent 1996], a terms of programming languages. mobile-code-enabled network operat- —The need for portability. Inherent in ing system aimed mostly at media the idea of mobile code is the notion of providers and telecommunication heterogeneous execution sites. It is companies. Customer’s decoder-boxes not possible to have a specific version or portable telephones running In- of the code for every possible architec- ferno can be extended dynamically ture, thus the need for portability. with software in response to their re- The portability issue also has an im- quests. In the same spirit, but in a pact on the kind of services the appli- different context, Sun has proposed cation can expect from the executing the use of Java-capable network com- host, for example, trying to write to a puters to replace workstations in cor- file might not be meaningful on a porate networks. The benefit here is hand-held telephone. the low cost of maintaining an Intra- net (a local network using Internet —The need for safety. We use the word technologies) of network computers “safety” here in the sense that a bug that download all applications on de- in a safe application should not affect mand from an application server. the execution of other independent parts of the environment. Limited as- It should be noted that there are sub- sumptions can be made on code im- tle differences in the usage of mobile ported from an unknown source, code in the preceding four applications; which means that it cannot be trusted in the PostScript and the database mod- a priori to be safe, and special protec- els, it is the sender of mobile code that tion must be provided. Notice that takes the initiative of the communica- this definition addresses the safety tion, whereas in the Java and Lucent from an operating system point of models, the execution site takes the ini- view. Safety can also be imposed by tiative to load the mobile code. We come appropriate restrictions at the pro- back to this distinction when we present gramming-language level. For exam- programming languages for mobile ple, free access to memory can be code.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    27 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us