已閱讀5頁(yè),還剩20頁(yè)未讀, 繼續(xù)免費(fèi)閱讀
版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
畢業(yè)設(shè)計(jì)(論文)外文資料翻譯學(xué)生姓名: 李昕 學(xué) 號(hào): 1405080411 所在學(xué)院: 電子與信息工程學(xué)院 專 業(yè): 計(jì)算機(jī)科學(xué)與技術(shù) 指導(dǎo)教師: 劉學(xué)軍 2011年 12月 25 日English Data Original TextTranslates the foreign materials: Author: Jayakrishnan Ramdas(), Senior Technology Architect, Infosys LTD J. Srinivas(), Principal Architect, Infosys LTD Book title (or paper topic): Extend Java EE containers with cloud characteristics Publishing house (or publication name): /developerworks/cloud/library Publication time (or registration number): august 2011Extend Java EE containers with cloud characteristicsStrategies and patterns to extend JEE containers/apps with parallelism, elasticity, multi-tenancy, and securityThe Java Enterprise Edition (JEE) architecture is based on components with features that effectively manage application transactions and statefulness, multi-threading, and resource pooling. A JEE application is easier to write even with complex requirements since the business logic is organized in reusable components and the server provides the underlying services in the form of a container for each component type.We thought it would be a novel idea to add even more power to the concept of container services in JEE by adding support for some of the powerful ideas of cloud computing namely parallelism, elasticity, multi-tenancy, and security. This article describes the strategies and patterns to extend JEE containers and applications with cloud computing characteristics. It includes: An outline of each cloud characteristic we integrated. A layout of the existing characteristics of JEE applications. A description of our approach to extend the JEE container to the cloud. A design strategy for this type of migration, one that includes the concepts of parallelism, synchronization, storage, elasticity, multi-tenancy, and security.Cloud characteristicsFigure 1 explains what cloud is and the different cloud deployment models.Figure 1. A birds eye view of cloud service models and their componentsAt the bottom of the cloud stack is the Infrastructure as a Service (IaaS) level. Here the infrastructure has moved to cloud and the cloud now facilitates the deployment of software including business applications. However the IaaS does not have an application-development environment or any testing services. As the figure shows, the top level of abstraction is elasticity, automated deployment, and utility computing.The Platform as a Service (PaaS) level provides an environment for application software to be created, deployed, and maintained. The PaaS provider has to give the basic life cycle services like build, deploy, testing and building block services like state management, transaction, and security, as well as resource management services through the runtime.The Software as a Service (SaaS) level provides an environment for the end-user to access an application and use it.The basic cloud characteristics that an application needs to support are elasticity and multi-tenancy. Other characteristics, like provisioning and automation, are supported through the deployment features of the application server and do not have much of an impact on the code. Parallelism, distributed storage needs, and security enhancements act as supporting characteristics that need to be addressed to achieve elasticity and multi-tenancy.Lets look at each in more detail.ElasticityElasticity is the ability to scale up and down the infrastructure based on need. During peak load times, more instances are added to the cluster and when the load comes down, the number of instances comes down. This should be done dynamically. This function is enabled by features of the application server to support dynamic clustering techniques.Elasticity is not just an application server solution; the application itself should be able to support elasticity. This means the application needs to be designed to handle the resources that it uses to support concurrency. By designing or customizing an application to support elasticity, you imply that youve also implemented parallelism, statelessness, and transaction support in your application.The design strategy section describes how to implement elasticity that has all the resources support statelessness in execution and parallelism.Multi-tenancyMulti-tenancy means your application has the ability for a single application instance to cater to multiple customers; this means that if five customers are using a content management service, then all five customers can use the same application instance with adequate segregation of data and execution parameters. To support multi-tenancy, your application needs to engage distributed storage, parallelism, security, and loose coupling.There are two approaches to support multi-tenancy: A single physical storage for all tenants. Multiple physical storage resources for tenants.Parallelism and transaction supportIn the content of this article, parallelism is the ability to execute multiple requests in parallel or to split a large dataset task into multiple subtasks which are executed in parallel. This makes better use of available resources. Employing parallelism has a positive impact on throughput and performance. Transaction support ensures reliability by guaranteeing that changes in state of any resource are synchronized. These two concepts sit on opposite ends of a spectrum - if you do more of one, you do less of the other.The right mixture of parallelism and transaction support is essential to balance these opposing characteristics. The strategies section introduces four strategies, two each for parallelism and transaction support: A synchronous and asynchronous approach for parallelism. A thread-completion and a data-arrival synchronization approach for transaction support.The migration strategy described follows non-functional approaches to parallelism, but there are some that require functional changes. Like the Google framework MapReduce; MR describes a way of implementing parallelism using the Map function which splits a large data into multiple key-value pairs. (See Resources for articles on MapReduce and the cloud.)Loose coupling and statelessnessLoose coupling ensures that every call to a service is made through a standard interface; this enables the called component and caller component to be changed without one impacting the other. Loose coupling is introduced by a proxy which invokes the call. Statelessness is a property of loose coupling in which every call to a service does not depend on the previous call. It is achieved by managing state changes in a persistent storage.Both of these are complimentary characteristics that make system calls more independent of dependencies.Distributed storageDistributed storage is a means to persist data so that the location of the data is not important. It also means that there are different places where the same data can be stored. This characteristic improves elasticity and statelessness, but can negatively impact transaction support, so it will require a balancing act.Four strategies for distributed storage include: Replicated nodes: Data is available at different nodes and is replicated immediately to other nodes. Replication on-demand: Triggers are defined that cause data replication manually or automatically. One-way replication with failover: The master-to-child node plan; during a master node fail, replication duties are assigned to a specific child. File system sharing: Used when replication is costly like with file system resources.SecurityCloud application security impacts certain characteristics strongly: Multi-tenancy, parallelism, and loose coupling introduce additional security needs. And if your application is deployed as a hybrid (for example, a cloud component and a local system component), you need to ensure a cross-domain, single sign-on capability which carries additional security implications.There are also security issues with distributed storage, parallelism, and transport.Now that you are familiar with cloud application characteristics, lets look at a Java EE container structure.Java EE container application characteristicsTraditional JEE applications depend on container services and use: Sticky sessions for connection state management RDBMS either directly through SQLs or stored procedures indirectly using ORM JMS objectsThey may also use message-driven Beans and Session Beans and web services implemented using the framework provided by the container. The newly built applications might use asynchronous processing, as well as caching services or JavaMail services.Lets examine some attributes and functions of JEE container applications in detail.Data and operationEvery bit of programming logic can be abstracted into a data- (or memory-) related part and an operation- (or execution-) related part which interacts with each other so that the operation works on data and data is used by operation. The entire JEE package, container and application, can be abstracted in the same manner.ContainerThe quality of data aspect is measured by the ability to ensure reliability of data accessed, availability of data accessed, being able to allow concurrency as well as security of the data in storage. The quality of operation aspect is measured by being able to ensure a listeners ability to listen to arrival of data, ability to invoke a remote call as well as access control and transport security.Table 1. Providing quality for the data and operation aspect of a JEE applicationQuality attributeImplementation attributeImplementationDataReliabilityTransactionTransactions provide synchronized access to the data.AvailabilityPersistenceThe type of persistence determine availability of data.ConcurrencyState managementThe state management mechanism ensures how many concurrent requests can be processed.SecuritySecurityThe encryption in storage and transit.OperationAsynchronous communicationListenerThe trigger for asynchronous calls.Synchronous communicationRemote invocationThe synchronous call outside the current process.SecuritySecurityThe access control check as well as transport security.The responsibility of container is two-fold:1 To have a mechanism to ensure that the quality attributes of data and operation are maintained.2 To control the usage of system resources like heap memory, number of execution threads, etc.This leads to two distinct patterns you should be concerned with the managed resource pattern and the managed task pattern.Managed resource patternA managed resource provides a data-related service and it implements session management, transaction, persistence, and security. The caller uses the naming directory to locate the resource manager. The resource manager uses the object pool provided by the container to manage system resources. A typical managed resource has the pattern you see in Figure 2.Figure 2. The managed resource patternThe container or application can get a handle on the resource manager through JNDI. The resource manager implements the object pool and it gets the managed resource that implements persistence, security state management, and transaction.Managed task patternA managed task provides operation-related services that implements remote invocation, listener, and security and it uses the thread pool and naming directory services provided by the container. In addition, a managed task most likely encapsulates one or more of the managed resources that it works on. The managed listener is triggered by the container based on data arrival the data can be in the form of time, message, or request. It also can be triggered by the application as well.Figure 3. The managed task patternEvery service that container provides can be decomposed into one of the patterns or into a combination of the two patterns. For example, Java Message Service (JMS) has a managed resource pattern for JMS Destinations and a managed task pattern for JMS MessageListener. Similarly JDBC Connection is a managed resource pattern.Now that we have covered how the JEE container application functions, lets look at how to extend a container application to the cloud.Extending containers: The basic approachThe approach for extending container to cloud is to:1 Decompose the cloud characteristics into the implementation attributes and then2 Enhance the managed resource pattern and managed task pattern with the implementation attribute-related changes.The strategy section shows how the managed resource pattern is extended to the cloud resource pattern and the managed task pattern is extended to the cloud task pattern.The managed resource pattern employs the following extensions to create the cloud resource pattern (see Figure 4): CloudResource Isolator Replicator LockManager LockDataResource StateDataResourceSimilarly the managed task pattern is extended with Proxy and StateManager to create the cloud task pattern (see Figure 5).Lets discuss some of these components.Cloud resource patternThe cloud resource pattern includes the list of extensions just mentioned. Here is a description of each component and their interactions with each other.CloudResourceThe CloudResource extends the managed resource to include distributed transactions and state persistence logic, if needed.StateDataResourceThe StateDataResource is an instance of CloudResource that represents a state change for the given cloud resource. The state persistence logic itself is executed in a stateless manner.IsolatorThe Isolator uses a control field in the input to identify the customer tenant and applies the relevant security and partition logic to store in the correct place. The Isolator ensures that the application code is not cluttered with the multi-tenant storage strategies and ensures that right multi-tenant strategy is applied. The Isolator in itself is a collection of CloudResources.ReplicatorThe Replicator is used only if replicated nodes and replication on demand storage strategies are used. The Replicator ensures that the data is persisted in all the replicated nodes as a single distributed transaction. The difference between Isolator and Replicator is that Isolator ensures data goes into correct storage based on the tenant and Replicator ensures data goes into all the storages replicated for same tenant.LockManager and LockDataResourceThe functionality of LockManager is to lock a particular data for a thread in a process across all Replicators. The LockManager ensures the same view of status across all replicated nodes. It means that if data is locked for a thread in a server process in server 1, the server 2 process will see the status as locked even if it looks at a replica of storage. This feature is needed only for replicated nodes and replication on demand storage strategies.The overall changes to the pattern can be summarized as follows (Figure 4): The resource manager now provider Isolators which in turn provides a CloudResource directly or a Replicator depending on storage strategy. The cloud resource now supports distributed transactions and state management now handles state persistence as well.Figure 4. The cloud resource pattern now supports distributed transactionsCloud task patternThe cloud task pattern extends the managed task pattern with the Proxy and StateManager extensions. The Proxy determines the parallelism strategy and instructs the StateManager to control the persistence of state for the execution.ProxyThe Proxy is the wrapper around the managed task with pre-process and post-process logic. The pre-process logic includes the message security, followed by formatting the input based on protocol and performing the task. Subsequent to the task execution, the post-process logic decides what to do with the output.StateManagerThe stateless execution of a task is to ensure that input to the task is the initial state and all final state related information is present in the output. Therefore, the StateManager takes care of input and output and moving them as a CloudResource.Figure 5. The cloud task patterns StateManager moves I/O as a CloudResourceTable 2 shows the details of how each cloud characteristics and its corresponding design strategy impacts which JEE implementation attribute and what patterns are referenced.Table 2. Cloud characteristics and their impact on design and implementation strategyCloud characteristicsDesign strategyImplementation attributePatternPattern extensionsStatelessnessStatelessness through state persistenceListener, remote invocatorCloud taskStateManagerStatelessnessStatelessness through state persistenceState managementCloud resourceStateDataResourceDistributed storageReplicated nodes, Replication on demandPersistenceCloud resourceReplicator, LockManager, LockDataResourceDistributed storageReplicated nodes, Replication on demandTransactionCloud resourceCloudResourceParallelism and synchronizationAll the strategiesListener, remote invocatorCloud taskProxyLoose couplingAll the strategiesListener, remote invocatorCloud taskProxyMulti-tenancyAll the strategiesPersistenceCloud resourceIsolatorSecurityEncryptionPersistenceCloud resourceIsolatorSecurityEncryptionListener, remote invocatorCloud taskProxyExtending containers: Approach for common container servicesModify the existing container services to match the cloud resource and cloud task patterns and attach them to the application in as non-intrusive manner as possible. In a nutshell,
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025屆云南省峨山彝族自治縣峨山一中高三下學(xué)期聯(lián)合考試數(shù)學(xué)試題含解析
- 浙江七彩陽(yáng)光聯(lián)盟2025屆高考適應(yīng)性考試數(shù)學(xué)試卷含解析
- 湖師范大學(xué)附屬中學(xué)2025屆高考仿真卷英語(yǔ)試卷含解析
- 2025屆江蘇省如東縣高三3月份第一次模擬考試語(yǔ)文試卷含解析
- 2025屆吉林省吉林大學(xué)附屬中學(xué)高考語(yǔ)文四模試卷含解析
- 《保額銷售實(shí)戰(zhàn)劇本》課件
- 《solidworks 機(jī)械設(shè)計(jì)實(shí)例教程》 課件 任務(wù)1.2 SolidWorks 2022操作界面認(rèn)知
- 湖北省襄陽(yáng)市東風(fēng)中學(xué)2025屆高考語(yǔ)文押題試卷含解析
- 山東省濟(jì)南二中2025屆高考?jí)狠S卷數(shù)學(xué)試卷含解析2
- 2025屆江蘇省徐州市睢寧高級(jí)中學(xué)高三第六次模擬考試語(yǔ)文試卷含解析
- 九年級(jí)安全班會(huì)課件
- 教研組長(zhǎng)培訓(xùn)會(huì)議
- 學(xué)前兒童衛(wèi)生與保健-期末大作業(yè):案例分析-國(guó)開(kāi)-參考資料
- 濱州電動(dòng)伸縮雨棚施工方案
- ISO45001管理體系培訓(xùn)課件
- 24年國(guó)開(kāi)建筑工程估價(jià)實(shí)訓(xùn)報(bào)告
- 醫(yī)院消防系統(tǒng)維護(hù)保養(yǎng)服務(wù)投標(biāo)方案(圖文版)(技術(shù)方案)
- 花都區(qū)2023-2024年-2024年八年級(jí)上學(xué)期語(yǔ)文期末試卷
- 2024年新疆區(qū)公務(wù)員錄用考試《行測(cè)》試題及答案解析
- 蔣詩(shī)萌小品《誰(shuí)殺死了周日》臺(tái)詞完整版
- “趣”說(shuō)產(chǎn)品設(shè)計(jì)(山東聯(lián)盟)智慧樹(shù)知到期末考試答案章節(jié)答案2024年青島濱海學(xué)院
評(píng)論
0/150
提交評(píng)論