Where To Use Terracotta

2007/11/15 10:21

Where To Use Terracotta

Terracotta helps simplify enterprise application development by providing a purpose-built infrastructure service called network attached memory.

Distributed Caches

Applications that have caching already and those that are looking to add caching for performance should both add Terracotta to the architecture. Distributed caches shared through Terracotta improve throughput without changing the code. This is because sharing cache data across application nodes improves cache hit rate by allowing one server to populate the cache on behalf of many. If you already have EHCache, OSCache, JBossCache, or other frameworks integrated to your application, you will see as much as one hundred times throughput increase with Terracotta.

If you are adding the caching design pattern to your application now, you should select caches that Terracotta can cluster. Using any other clustered caching approach will actually impact your source code relative to the single-server implementation.

learn more »

Hibernate

While using an O/R-mapper to get to system of record data is easy and powerful, tuning and scaling such stateless applications can be hard. Terracotta helps to reduce pressure on the database caused by O/R-mapped applications deployed in a clustered environment. Use it to cluster your Hibernate second level cache.

Altenatively, you can get 10X or more scale from your Hibernate applications by using Hibernate in disconnected mode and using Terracotta to make Hibernate POJOs shared and durable while outside Hibernate's control. Terracotta ensures durability so you won't lose any changes while disconnected from Hibernate. Automatic Session reconnection means you can easily flush objects back to the database when you no longer need them.

learn more »

HTTP Session Clustering

Terracotta is used by Java websites both large and small to cluster web sessions. When clustered by Terracotta, web application session becomes highly available without actually being replicated to every app server in the cluster. This leads to scalable applications especially when used in conjunction with an HTTP load balancer.

learn more »

Virtual Heap for Large Datasets

With Terracotta, Java applications can address heap in excess of one machine's physical RAM. Your JVM can spill data to the Terracotta Server Cluster. The Terracotta Servers can, in turn, spill data to disk. This two-tier system ensures high performance by keeping data as close to the processing context as possible. It also makes it possible for 32 bit systems to access terabytes of data.

learn more »

Cluster OSS Frameworks

Terracotta enables developers to build highly available, highly scalable applications with a variety of Open Source development frameworks, including some that do not have built-in high availability features.

Terracotta supports these frameworks because of the simplicity of Network Attached Memory. Direct framework support means that developers can rely on the integrated projects without having to integrate Terracotta by hand. More frameworks are coming online weekly. We achive this integration through Terracotta Config Modules. You can use a module by simply downloading the appropriate module. You might also consider creating your own Config Modules for bundles of code or clustered abstractions you wish to build for your own team.

learn more »

Master Worker

Master - Worker is a design pattern that Terracotta users leverage to divide and route large workloads around a grid of JVMs.

To Deliver Master - Worker Terracotta uses both POJOs and frameworks hosted on our own project Forge.

learn more »

POJO Clustering

Terracotta works with or without a container. Terracotta works with Open Source and proprietary frameworks. This is because Network Attached Memory works with the POJO's in those frameworks and it works the same for your own POJOs. No Spring beans, getters and setters, serialization, or other interfaces are required in order to use the technology.

Terracotta also supports Spring explicitly so when you decide to wire up your application using Spring's dependency injection, or when you start to use frameworks and abstractions like Spring Webflow, or Spring Batch you can cluster those applications without the need for RMI or Spring Remoting in your application.

learn more »

크리에이티브 커먼즈 라이선스
Creative Commons License

What Is Terracotta

Network Attached Memory: Purpose Built To Store "Scratch Data"

Terracotta is Network Attached Memory (NAM). NAM is best suited for storing what we like to call scratch data. Scratch data is defined as object oriented data that is critical to the execution of a series of Java operations inside the JVM, but may not be critical once a business transaction is complete. Some examples of scratch data include business workflow state (which step of the flow is the system currently working on), or HTML form data that is being validated by a web application before a database record is created or updated.

The term "scratch data" is derived from students' use of a piece of scratch paper to make interim calculations for a multiple choice examination. This scratch paper is critical to the student during the exam, yet once the final answers are turned in, it is not longer of value to the student or the instructor.

Network Attached Memory

