基于ASPNET的個人博客網(wǎng)站設(shè)計與實現(xiàn) 外文翻譯_第1頁
基于ASPNET的個人博客網(wǎng)站設(shè)計與實現(xiàn) 外文翻譯_第2頁
基于ASPNET的個人博客網(wǎng)站設(shè)計與實現(xiàn) 外文翻譯_第3頁
基于ASPNET的個人博客網(wǎng)站設(shè)計與實現(xiàn) 外文翻譯_第4頁
基于ASPNET的個人博客網(wǎng)站設(shè)計與實現(xiàn) 外文翻譯_第5頁
已閱讀5頁,還剩14頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)

文檔簡介

1、外文文獻資料(外文文件名: JSP Splitting for Improving Execution Performance)AbstractSplitting a JSP (Java Server Pages) page into fragments can improve the execution performance of JSP pages when the Web application server can separately cache the Web page fragments obtained by executing the JSP fragments. If a

2、 JSP page is split into fragments according to the update frequency of each portion of the Web page obtained by executing the JSP page, all of the split JSP fragments do not need to be executed again when only a single cached part of a Web page expires. In addition, the fragments of a JSP page can b

3、e reused by other JSP pages. In both cases, the execution results of all of the JSP fragments split from the JSP page must be the same as from the JSP page before it was split. In this paper, we propose JSP splitting, which is a method of splitting a JSP page into fragments maintaining the data and

4、control dependences existing in the original JSP page. JSP splitting automatically detects the portions needed to maintain the data and control dependences of a JSP page for the portions that developers want to split from the JSP page. We implemented JSP splitting with a GUI tool, and confirmed that

5、 the split JSP fragments were executed in the same as the way as the JSP page before the split. Experimental results show that the response time to access a Web page can be reduced by splitting a JSP page into fragments and setting different caching periods for the Web page fragments obtained by exe

6、cuting the JSP fragments.1. IntroductionSplitting a JSP (Java Server Pages) page into fragments can improve the execution performance of some JSP pages when the Web application server can separately cache the Web page fragments obtained by executing the fragments of the JSP page. The period of cachi

7、ng dynamic Web pages generated by a JSP engine is limited due to the dynamic nature of the content. When the cached content of a Web page generated by a JSP engine is updated, the entire JSP page must be executed again on the application server, even though the change of the Web page might be small.

8、 Since frequent updates of cached Web pages increase the load on an application server, it is reasonable to split a JSP page into fragments and set different caching periods for the Web page fragments obtained by executing the JSP fragments. Of course, the Web page fragments must be merged into a fi

9、nal Web page correctly. The Dynacache technology of IBM WebSphere Application Server allows Web page fragments to have different caching periods. Cache tag libraries provided by the Apache Jakarta Project also support different caching periods for the JSP fragments. In addition, ESI (Edge Side Inclu

10、des) technology provides a mechanism to cache Web page fragments with different caching periods, and to merge them into a final Web page on an edge server.The application offload technology of IBM WebSphere Edge Server is another approach to improve the execution performance of JSP pages. This techn

11、ology allows one or more JSP fragments to be cached and executed on edge servers. The remaining JSP fragments are deployed on the application server and are called by the JSP fragments executed on the edge server. Thus, some of the execution of a JSP page is offloaded to the edge server. Splitting a

12、 JSP page facilitates the reuse of JSP fragments. When a Web application consists of many JSP pages, the same portions tend to exist in many JSP pages. Examples are the frames, the banners, the headers, and etc. When a JSP page is split into fragments, the total execution result of all of the fragme

13、nts must be the same as the JSP page before it was split. In addition, when the fragments of a JSP page are executed in different servers, each fragment needs to be executed without the other fragments. In order to satisfy these conditions, we propose JSP splitting, which is the method of splitting

14、a JSP page into fragments described in this paper. Since it is very difficult to automatically find the best way to split a JSP page into fragments for some particular purpose, we assume that the developers will select the portions that they want to split into fragments. In order to execute all of t

15、he divided JSP pages correctly, JSP splitting automatically detects any portions that must be moved or copied into a fragment with the selected portions. The detection is done based on the analysis of the data and control dependences existing in a JSP page. JSP splitting is similar to the program sl

16、icing technique that slices a program based on the data and the control dependences. However, the program slicing technique does not take into account that the sliced programs are executed independently and that the total execution result of the sliced programs must be the same as the program before

17、 the division. In addition, since data is passed to the JSP engine during the execution of JSP pages, the source program of the JSP engine, such as Apache Tomcat, is required in order to analyze the data dependences correctly. This is impractical, because the source program of the JSP engine is very

18、 large and complex. JSP splitting avoids the analysis of the JSP engine by utilizing the characteristics of JSP. The rest of the paper is organized as follows. Section 2 explains the difficulty of splitting a JSP page into fragments. Section 3 gives details of the algorithmto split a JSP page. Secti

