19
[ICWE’19 Doctoral Symposium] Facilitating the Evolutionary Modifications in Distributed Apps via Automated Refactoring Software Innovations Lab Department of Computer Science Virginia Tech Ph.D Candidate Kijin An (advisor: Eli Tilevich)

Facilitating the Evolutionary Modifications in Distributed ...web.geni-pco.com/...Modifications_in...Refactoring.pdfevolutionary modifications in distributed applications Novel, domain-specific

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Facilitating the Evolutionary Modifications in Distributed ...web.geni-pco.com/...Modifications_in...Refactoring.pdfevolutionary modifications in distributed applications Novel, domain-specific

[ICWE’19 Doctoral Symposium]

Facilitating the Evolutionary Modifications in Distributed Apps via Automated Refactoring

Software Innovations LabDepartment of Computer ScienceVirginia TechPh.D Candidate

Kijin An(advisor: Eli Tilevich)

Page 2: Facilitating the Evolutionary Modifications in Distributed ...web.geni-pco.com/...Modifications_in...Refactoring.pdfevolutionary modifications in distributed applications Novel, domain-specific

Evolutionary Modifications

2

Software Applications(Released Version)

CorrectiveModifications

Adaptive Modifications

Page 3: Facilitating the Evolutionary Modifications in Distributed ...web.geni-pco.com/...Modifications_in...Refactoring.pdfevolutionary modifications in distributed applications Novel, domain-specific

Evolutionary Modifications

3

CorrectiveModifications

Adaptive Modifications

Server

Distributed Web Applications:Remote Execution, Middleware

Page 4: Facilitating the Evolutionary Modifications in Distributed ...web.geni-pco.com/...Modifications_in...Refactoring.pdfevolutionary modifications in distributed applications Novel, domain-specific

Evolutionary Modifications

4

CorrectiveModifications

Adaptive Modifications

Server

Distributed Web Applications

Modifyingdistributed programsis much harder thancentralized programs...

Page 5: Facilitating the Evolutionary Modifications in Distributed ...web.geni-pco.com/...Modifications_in...Refactoring.pdfevolutionary modifications in distributed applications Novel, domain-specific

Client Insourcing Refactoring

5

Server(netw

ork)

Server Part

Client Part

CentralizedVersion

≡Client InsourcingRefactoring

(Equivalent Variant)For easy evolutionary Changes

Page 6: Facilitating the Evolutionary Modifications in Distributed ...web.geni-pco.com/...Modifications_in...Refactoring.pdfevolutionary modifications in distributed applications Novel, domain-specific

Client Insourcing Refactoring

6

Server(netw

ork)

Server Part

Client Part

CentralizedVersion

≡Modifications

Server Part

Client Part

Client InsourcingRefactoring

(Equivalent Variant) (Changed)

Page 7: Facilitating the Evolutionary Modifications in Distributed ...web.geni-pco.com/...Modifications_in...Refactoring.pdfevolutionary modifications in distributed applications Novel, domain-specific

Research Approach

7

▪ New approach that facilitates a large class of evolutionary modifications in distributed applications

▪ Novel, domain-specific automated refactoring—Client Insourcing—that moves remotely executed functionalities to be executed locally, thereby creating a semantically equivalent centralized version of the distributed application.

▪ A centralized equivalent of a distributed application can serve as a faithful surrogate for various maintenance and evolutionary tasks

Page 8: Facilitating the Evolutionary Modifications in Distributed ...web.geni-pco.com/...Modifications_in...Refactoring.pdfevolutionary modifications in distributed applications Novel, domain-specific

8

CorrectiveMaintenance

SandBoxing

(Rem

ote

Invo

catio

n) Debugging

Trusted Execution

DisconnectedExecutionReplication

IsolatedPerf. Profiling

“Centralized”

Client

Server

middleware

middleware

Client Insourcing (Client)

(Server)

Others

AdaptiveMaintenance

Applicability to Evolutionary Tasks

Page 9: Facilitating the Evolutionary Modifications in Distributed ...web.geni-pco.com/...Modifications_in...Refactoring.pdfevolutionary modifications in distributed applications Novel, domain-specific

9

CorrectiveMaintenance

SandBoxing

(Rem

ote

Invo

catio

n) Debugging

Trusted Execution

DisconnectedExecutionReplication

IsolatedPerf. Profiling

Client

Server

middleware

middleware

Client Insourcing

Others

AdaptiveMaintenance

Applicability to Evolutionary Tasks

ServerCodeClient

CodeDistributedApp (Buggy)

DebuggingIn Centralized.

Client Insourcing

(Fixed)Server Code

(Fixed)Client Code

ReplayFixes

DistributedApp (Fixed)

(Client)

(Server)

Page 10: Facilitating the Evolutionary Modifications in Distributed ...web.geni-pco.com/...Modifications_in...Refactoring.pdfevolutionary modifications in distributed applications Novel, domain-specific

10

CorrectiveMaintenance

SandBoxing

(Rem

ote

Invo

catio

n) Debugging

Trusted Execution

DisconnectedExecutionReplication

IsolatedPerf. Profiling

Client

Server

middleware

middleware

Client Insourcing

Others

AdaptiveMaintenance

Applicability to Evolutionary Tasks

ServerCodeClient

CodeDistributedApp (Untrusted)

Adapting toTrusted Env.

Client Insourcing Redistribution

(Client)