Terracotta coined the term "Network Attached Memory" to explain what our technology does for Java applications. Any Network Attached Memory (NAM) implementation must honor 2 fundamental principles:

NAM must look just like RAM to the application Constructors, Wait / Notify, synchronized(), == and .equals() should all work as expected. An easy way to think about NAM's interface to the application is that an application that supports NAM should run with or without a NAM implementation. For example, if you use a Network Attached Storage (NAS) file server, the application is not aware, nor does it need to be, of whether it is writing to a local or a networked disk. The application itself does not change if NAS is present or not. NAM is exactly the same. If NAM is not present, the application will continue, writing to local RAM. Likewise, the application need not change with the introduction of NAM.


NAM must work as an infrastructure service That is, NAM must run as a driver inside the JVM but also as a separate process apart from the application cluster. This is due to the fact that like networked filesystems, the memory must survive whether or not your application is running. Otherwise, NAM does not provide the true value of connect/disconnect on-the-fly that one would expect when compared to Network Attached Storage.

Terracotta provides Java applications with this powerful NAM concept whereby developers get clustering and high availability because:

1) the memory is shared and external to the JVM, allowing for coordinated cross-JVM I/O, and
2) if the JVM crashes, the data survives any crashes and restarts.

Developers get HA and scale as a result of plugging in NAM.

Terracotta Helps Reduce Database Load

Terracotta allows developers to make finer grained decisions about how to share data than current-state approaches. Without Terracotta, many applications O/R-map or otherwise store Java objects in a relational database. Removing the database dependency in such cases is one way Terracotta simplifies application architecture and development.

In the above image, there is database server and an application cluster with 3 servers. The database should be the size of the dashed black cylinder but it is not only storing System of Record data (labeled SoR in the diagram). It is also working to coordinate between application servers. The application's scratch data is causing the database to get too big for our needs; costs begin to escalate. The red arrows depict the database swelling due to an overload of scratch data.

Terracotta Helps Reduce Development Effort and Dependencies on Application Servers and Frameworks

Alternatively, developers can copy all application scratch data to every JVM in an application cluster, to prevent downtime in case any application servers or JVMs crash. Such approaches can work, but they usually make applications harder to code and maintain. Also, most usually bottleneck on the network long before application logic exhausts the commodity hardware where the JVM is running.

In the above image, the database server is used only as a System of Record (labeled: SoR, with the dashed black lines) because scratch data is now shared using the application tier network. Using some sort of network communication library, developers serialize and copy objects amongst JVMs. Alternatively, those developers use expensive "clustered app server" features to achieve roughly the same result. Serialization and bean-style get() / set() requirements complicate source code. In any case, the red band across the application tier and the associated red arrow depict resultant swelling in source code as well as potential scale-up in hardware capacity needed to support the the clustered application server.

Terracotta's Network Attached Memory Saves Time and Money

Put another way, most application servers are below 30% utilization while the database and network are getting saturated.
With network attached memory as new proper home for scratch data, applications can avoid the problem of ABUSING databases and application servers when trying to store that temporary data somewhere other than in RAM.

Terracotta users find, on average a 10X increase in throughput, and more than 50% cheaper total cost to the application.

Network Attached Memory simplifies application development by providing an external extension to the application heap that stays coordinated across application servers. Developers can now store only System of Record data in the database, and those developers can use any application server they desire, open source or commercial. Furthermore, application memory survives JVM restarts and network attached memory can scale to hundreds of connected JVMs. Most importantly, all data remain Java objects in native Java format, which means developers and architects can choose this approach for almost any Plain Old Java Object (POJO).

크리에이티브 커먼즈 라이선스
Creative Commons License
SOA팀에서 작성한 사내 세미나 자료입니다.

참고하시기 바랍니다.




크리에이티브 커먼즈 라이선스
Creative Commons License

BLOG main image
by uclicker

공지사항

카테고리

U-story (6)
Uclick News (1)
People (1)
Business (0)
Technoloy (1)
Wisdom (1)
Proposal (2)
톡!Talk! Toc (0)

최근에 달린 댓글

최근에 받은 트랙백

글 보관함

달력

«   2012/01   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Total : 1,586
Today : 1 Yesterday : 0