8/14/2019 SOSE08
1/7
A Black-Box Strategy to Migrate GUI-Based Legacy Systems to Web Services
Bo Zhang, Liang BaoSoftware Engineering Institute
Xidian University, Xian 710071 China
[email protected], [email protected]
Abstract
While legacy systems are becoming incompatible with
evolving web service applications, migration of legacy sys-
tems towards service-oriented computing is arousing wide
concern for the purpose of salvaging the past investments
on those systems. In this paper, a black-box strategy is proposed to export customized interactive functionality of
legacy systems towards web services using a wrapping
methodology suitable to GUI-based legacy systems. Our
strategy also proposes a solution to deploy web services that
consist of interoperations between user and legacy systems
in a service-oriented architecture. Finally, a distributed
framework that executes web services and integrates graph-
ical user interfaces of legacy systems is presented.
1. Introduction
A legacy system is traditionally developed with a cen-
tralized, mainframe-based and non-extensible architecture,
representing a massive, long-term business investment.
However, the increasing interest in Service-Oriented Com-
puting (SOC) requires new access techniques for flexibly
exploiting legacy functionality as Web Services. While
other modernization approaches such as redeveloping an-
other system with new interfaces are either unacceptable or
too risky, a promising solution, legacy system migration,
intends to deploy the legacy system into a different comput-
ing environment, whereas reusing as much of the system as
possible, including implementation, design, interface, and
specification.Nowadays major incompatibility of legacy systems lies
in their obsolete non-extensible software architecture that
has hampered legacy systems from modernization evolve-
ments. In particular, many legacy systems are non-
decomposable as black boxes to users for commercial con-
sideration, making the modernization task even more chal-
lenging. Another very real concern stems from the fact
that technology and business requirements are constantly
changing. If the migration approach costs too much time
on reverse engineering of the legacy system, an organiza-
tion might find itself with a redeveloped system based on
obsolete technology that no longer meets its business needs.
Thus, a black-box migration strategy is expected that avoids
decomposing the legacy system and is also reusable for
all legacy systems. Additionally, migration of GUI-basedlegacy systems are also threatened with reengineering com-
plicated and indeterminate GUI interoperations between the
systems and random users. Theoretically, a key problem in
this domain is how to achieve a balance between the acces-
sibility of legacy interfaces and decoupling the migration
strategy from a specific legacy system.
As a matter of fact, a number of proposals on legacy
system migration have emerged in the literature. For ex-
ample, J. Bisbal states the issue of legacy system modern-
ization and defines several general solutions in the problem
domain with elaboration of their feasibilities. A black-box
approach is presents in [8] to migrate interactive legacy sys-tems towards Web Services based on a service wrapper us-
ing the Finite State Automaton theory [9]. Another service-
oriented approach is proposed in [28] to migrate legacy sys-
tems towards heterogeneous clients with service abstraction
and adaptation techniques. To the best of our knowledge, al-
most all the migration approaches coping with GUI-based
legacy migration are dependent on interface identification
and certain mapping techniques to a new platform that can-
not reuse the legacy interfaces.
In this paper, we propose a black-box strategy to migrate
a GUI-based legacy system towards Web Services. The
legacy interfaces are reused and integrated into our frame-
work to minimize coupling with a specific legacy systemand to avoid decomposing the internal components. To
make legacy applications accessible in a distributed net-
work, a Virtual Network Computing (VNC) [19] tool is em-
ployed and wrapped as a Web Service to remotely imple-
ment legacy functionality. Besides, a scripting language,
Lua [17], is also exploited to intelligently execute auxiliary
GUI operations on behalf of users. Due to the loose cou-
pling with legacy systems, the migration strategy can be ap-
8/14/2019 SOSE08
2/7
plied flexibly to most GUI-based legacy systems, and it has
already been validated on several mainstream tools.
As to the organization of the paper, section 2 describes
the migration approach with elaboration of the framework,
while section 3 presents a case study. Related works are
presented in section 4 and finally, in section 5, conclusion
and future works are discussed.
2 Migration Strategy
The migration strategy we propose is involved with a
hybrid of remote control and service wrapping techniques
as well as a dynamic scripting language. A framework is
implemented on the basis of Service-Oriented Architecture
(SOA). An overview of the architecture framework is pre-
sented as follows with elaboration of its core modules.
2.1 Architecture Overview
Figure 1 demonstrates a Service-Oriented Architecture
(SOA) that implements our black-box strategy to migrate
a GUI-based legacy system towards Web Services. The
framework logically contains a service provider and a ser-
vice requester. A service requester invokes and executes
Web Services from its local service container that a ser-
vice provider has published. Web Services are required to
be wrapped and deployed in service containers in advance.
A service wrapper is involved in each terminal in order to
guarantee that heterogeneous applications are accessible to
Web Services. In the problem domain of legacy system
modernization, key wrapping applications includes remote
control and GUI operation executions that are supported byVNC [19] and Lua [17] as is illustrated in Figure 1. The
composition service that is implemented by a BPEL [1] en-
gine serves as the initiator of migration, and also handles or-
chestration of other services. Auxiliary services such as file
listening are necessary during the migration process. The
control flow conducts the execution of Web Services on the
basis of network protocols and business process standards
such as SOAP, WSDL [27] and BPEL [1].
2.2 GUI Migration
In order to obtain the execution of a legacy system func-
tionality including GUI interoperations, a pressing and stub-born question to be addressed for migrating the legacy sys-
tem towards Web Services consists of providing accessibil-
ity of its graphical user interface into a distributed frame-
work that is typical of service-oriented architectures. In
contrast to previous works coping with migrations from
GUI-based legacy systems towards another set of interfaces
as in [8] and [28], the solution we propose contributes to
reuse and integrate the graphical user interfaces of legacy
Figure 1. Migration Architecture.
systems right into a service-oriented framework. Theoreti-
cally, the integration approach using a window embedding
technique is a thorough black-box reengineering task in
that not only the legacy system internals but also the GUI
components of the legacy system are ignored. Moreover,
according to our modernization approach, the demonstra-
tion of original legacy interfaces maintains system usability
and makes no difference to the experience of users.
To make a legacy system accessible as a Web Service, it
is required that its interface is adapted to the distributed in-
teraction paradigm of Web services. One major restriction
of legacy systems is that the legacy applications are isolated
and incompatible to be accessed remotely in the Internet.
Our solution to this issue is to provide remote control capa-
bility with Virtual Network Computing (VNC) technique.
2.2.1 Window Embedding
In this section, we integrate the graphical user interfaces
into our framework with window embedding technique that
is generally supported by API of mainstream operation sys-
tems. The windows of legacy systems that are supposed
to be embedded are firstly identified by their intrinsic char-
acteristics such as window captions or window class names,
and then they are embedded into a parent frame and perform
as child windows. Figure 2 illustrates a practical integration
where both Rational Rose and Computer Associates ER-
win are embedded into our framework as two GUI-based
legacy systems. According to our implementation, a cus-
tomized window organization for GUI display is supported
especially when multiple child windows are embeded.
2.2.2 Remote GUI Control
A significant problem in the modernization of legacy
systems is how to maintain interoperations between users
and legacy interfaces that are required to be reengineered
8/14/2019 SOSE08
3/7
Figure 2. Embedding Rose and ERWin.
and deployed in the Internet. Common techniques are of-
ten involved with decomposing and analyzing components
of legacy interfaces as in [8] and [13]. However, those tech-
niques will bring strong coupling between migration tools
and legacy systems with tremendous complexity attributed
to potential composition of interoperations in GUI-based
legacy systems, not to mention the difficulties in nondecom-
posable legacy sysems. Therefore, we propose Virtual Net-
work Computing (VNC) technique to share the accessibility
of GUI-based legacy systems with remote users. As is illus-
trated in Figure 3, a VNC tool consists of a server that shares
its authority of the operation system and a viewer that is au-
thorized to control the server. In a VNC connection, imagesof the server screen are compressed and transmitted to the
viewer, while control information of the viewer is transmit-
ted to the server to be remotely executed. Additionally, data
encryption is employed for network communication.
Figure 3. VNC Server and Viewer.
Figure 4 demonstrates a remote control of Microsoft Vi-
sual C++ by an open source tool called TightVNC that is
integrated into our framework. At present, TightVNC sup-
ports remote control between different operation systems
including Windows, Linux, etc.
Figure 4. Remote Access to Visual C++.
2.3 Lua Application of GUI Operations
On basis of practical and theoretical experience in the
problem domain, repetitive and verbose interoperations on
GUI-based legacy systems bring considerable burdens to
users. In this section, we propose to handle GUI opera-
tions with Web Services that can be executed on behalf of
users. In our reengineering approach of legacy system mi-
gration, GUI operations are executed with an improved Lua
[17] module that consists of a Lua interpreter, Lua scripts
and extended APIs, as shown in Figure 5. To begin with,
extended APIs are bound with the Lua interpreter. After
that, the interpreter is competent to execute Lua scripts that
invoke those extended APIs to implement GUI operations
automatically.
Figure 5. Lua Module.
2.3.1 Lua Interpreter Customization
Lua is a powerful, light-weight scripting language that is
designed to support both general procedural programming
with data description facilities and also object-oriented pro-
gramming. Lua scripts are driven by an interpreter that is
implemented as a library, written in ANSI C. Hence, APIs
8/14/2019 SOSE08
4/7
written in C or C++ are enabled to be bound with the Lua
interpreter in order to extend its functionality.
In the modernization task of executing GUI operations
with pieces of Lua code, auxiliary functions are augmented
to simulate human interoperations on legacy systems. Since
the interface of legacy systems are not available in a black-
box circumstance, the APIs integrated into the Lua inter-preter are oblivious of specified legacy interfaces, but rather
in terms of the operation system level, such as the window
embedding application mentioned above and applications
that call mouse and keyboard operations.
2.3.2 Lua Scripts
A Lua script involved in our framework is firstly loaded
and then executed by the Lua interpreter. Due to the flexi-
bility of Lua language, complicated logic of GUI operations
is supported intelligently with Lua scripts. Also, parameters
are enabled to be transmitted from the Lua interpreter intoLua scripts. Moreover, auxiliary APIs are introduced in Lua
scripts to implement GUI operations.
Figure 6 is a Lua script implementing the operations of
opening a given file in Rational Rose. The file name will
be transmitted into the script as a service parameter. The
function rcRun in line No.8 executes the path of Ratio-
nal Rose and embeds the Rose window into our framework.
Line No.19 simulates keyboard events of hotkey F and O to
invoke the open-file dialog. After the file name is inputed in
the dialog, an enter key is pressed to open the given file.
2.4 Service Wrapping
In this section, a wrapper is presented to guarantee that
all applications involved in the migration of legacy systems
are accessible to Web Services. Wrapped Services in our
framework consists of GUI operation services, VNC ser-
vices and other services shown above in Figure 1. Practi-
cally, the wrapper is associated with a Python engine. A
Web Service is wrapped as a Python script accessible to the
service container and a WSDL [27] file that describes the
interface and the location of the service.
2.4.1 GUI Operation Service
GUI operations are wrapped into Web Services that are
placed in a service container. As shown in Figure 7, a Lua
script that describes a set of GUI operations is required to
be identified by the service wrapper that generates a python
script and a WSDL [27] file. When the GUI operation ser-
vice is requested, the service container executes the python
script that invokes a Lua interpreter to execute the Lua
script.
Figure 6. A Lua Script.
Figure 8 demonstrates the implementation of GUI opera-
tion service wrapping. After a Lua script directory is given,
the script is validated and its parameters are identified if any.
At the end of the wrapping process, a python script file is
generated as shown in Figure 9. The python script is thecore entity of a Web Service in our implementation.
2.4.2 Remote Control Service
VNC software is required to be wrapped as a Web Ser-
vice to support remote control of GUI-based legacy sys-
tems. According to our implementation, the operation of
VNC connection is composed in a Lua script and wrapped
as a GUI operation service. To be specific, the VNC con-
necting operation mainly contains inputting the IP address
of the VNC server and pushing the confirming button. How-
ever, since VNC Tools such as TightVNC are open-source,
these operations can also be redeveloped as a specific WebService.
2.4.3 Other Services
Other services are necessary to enhance the migration
of legacy systems. One indispensable service is the com-
position service that orchestrates any other services, imple-
mented by a standard BPEL [1] engine. A file listening ser-
8/14/2019 SOSE08
5/7
Figure 7. GUI Operation Service.
vice is presented to listen given file and perform file trans-
mission between service providers and requesters in a net-
work.
3 Case Study
In this Section, a case study is presented to demonstrate
the feasibility of the proposed migration strategy. A practi-
cal migration scenario is devised where the involved GUI-
based legacy systems are Rational Rose and Computer As-
sociates ERwin. Rose is a well-known modeling software
that allows a user to design UML diagrams, while ERwin
aims at reverse engineering database models. Admittedly,
it is a black-box migration since neither of the two legacy
systems is decomposable.
In the proposed scenario, a user needs to design a classdiagram with Rose in the first place, and then he needs to
creat a database according to the class diagram using ER-
win. Unfortunately, neither of the two legacy systems is de-
ployed in the users machine. Therefore, both of the legacy
systems are required to be migrated to Web Services with
our black-box migration strategy, and then they are feasi-
ble to satisfy the users requirement. As shown in Figure
10, the user remotely controls the Rose VNC server to de-
sign a class diagram through a VNC connection. After that,
the class diagram is transmitted back to the user as a VNC
viewer, where the diagram is transformed into a SQL script
file. Finally, the SQL file is transmitted to another ER-
win server, and a Lua script will be involved to execute abatch of GUI operations automatically to create a datebase
according to the SQL script. The ERwin interactions are
supervised by the user via a VNC connection.
In reality, each action in Figure 10 is composed and exe-
cuted as a Web Service, driven by a standard BPEL engine
such as ActiveBPEL. Figure 11 illustrates the BPEL process
that orchestrates all necessary services in the scenario. Web
Services are deployed in distributed service containers that
Figure 8. GUI Operation Wrapping.
Figure 9. Wrapped Python Script.
are integrated in our framework. The practical performance
of legacy applications is similar to the demonstration in Fig-
ure 2, where the interfaces of Rose and ERwin are reused.
4 Related Works
The problem of Legacy System Modernization is not
novel in the literature, where a number of approaches can
be found. A taxonomy of Legacy System Modernization
techniques distinguishing between redevelopment, wrap-
ping and migration techniques is presented by [2], in that
redevelopment is unacceptably risky and wrapping is un-suitable, while migration is a feasible option.
From another perspective, legacy system modernization
techniques may also be subdivided into White Box and
Black Box families, where the first family is based on the
source code redevelopment, while the second one does not
require the analysis of the code as in [13].
As to the problem of migrating the interface of a legacy
system towards new platforms, most of them are white box
8/14/2019 SOSE08
6/7
Figure 10. Sequence Diagram of Service Exe-cution.
approaches, based on reverse engineering techniques that
aim at decomposing the legacy system and extracting its
interface components and application components through
code analysis as in [18, 15, 20].
In contrast with white-box approaches that can only be
implemented in very ideal cases, different is the approach
of black-box techniques that, instead of analyzing the ap-plication code, but considers the inputs and outputs during
the user interaction with the system to gain an understand-
ing of the system interfaces. Examples of these techniques
are described in [24] where an interface mapping method is
proposed for the reverse engineering of legacy system user
interfaces. This method is based on screen identification
and on the tracing of user interactions with the system. [14]
presents a black box reverse engineering approach for dy-
namic Web Applications based on hypertext markup lan-
guages.
As to the problem of exporting a legacy application to-
wards the web services world, a few proposals have been
presented in the literature. [28] proposes a reengineer-ing task to migrate legacy systems towards heterogeneous
clients with service abstraction and adaptation techniques.
Unfortunately, it belongs to the white box family that stems
from the legacy systems APIs. In contrast, a black-box
strategy is presented in [8] that exploits the theory of Finite
State Automaton to wrap legacy applications as Web Ser-
vices. However, a potential risk is that the feasibility of state
identification depends on the complexity of legacy inter-
Figure 11. BPEL Process.
faces. In extreme cases, state explosion may complicate the
migration issue into an NP complete problem. Moreover,
both of [8] and [28] cannot reuse the interface of legacy sys-
tems, and also imply a negative risk of excessive coupling
between legacy systems and resulting systems.
5 Conclusion and Future works
In this paper a migration strategy for exporting the func-
tionality implemented by a legacy System as a Web Service
has been presented. The approach is tailored for GUI-based
systems, whose interfaces are reused and integrated into a
service-oriented framework. A framework has been imple-
mented with the migration strategy based on the Service-
Oriented Architecture. A strength of this approach is the
service wrapper that encapsulates heterogeneous applica-
tions oblivious of the specific legacy system, making it a
black-box reusable implementation. In this way, the ap-
proach allows users to seamlessly interact with the GUI-
based legacy systems as before. Meanwhile, GUI opera-
tions can also be composed in a Lua script and be executedas a Web Service automatically.
Future work will be devoted to coping with concurrent
request of legacy applications and involved potential com-
petitions for exclusive accessibility. Since the legacy sys-
tems are very likely to be non-extensible, one possible so-
lution is to dynamically clone legacy applications for ser-
vice requesters. Another interesting future work will con-
sist of implementation of a GUI operation recorder that in-
8/14/2019 SOSE08
7/7
telligently identifies customized GUI operations into a Lua
script so as to facilitate the generation of Lua scripts.
References
[1] Business Process Execution Language for Web Services.http://www.ibm.com/developerworks/library/specification/ws-
bpel/, July 2002.
[2] J. Bisbal, D. Lawless, B.Wu, and J.Grimson. Legacy in-
formation systems: issues and directions. IEEE Software,
16(5):103111, Sept.-Oct. 1999.
[3] D. Bovenzi, G. Canfora, and A. Fasolino. Enabling legacy
system accessibility by web heterogeneous clients. In Pro-
ceedings of the 7th European Conference on Software Main-
tenance and Reengineering, pages 7381. IEEE, 2003.
[4] G. Canfora. Software evolution in the era of software ser-
vices. In Proceedings of 7th International Workshop on
Principles of Software Evolution, pages 918. IEEE, 2004.
[5] G. Canfora, A. Cimitile, F. Garcia, M. Piattini, and C. Visag-
gio. Performances of pair designing on software evolution:a controlled experiment. In Proceedings of 10th European
Conference on Software Maintenance and Reengineering,
page 8. IEEE, 2006.
[6] G. Canfora, A. Cimitile, A. D. Lucia, and G. D. Lucca. De-
composing legacy programs: A first step towards migrating
to client-server platforms. In Proceedings of 6th IEEE Inter-
national Workshop on Program Comprehension, pages 136
144. IEEE, 1998.
[7] G. Canfora, A. Fasolino, G. Frattolillo, and P. Tramontana.
A flexible wrapper for the migration of interactive legacy
system to web services. In Proceedings of 10th European
Conference on Software Maintenance and Reengineering,
page 2. IEEE, 2006.
[8] G. Canfora, A. R. Fasolino, G. Frattolillo, and P. Tramon-
tana. Migrating interactive legacy systems to web ser-
vices. In Proceedings of the 10th European Conference on
Software Maintenance and Reengineering, page 10. IEEE,
March 2006.
[9] G. Canfora, A. R. Fasolino, G. Frattolillo, and P. Tramon-
tana. A wrapping approach for migrating legacy system
interactive functionalities to service oriented architectures.
Journal of Systems and Software, 81(4):463480, Apr. 2008.
Elsevier Science Inc.
[10] G. Canfora, A. D. Lucia, and G. D. Lucca. An incremental
object-oriented migration strategy for rpg legacy systems.
International Journal of Software Engineering and Knowl-
edge Engineering, 9(1):525, Feb. 1999. World ScientificPublishing Company.
[11] K. Chan, Z. Cong, L. Liang, and A. Michail. Design recov-
ery of interactive graphical applications. In Proceedings of
the 25th international conference on Software engineering,
pages 114124. IEEE, 2003.
[12] A. Cimitile, U. D. Carlini, and A. D. Lucia. Incremental
migration strategies: Data flow analysis for wrapping. In
Proceedings of 5th IEEE Working Conference on Reverse
Engineering, pages 5968. IEEE, 1998.
[13] S. Comella-Dorda, K. Wallnau, R. Seacord, and J. Robert.
A survey of black-box modernization approaches for infor-
mation systems. In Proceedings of the International Confer-
ence on Software Maintenance, pages 173183. IEEE, Oc-
tober 2000.
[14] D. Draheim, C. Lutteroth, and G. Weber. A source code in-
dependent reverse engineering tool for dynamic web sites.
In Proceedings of Ninth European Conference on Software
Maintenance and Reengineering, pages 168177. IEEE,
2005.
[15] Y. Gaeremynck, L. Bergman, and T. Lau. More for less:
Model recovery from visual interfaces for multi-device ap-
plication design. In Proceedings of the 8th ACM Int.Conf.
on Intelligent User Interfaces, pages 6976. IEEE, 2003.
[16] R. Ierusalimschy. Programming in Lua. Lua.org, 2nd edition
edition, 2006.
[17] R. Ierusalimschy, L. de Figueiredo, and W. Celes. Lua 5.1
Reference Manual. Lua.org, 2006.
[18] E. Merlo, P. Gagn, J. Girard, K. Kontogiannis, L. Hendren,
P. Panangaden, and R. D. Mori. Reverse engineering and
reengineering of user interfaces. IEEE Software, 12(1):64
73, 1995.[19] T. Richardson, Q. Stafford-Fraser, K. Wood, and A. Hopper.
Virtual network computing. IEEE Transactions on Internet
Computing, 2(1):3338, Jan-Feb 1998.
[20] S. Rugaber. A tool suite for evolving legacy software. In
Proceedings of IEEE International Conference on Software
Maintenance, pages 3339. IEEE, 1999.
[21] H. Sneed. Accessing legacy mainframe applications via the
internet. In Proceedings of 2nd International Workshop on
Web Site Evolution, pages 3446. IEEE, 2000.
[22] H. Sneed and S. Sneed. Creating web services from legacy
host programs. In Proceedings of the 5th IEEE International
Workshop on Web Site Evolution, pages 5965. IEEE, 2003.
[23] H. Sneed and S. Sneed. Reverse engineering of system inter-
faces a report from the field. In Proceedings of 13th WorkingConference on Reverse Engineering, pages 125133. IEEE,
2006.
[24] E. Stroulia, M. El-Ramly, L. Kong, P. Sorenson, and
B. Matichuk. Reverse engineering legacy interfaces: An
interaction-driven approach. In Proceedings of the Sixth
IEEE Working Conference on Reverse Engineering, pages
292302. IEEE, 1999.
[25] E. Stroulia, M. El-Ramly, and P. Sorenson. From legacy to
web through interaction modeling. In Proceedings of Inter-
national Conference on Software Maintenance, pages 320
329. IEEE, 2002.
[26] S. Tilley, J. Gerdes, T. Hamilton, S. Huang, H. Muller, and
K.Wong. Adoption challenges in migrating to web services.
In Proceedings of the 4th International Workshop on WebSite Evolution, page 21C29. IEEE, 2002.
[27] World Wide Web Consortium, http://www.w3.org/TR/wsdl.
Web Service Description Language (WSDL) 1.1, January
2006.
[28] U. Zdun. Reengineering to the web: A reference archi-
tecture. In Proceedings of 6th European Conference on
Software Maintenance and Reengineering, pages 164173.
IEEE, March 2002.
Recommended