19、on 4 describes the JSP splitting tool that is an implementation of JSP splitting and demonstrates how a sample JSP page is split by the tool. Section 5 shows the experimental results obtained by executing the split JSP fragments with different caching periods on the IBM WebSphere Application Server.

20、 Section 6 discusses previous work in relation to our contributions. Our conclusions form the final section.2. Difficulty of Splitting a JSP PageIn this paper, splitting a JSP page means that some portions of the JSP page are cut from the JSP page and saved as new JSP pages. Such newly created JSP p

21、ages are included in the original JSP page by using some mechanism such as the jsp: include tag. We call the included JSP page the JSP fragment, and call the JSP page that invokes the JSP fragments the master JSP page. A master JSP page invokes JSP fragments and receives Web page fragments obtained

22、by executing them. Then the master JSP page merges its own Web page fragment with the Web page fragments received from the JSP fragments, and creates a final Web page. JSP fragments are not always executed in the same server or at the same time. The application offload technology allows a master JSP

23、 page and JSP fragments to be executed in different servers. When the ESI mechanism is used, esi: include tags are put into a Web page fragment obtained by executing a master JSP page and interpreted in an edge server that supports the ESI mechanism. In this case, the edge server checks whether or n

24、ot the Web page fragments specified by esi:include tags exist in its cache. If the contents of Web page fragments are not cached or have expired, the JSP fragments are invoked from the edge server, and executed in one or more application servers. If different caching periods can be given to the Web

25、page fragments obtained by executing the JSP fragments, each JSP fragment is executed only when the cached content has expired. The Dynacache technology, the ESI mechanism, and the cache tag libraries can support different caching periods for Web page fragments. When a JSP page is split into fragmen

26、ts, the following two conditions must be satisfied even if the master JSP page and the JSP fragments are not executed in the same server or at the same time. Cond. 1 - 1 The total execution result of a master JSP page and the JSP fragments is the same as the JSP page before it was split.Cond. 1 - 2

27、Each JSP page, which is either a master JSP page or a JSP fragment, may be executed without other JSP pages. These conditions are satisfied by maintaining the data and control dependences existing in a JSP page after the JSP page has been split into fragments. However, it is hard work for developers

28、 to detect data and control dependent portions in a JSP page, because the data and control flow of a JSP page can be divided among the JSP page, the JSP engine that executes the JSP page, any Java beans used in the JSP page, and etc. Thus, a natural solution calls for automatically detecting data-de

29、pendent and control-dependent portions linked to the portions that developers want to split. The program slicing technique detects a set of program statements that affect a program statement S by analyzing the data and control dependences existing in the program. One program slice consists of the de

30、tected set of program statements and the statement S. This technique is useful when debugging or maintaining large programs. Since JSP pages are compiled into servlet programs by using a JSP compiler such as the Apache Jasper compiler 4, JSP slices can be obtained by applying program slicing techniq

31、ue to a servlet program compiled from a JSP page. However, the program slicing technique is not sufficient to split a JSP page into fragments, because the technique does not take into account that program slices are executed independently.Figure 1 shows a part of a sample JSP page and a sample servl

32、et program compiled from the JSP page. Figure 2 (a) shows the data dependence graph obtained from the servlet program. In a program, when a statement S1 assigns a value to a variable and a statement S2 following S1 uses that value, a true data dependence exists between S1 and S2. Such a data depende

33、nce is denoted as S1 à S2. In Figure 2 (a), due to the data dependences, the program slice for the statement S10 consists of S1, S9, and S10. If the program slice is cut from the servlet program, the remaining program statements have errors because the data dependences S1 à S2, S11, and S1

34、2 and S9 à S11 and S12 are not honored. Thus, the program slicing technique does not work well for splitting JSP pages.3. JSP SplittingIn this paper, we propose JSP splitting, a method of splitting a JSP page into fragments. The proposed method analyzes data and control dependences in the servl

35、et program compiled from a JSP page. At the time of analysis, JSP splitting takes into account that split JSP pages will be executed independently, and may not be executed in the same server or at the same time. First, the portions that developers want to split into a JSP fragment are selected. For

36、the selected portions, the portions needed to satisfy the conditions 1 - 1 and 1 - 2 are detected. The detected portions are categorized into moved and copied portions, and are minimized in order to match the intentions of the developers.3.1. Ignorable Data DependencesBasically, JSP splitting does n

37、ot allow the dependent statements to be split apart. However, if this rule is applied too strictly, none of the statements shown in Figure 1 (b) can be split, because there are interlocking dependences starting from S1 and S9. Here, we consider how the variable out shown in Figure 1 (b) is used. The

38、 variable out is used to write the text data of any Web page. Note that the value of out can be retrieved from any JSP engine. When a master JSP page JM includes a JSP fragment JF by using a jsp:include tag and a JSP engine executes both of them, JM first retrieves the value of out from the JSP engi

39、ne and writes its own text data to the value. Next, JM invokes JF. After being invoked, JF also retrieves the value of out and writes its own text data to the value. The text data written by JM is returned to out through the JSP engine and merged with the text data written by JM. This means that the