(Server)

T

T DistributedApp (Trusted)

T

Page 11: Facilitating the Evolutionary Modifications in Distributed ...web.geni-pco.com/...Modifications_in...Refactoring.pdfevolutionary modifications in distributed applications Novel, domain-specific

11

CorrectiveMaintenance

SandBoxing

(Rem

ote

Invo

catio

n) Debugging

Trusted Execution

DisconnectedExecutionReplication

IsolatedPerf. ProfilingClient

Server

middleware

middleware

Client Insourcing

Others

AdaptiveMaintenance

Applicability to Evolutionary Tasks

ServerCodeClient

CodeDistributedApp (remote only)

Replication/Exe. Policy

Client Insourcing

(Client)

(Server)

RedistributionRemote Exec.(Good Network)

ServerCode

Client CodeLocal Exec.(Faulty Network)

DistributedApp (remote /local exe)

Page 12: Facilitating the Evolutionary Modifications in Distributed ...web.geni-pco.com/...Modifications_in...Refactoring.pdfevolutionary modifications in distributed applications Novel, domain-specific

12

CorrectiveMaintenance

SandBoxing

(Rem

ote

Invo

catio

n) Debugging

Trusted Execution

DisconnectedExecutionReplication

IsolatedPerf. Profiling

“Centralized”

Client

Server

middleware

middleware

Client Insourcing (Client)

(Server)

Others

AdaptiveMaintenance

Applicability to Evolutionary Tasks

Page 13: Facilitating the Evolutionary Modifications in Distributed ...web.geni-pco.com/...Modifications_in...Refactoring.pdfevolutionary modifications in distributed applications Novel, domain-specific

Progress so far

13

▪ Client Insourcing & Debugging for Full-stack JS Apps▪ ICWE’19, K.An and E.Tilevich (to be presented tomorrow)▪ Distributed Apps written by same Language, JavaScript!

JSBuggy JSFull-Stack App

JS(Remote Services)

Fixed JS Full-Stack App

JS

GNUPatchCandoR

(ICWE’19)

Client Insourcing & Debugging

JS

Page 14: Facilitating the Evolutionary Modifications in Distributed ...web.geni-pco.com/...Modifications_in...Refactoring.pdfevolutionary modifications in distributed applications Novel, domain-specific

Progress so far

14

▪ Trust Execution for Real-time Apps▪ GPCE’18, Y. Liu, K. An and E. Tilevich

Annotate

LLVM Pass

Partition

IR-based Analysis & Transformation

Generate IR

RT applications

Normal world(host)

Secure world(ta)

Page 15: Facilitating the Evolutionary Modifications in Distributed ...web.geni-pco.com/...Modifications_in...Refactoring.pdfevolutionary modifications in distributed applications Novel, domain-specific

Progress so far

15

▪ Source-to-Source Translation with Rule Inference▪ MobileSoft’18, K. An , N. Meng, and E. Tilevich

portingiOS

(Swift)Android(java)

Ported Cross-platform Apps

Code Differencing with language agnostic features

Inference Table

New ExamJava Code

TranslatedSwift Code

Page 16: Facilitating the Evolutionary Modifications in Distributed ...web.geni-pco.com/...Modifications_in...Refactoring.pdfevolutionary modifications in distributed applications Novel, domain-specific

Remaining work

16

▪ Extend to Multilingual Distributed Apps▪ Take advantage of Full-Stack JS apps:▪ Lower maintenance costs (JS everywhere); same tools

for the backend and frontend parts

JavaScriptServer

(JavaScript:Node.js)

Server(Java:Spring)

Original

Adapted

Migration

Page 17: Facilitating the Evolutionary Modifications in Distributed ...web.geni-pco.com/...Modifications_in...Refactoring.pdfevolutionary modifications in distributed applications Novel, domain-specific

Remaining Work: Conceptual Challenges

17

▪ Bridging semantic differences between client and server languages (i.e., Java vs. JS)

▪ Emulating standard server language libraries and frameworks in the insourced code

▪ Ensuring requisite performance characteristics in redistributed code

▪ Multi-tier architecture. (i.e. Database)

Page 18: Facilitating the Evolutionary Modifications in Distributed ...web.geni-pco.com/...Modifications_in...Refactoring.pdfevolutionary modifications in distributed applications Novel, domain-specific

Evaluation Plan

18

▪ RQ1. Client Insourcing Value, Correctness, and Applicability: How much programmer effort does Client Insourcing save?

▪ RQ2. Applicability to Facilitating Evolutionary Modifications: What kind of evolutionary tasks can be facilitated by Client Insourcing?

▪ RQ3. Maintaining Semantic Equivalence in the Presence of Client Insourcing Enhanced with Language Translation: How feasible is it to maintain the business logic of a distributed multilingual application by transforming it into a centralized monolingual application?

Page 19: Facilitating the Evolutionary Modifications in Distributed ...web.geni-pco.com/...Modifications_in...Refactoring.pdfevolutionary modifications in distributed applications Novel, domain-specific

Conclusions, Future Work, and Q&A

19

▪ I have described my dissertation research, concerned with the challenges of evolving distributed apps to meet the continuously changing requirements

▪ My research puts forward a radical notion that a centralized equivalent can serve as a faithful proxy of a distributed apps for software evolution tasks

▪ As a future work direction, we plan to generalize our approach to multilingual and multi-tier (database) applications