Debugging Remote Services Developed on the Cloud

Debugging Remote Services Developed on the Cloud

Debugging Remote Services Developed on the Cloud M. Subhi Sheikh Quroush and Tolga Ovatman Department of Computer Engineering, Istanbul Technical University, Maslak, 34469, Istanbul, Turkey Keywords: Cloud based Development, Remote Service Debugging, Record/ Replay Debugging. Abstract: Cloud based development platforms are getting more widely used as the cloud services become more available and the performance of such platforms increase. One of the key issues in providing a cloud based development platform is to enable the developers to debug their code just as efficiently and effectively as they would perform in a desktop IDE development session. However, especially if the development of a remote service is being carried out, the debugging client and the server running the actual code is separated, disclosing many problems which are not present in a usual debugging session. This paper proposes a record/replay approach to deal with the problems of remote debugging. To keep the communication overhead of the proposed approach as small as possible,the debugger saves the variable values only for external data access such as getting the data from a database query or a web service call. The proposed approach is integrated to a real world cloud based development platform and the run-time overhead is measured on real world case studies to demonstrate the usefulness of the approach. 1 INTRODUCTION playing the erroneous flow of the remote service with the erroneous variable values. Continuous shift in modern software development ac- We also measure the overhead presented by our tivities towards cloud environments and the expan- approach and present a lightweight version of the ap- sion of the software ecosystem that uses remote ser- proach where we significantly decrease the amount vices has made the remote debugging of web soft- of overhead by only recording the variable evalua- ware a more appealing challenge. Developers use and tions that are affected by external data access like a develop their own remote services in various differ- database query. Variable evaluations that were deter- ent purposes while developing web based software. mined solely by program flow are left to be calculated However debugging of the in house developed client- by the client instead of being recorded at the server server web service interaction is cumbersome since it side, reducing the amount of additional information requires an interactive tracking session where the de- to be stored by the remote debugging engine. veloper needs to watch remote but yet interdependent In the past, a vast amount of work have been per- variables and control flows. formed on debugging web services and web applica- One way to ease such a challenge for the devel- tions. We have adopted the interactive record/replay oper is to be able to record and replay the erroneous approach presented in the work of Brian Burg et al. flows that has been triggered by the remote calls to where (Burg et al., 2013) a user interface is used for the web service including the variable values. In de- capturing and replaying web application executions. bugging such errors developers dig into the error logs In our study we have shifted the focus on the applica- performing a postmortem analysis which becomes a bility of the approach on web services being used in a needle in a haystack problem most of the time. cloud based platform. In this paper we present an approach for helping The rest of the paper is organized as follows: in the developer initiate and track a remote debugging Section 2 we present our remote debugging approach. session by being able to record and replay the errors Section 3 presents the overhead generated by apply- that were triggered by the web service call. During the ing the remote debugging approach presented. Sec- recording session we record the local variable values tion 4 discusses the related work in the literature and and replies from the database calls which in turn en- we conclude our studies and present future work in ables the developer to run a debugging session by re- Section 5. 426 Quroush, M. and Ovatman, T. Debugging Remote Services Developed on the Cloud. In Proceedings of the 8th International Conference on Cloud Computing and Services Science (CLOSER 2018), pages 426-431 ISBN: 978-989-758-295-0 Copyright © 2018 by SCITEPRESS – Science and Technology Publications, Lda. All rights reserved Debugging Remote Services Developed on the Cloud Figure 1: Architectural representation of the remote debugging approach. 2 REMOTE DEBUGGING state in the server at each state. This extra debugging APPROACH information that is being saved can be controlled by the developer. By default, the web service debugger In our study, we integrated our remote debugging ap- does not perform any state recording. The developer proach to a target cloud platform that enable users to can choose ’minimal recording’ or ’full recording’ to develop web applications on the web browser1. The set the amount of state information to be saved by the developer can define the data model (the entities and debugging engine as seen in Figure 2. the fields) and also she/he can design the web pages After fixing the bug, the developers need a tool of the application. The target platform also lets user to help them to make sure that the issue is solved by to develop the behavior associated with the web el- the fix. In our approach, the developer can use the ements using MVEL scripting language (Brock and saved input values that causes the error and re-run the various contributors, ) as well as developing their own program with the saved values and debug the code web services. again to make sure that the code is working after the MVEL has largely been inspired by the Java syn- fix. tax, but has some fundamental differences aimed at making it more efficient as an expression language, 2.1 Full Recording such as operators that directly support collections, ar- rays and string matching, as well as regular expres- When the developer chooses full recording, the re- sions. MVEL is used to evaluate expressions written mote debugging engine running on the the server will using Java syntax. execute the web service by storing the variable evalu- The components and the typical information flow ations during assignment statements. Variable evalu- during a remote debugging session can be seen in Fig- ations will be stored as tuples containing line number ure 1. Remote debugging components let the devel- of the assignment, the variable name and its value. oper in the cloud platform to be able to execute and Hence, at any time the developer can choose and re- debug the MVEL script under development line by play the erroneous execution by selecting it from the line interactively on the server side. A sample devel- list of execution records as seen in Figure 2. opment session in the web client using MVEL scripts can be seen in Figure 2. For each debugging session, the execution engine By using remote debugging, the developer can use saves the requests that were sent by the client to the traditional debugging features such as breakpoints, server. The developer may replay the recorded de- stepping over, stepping inside a function. Moreover bugging session later by using the remote debugging since the state of the server is changed during the de- system. When the developer replays an execution, the bugging session, the debugging engine also saves the platform will get the saved data according to its time and display them in the variable table as seen in Fig- 1Imona Cloud:https://www.imona.com/ ure 3 427 CLOSER 2018 - 8th International Conference on Cloud Computing and Services Science Figure 2: Selecting the type of recording session and web service to be debugged. Bordered window on the right shows the list of recorded debugging sessions. At every step of the execution the debugging client effect of three different metrics: will update the variable values in the table and the cor- 1. m1: Number of database queries/service calls responding line will be highlighted. Even though full recording produces a significant amount of overhead 2. m2: Lines of Code (LOC) it might be necessary to store the whole environment 3. m3: Number of variables to be able to store the data retrieved by database query Our experimentation environment consists of a or a service call during the debugging session. client and a server machine that reside in the same local network to eliminate the latency introduced by 2.2 Minimal Recording network access. Client computer consists of 8 giga- bytes of memory and a 4 core 2.20 Ghz processor To reduce the amount of overhead presented by where server contains 32 GB memory and double 4 the approach the developer may select the minimal core 3.5 Ghz processors. The only application stack recording option. During minimal recording the plat- hosted by the server is debugged development envi- form will save the variable values only for external ronment server and a single developer runs the pro- data access such as getting the data from a database posed debugging approach at a time. MySQL 5.7 is query or a web service call. During replaying of a used in database operations required by the proposed debugging session with minimal recording, the lines debugging approach and the debugging application that contain external data access will be updated by is hosted as an add-on to the development platform the recorded history. Otherwise the related line will that is hosted in an Apache Tomcat 7.0.82 application be executed directly and the variable values will be server. updated from the execution result.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    6 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