In
distributed computing
Distributed computing is a field of computer science that studies distributed systems, defined as computer systems whose inter-communicating components are located on different networked computers.
The components of a distributed system commu ...
, code mobility is the ability for running
programs, code or objects to be
migrated (or moved) from one machine or application to another.
This is the process of moving mobile code across the nodes of a
network
Network, networking and networked may refer to:
Science and technology
* Network theory, the study of graphs as a representation of relations between discrete objects
* Network science, an academic field that studies complex networks
Mathematics
...
as opposed to distributed computation where the ''data'' is moved.
It is common practice in distributed systems to require the movement of code or processes between parts of the system, instead of data.
Examples of code mobility include scripts downloaded over a network (for example
JavaScript
JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior.
Web browsers have ...
,
VBScript
VBScript (Microsoft Visual Basic Scripting Edition) is a deprecated programming language for scripting on Microsoft Windows using Component Object Model (COM), based on classic Visual Basic and Active Scripting. It was popular with system admi ...
),
Java applet
Java applets were applet, small applications written in the Java (programming language), Java programming language, or another programming language that Compiled language, compiles to Java bytecode, and delivered to users in the form of Ja ...
s,
ActiveX control
ActiveX is a deprecated software framework created by Microsoft that adapts its earlier Component Object Model (COM) and Object Linking and Embedding (OLE) technologies for content downloaded from a network, particularly from the World Wide Web. ...
s,
Flash animation
Adobe Flash animation (formerly Macromedia Flash animation and FutureSplash animation) is an animation that is created with the Adobe Animate (formerly Flash Professional) platform or similar animation software and often distributed in the SW ...
s, Shockwave movies (and Xtras), and
macros embedded within
Microsoft Office
Microsoft Office, MS Office, or simply Office, is an office suite and family of client software, server software, and services developed by Microsoft. The first version of the Office suite, announced by Bill Gates on August 1, 1988, at CO ...
documents.
Overview
The purpose of code mobility is to support sophisticated operations. For example, an application can send an object to another machine, and the object can resume executing inside the application on the remote machine with the same state as it had in the originating application.
According to a classification proposed by Fuggetta, Picco and Vigna,
code mobility can be either strong or weak:
''strong code mobility'' involves moving both the
code
In communications and information processing, code is a system of rules to convert information—such as a letter, word, sound, image, or gesture—into another form, sometimes shortened or secret, for communication through a communicati ...
, data and the execution state from one host to another, notably via a
process image
{{Refimprove, date=December 2013
In computing, a system image is a serialized copy of the entire state of a computer system stored in some non-volatile form, such as a binary executable file.
If a system has all its state written to a disk (i.e ...
(this is important in cases where the running application needs to maintain its state as it migrates from host to host), while ''weak code mobility'' involves moving the code and the data only. Therefore, it may be necessary to restart the execution of the program at the destination host.
Several paradigms, or ''architectural styles'', exist within code mobility:
*
Remote evaluation — A client sends code to a remote machine for execution.
*
Code on demand — A client downloads code from a remote machine to execute locally.
*
Mobile agent
In computer science, a mobile agent is a piece of software agent combined with data that is able to migrate from one computer to another autonomously and continue its execution on the destination with the ability to interact with other agents ther ...
s — Objects or code with the ability to migrate between machines autonomously.
Viruses
Mobile code can also download and execute in the client workstation via email. Mobile code may download via an email attachment (e.g., macro in a Word file) or via an HTML email body (e.g., JavaScript). For example, the
ILOVEYOU
ILOVEYOU, sometimes referred to as the Love Bug or Loveletter, was a computer worm that infected over ten million Windows personal computers on 4 May 2000 and after 5 May 2000. It started spreading as an email message with the subject line "ILO ...
, TRUELOVE, and AnnaK emails viruses/worms all were implemented as mobile code (VBScript in a .vbs email attachment that executed in Windows Scripting Host). In almost all situations, the user is not aware that mobile code is downloading and executing in their workstation.
Renting code
Mobile code also refers to code "used for rent", a way of making software packages more affordable. i.e. to use on demand. This is specially relevant to the mobile devices being developed which are cellular phones, PDAs, etc. all in one. Instead of installing software packages, they can be "leased" and paid for on a per-usage basis.{{fact, date=January 2019
See also
*
Code on demand
*
Mobile agent
In computer science, a mobile agent is a piece of software agent combined with data that is able to migrate from one computer to another autonomously and continue its execution on the destination with the ability to interact with other agents ther ...
*
Remote evaluation
References
Distributed computing architecture
Types of malware