40、 value of out can be utilized by any JSP page and the text data written to the value is maintained by the JSP engines. In other words, when a JSP page is split into fragments, a statement that retrieves the value of out can exist both in a servlet program compiled from a master JSP page and in servl

41、et programs compiled from JSP fragments. Therefore, the data dependences for the variable out can be ignored at the time of splitting a JSP page.As shown in Figure 2 (a), none of the statements can be split while maintaining the data dependences existing in the servlet program shown in Figure 1 (b).

42、 However, if the data dependences for the variable out are ignored, the data dependence graph is changed as shown in Figure 2 (b). Using the data dependence graph shown in Figure 2 (b) makes it possible to split S2 from the set of S9, S10, S11, and S12 which cannot be split due to the data dependenc

43、es for the variable book.In servlet programs compiled by the Apache Jasper compiler, the data dependences for the variables shown in Table1 can be ignored for the same reason as for the variable out.Since the values of these variables are defined at the top of each servlet program and are frequently

44、 referred to, most statements cannot be split if the data dependences are to be maintained.In general, the out-of-order execution is allowed for the statements without data and control dependences. Ignoring the data dependences for the variables shown in Table 1 may introduce an incorrect execution

45、order of statements. For example,if S10 and S12 shown in Figure 1 are split into a JSP fragment and the JSP fragment is included before S11, an incorrect Web page is generated. In order to avoid such incorrect execution, our algorithm does not allow changes in the order of the statements that have i

46、gnored data dependences.3.2. Analysis of Data Dependences for Java beansIn a JSP page, Java beans are frequently used to store and retrieve data as property values. Each Java bean is a Java object and developers can use Java beans by using three kinds of tags in a JSP page. jsp:useBean: Declares a n

47、amed Java bean with its scope. When an object for the Java bean does not exist within the declared scope, the bean is instantiated. Java beans can be declared with the scope of page, request,session or application. jsp:getProperty: Calls the get method of a Java bean object and retrieves the propert

48、y value. jsp:setProperty: Calls the set method of a Java bean object and sets the property value.Java beans must be declared with the jsp:useBean tag before the other two operations. This means that a declaration of a Java bean and all of the other operations for the Java bean must be included in th

49、e same JSP page. This strongly limits the extent of a JSP fragment. In order to relax the limitation, JSP splitting allows declarations of Java beans to be copied to JSP fragments. The reason why declarations of Java beans can be copied is that the declarations do not have side effects. Each declara

50、tion merely instantiates a Java bean object when the Java bean object has not yet been instantiated within its scope. In other words, a Java bean object is not instantiated more than one time within its scope even if the declaration is copied to JSP fragments. Therefore, some of the operations for a

51、 Java bean can be split into fragments.When a property value is set for a Java bean by using a jsp:setProperty tag and retrieved from the JSP bean by using a jsp:getProperty tag, a true data dependence exists between the two operations.When the rule that data dependent statements cannot be split is

52、applied, data dependent operations for a Java bean must be included in the same fragment. However, a data dependence between an operation that sets a property value for a JSP bean and another operation that retrieves the property value is maintained after the two operations are split if the followin

53、g two conditions are satisfied.Cond. 2 - 1 The scope of the Java bean is ”request”, ”session”, or ”application”.Cond. 2 - 2 The split JSP pages are executed in the same JSP engine.If these conditions are satisfied, JSP splitting allows the operations among which the data dependences exist to be spli

54、t into different JSP pages, because the Java bean lives in the JSP engine during the execution of the split JSP pages. As a result, the portions split along with the portions selected by a developer can be reduced. However, the Web page fragments obtained by executing the split JSP pages satisfying

55、these conditions must have the same caching period. This is because the data dependence is not maintained if a JSP page was executed and a value is defined in the JSP page while another JSP page, in which the defined value is used, was not executed due to the valid cached content of the Web page.Whe

56、n a Java bean has the page scope, the dependent operations for the Java bean cannot be split. However, each operation that sets a property value for a Java bean with the page scope can be copied along with one or more operations that retrieve the same property value, because the operations that set

57、property values for Java beans with the page scope do not have side effects.Figures 3 to 6 show the algorithms to split the operations for Java beans. These algorithms try to minimize the number of the operations that are moved or copied to a JSP fragment.4. JSP Splitting ToolWe implemented JSP spli

58、tting as a plug-in for Eclipse。Figure 7 shows the architecture of the JSP splitting tool. The JSP splitting editor presents the source view and the outline view of a JSP page. Developers select the portions that they want to split using either the editor or the outline. After the portions are select

59、ed by developers, the moved and copied portions are displayed in a dialog with the selected portions. All of the portions are put into a new JSP page specified by developers, and the moved portions are replaced with the <jsp:include> tag in the original JSP page.When the editor is invoked with a JSP page, the data and control dependences existing in the JSP page are analyzed. First, the JSP compiler, which is based on the Apache Jasper compiler, compiles a JSP

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論