1 / 46

Data-Awareness and Low-Latency on the Enterprise Grid Getting the Most out of Your Grid with Enterprise IMDG

Data-Awareness and Low-Latency on the Enterprise Grid Getting the Most out of Your Grid with Enterprise IMDG. Shay Hassidim Deputy CTO Oct 2007. Overall Presentation Goal. Understand the Space Based Architecture model and its 4 verbs.

mattox
Download Presentation

Data-Awareness and Low-Latency on the Enterprise Grid Getting the Most out of Your Grid with Enterprise IMDG

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data-Awareness and Low-Latency on the Enterprise GridGetting the Most out of Your Grid with Enterprise IMDG Shay Hassidim Deputy CTO Oct 2007

  2. Overall Presentation Goal • Understand the Space Based Architecture model and its 4 verbs. • Understand the Data contention challenge and the latency challenge with Enterprise Grid based applications. • Understand why typical In-Memory-Data-Grid can’t solve the above problems and why the Enterprise IMDG can.

  3. GigaSpaces in a Nutshell • Founded in 2000 • Founder of The Israeli Association of Grid Technologies (IGT) – OGF affiliate. • Provides infrastructure software for applications characterized by: • High volume transaction processing • Very Low latency requirements • Real time analytics • Product: eXtreme Application Platform – XAP. 6.0 released few months ago. • Enterprise In Memory Data Grid (Caching) • Application Service Grid • Customer base – about 2000 deployments around the world. • Financial Services • Telecom • Defense and Government • Presence • US: NY (HQ), San Francisco, Atlanta • EMEA: UK, France, Germany, Israel (R&D) • APAC: Japan, Singapore, Hong Kong

  4. About myself – Shay Hassidim • B.Sc. Electrical, Computer & Telecommunications engineer. Focus on Neural networks & Artificial Intelligence , Ben-Gurion University , Graduated 1994 • Object and Multi-Dimensional DBMS Expert • Extensive knowledge with Object Oriented & Distributed Systems • Consultant for Telecom, Healthcare , Defense & Finance projects • Technical Skills: MATLAB , C, C++, .Net , PowerBuilder , Visual Basic , Java , XML , CORBA , J2EE , ODMG , JDO , Hibernate, SQL , JMS , JMX, IDE , GUI , Jini , ODBMS , RDBMS , JavaSpaces • In the past: • Sirius Technologies Israel - VMDB Applications & Tools team Leader • Versant Corp US. - Tools Lead Architect , R&D • Since 2003 - GigaSpaces VP Product Management (Based in Israel) • Since 2007 – GigaSpaces Deputy CTO (Based in NY)

  5. GigaSpaces – Technical overview

  6. Master / Local Cache Replicated Cache Partitioned Cache The Basics… Data Grid: Caching Topologies

  7. So. . .What is Space-Based Architecture? Utilizing a single logical/virtual resource to share: Data Logic Events Services: Interact with each other through the space Can be co-located with data/events for faster results Are deployed and managed in an adaptive and fail-safe way Objects! } Data Provisioning Logic Processing Event Propagation

  8. Space Based SOA using 4 Simple Verbs • Write • Read • Take • Notify Write + Read = IMDG (Caching) Write + Notify = Messaging Write + Take = Parallel Processing Write Read Take Write Take Notify 8

  9. IMDG Distributed In-Memory Query Support • Enable aggregation of data transparently • Support SQL Query semantics • Continues query via notifications • Local view – client side cache Parallel Query Partitioned Clustered Space Space proxy Read Local View updated using Continues Query

  10. Data virtualization– IMDG Accessed by all popular API and programming languages • Provides true data grid that supports variety of standard based data API • API Becomes just a view • Same data can be accessed via multiple API • Combine the benefits of the relational model with OO model Clustered Space JDBC Map/ JCache Applications Space CPP/.Net

  11. Integration with External Database – 2 basic models • Write/Read Through and Write behind enables lazy load of data from DB to the cache and async persistency • Complete mirroring cache data into the DB • Support also for black box persistency into RDBMS and index file (light embedded ODBMS) • Sync/Async • Hibernate Cache plug-in provides 2nd level cache for hibernate based applications

  12. Seamless Integration with External Data Sources Data is propagated seamlessly from the IMDG to the external Data source and visa versa Through the CacheStore. store store store Reliable Async Replication load load load Mirror Service The Mirror service ensures Reliable synchronization with minimal performance overhead External Data Source

  13. SBA – Real-time SOA for Stateful Services Shared state to enable stateful services Services can be Java, C++, .Net Content-Based Routing 13

  14. Enterprise Data Grid unique features

  15. GigaSpaces solution for Enterprise Grid

  16. What is the Enterprise Grid? Improve utilization of HW resources through: Multiple applications can share a pool of hardware resources. Resources are allocated to each application as needed. Applications can scale up very easily. The Grid provides parallelization for heavy computing jobs.

  17. Great, But… What about stateful applications? Data Contention challenge • How can I bring front office application to the grid? • The Latency challenge

  18. The Data Contention Challenge Only stateless applications can scale up freely on the Grid. Any application that needs to: Share state between more than one instance (service/process) Store state using a central database Could not scale easily! This implies Partial analysis results checkpoints to enable recovery. Managing a workflow involving more than one process. Common data need to be shared between processes

  19. The Latency Challenge Enterprise Grid designed for batch applications Each client request is submitted as a job. Hardware resources are allocated. Relevant software instances (service/process) are scheduled to run on the resources and perform the work. Impracticable with low-latency environments! Why? An interactive application receives thousands of client requests per second, each of which needs to be fulfilled within milliseconds. It is impossible to respond fast enough in a “job” approach. Throughput would be severely limited due to the need to schedule and launch large numbers of application instances.

  20. Three Stages Approach to the Solution In Memory Data Grid (IMDG) Data Aware Grid using SLA driven containers Adding front office application to the Grid using Declarative Space Based Architecture (SBA)

  21. In Memory Data Grid (IMDG) Data stored in the memory of numerous physical machines instead of, or alongside, a database. Eliminates I/O, network and CPU load. Partitions the data and moves it closer to the application. However, IMDG in an Enterprise distributed environment, is only a partial solution! Stage 1

  22. Data Aware Grid using SLA driven containers Stage 2 Common wisdom holds that it is much easier to bring the business logic to the datathan to bring the data to the business logic. But… Not all IMDG support data & business logic co-locality! This results: • Unnecessary overhead caused by remote calls from business logic to IMDG instances. • Data duplication, because business logic elements that use the same data are not necessarily concentrated around the relevant IMDG instance. • And worst of all, data contention, because several business logic elements might access the same IMDG instance - leading to exactly the problem the IMDG was meant to solve! Requirements for a Data-Aware Grid • The Enterprise Grid must know which data is stored on which IMDG instances. • There must be a way to guarantee data affinity - tasks must always be executed with the relevant data coupled to them.

  23. Enterprise IMDG Deployment requirements Stage 2 • Deploying a shared IMDG rather than specific IMDG per application requires: • Improved resource utilization • With the IMDG as a shared resource, memory and CPUs available to the IMDG instances can be shared between different applications, depending on their current data loads. It is also much easier to scale the IMDG to respond to changing data needs • Lower total cost of ownership • Installation, testing, configuration, maintenance and administration of the IMDG is performed centrally for all the applications on the Grid.

  24. Stage 2 Enterprise IMDG requirements for grid environments • Sensitivity to Demand for Data vs. Available Resources • Free (Memory) resources when there is no need for them • Multi-Tenancy • Continuous High-Availability • Hot fail-over • Versioning—it should be possible to upgrade or update the IMDG instances without affecting the data or interrupting access. • Configuration changes—it should be possible to change configuration without affecting availability of the IMDG instances. • Schema evolution—changing the data structure (i.e. adding or modifying classes) should not affect the existing data and should not require downtime. • Isolation (Groups, instances, Data) • Content-Based Security • Explicit Control over IMDG Instance Locations (manual relocation while the system is running) • Integration with Existing Systems

  25. Strategies for adding data awareness to the grid Stage 2 Stage 3

  26. Adding front-office to the grid using Declarative SBA All services are collocated on the same machine Transparent data affinity via content based routing (i.e. hash based load-balancing) Sharing can be done in local memory => the lowest possible latency. Stage 3 Processing unit

  27. Declarative SBA (cont.) So what it this “processing unit”? A mini-application which can perform the entire business process. Accept a user request, perform all steps of the transaction on its own, and provide a result. Removes the need for sharing of state and partial results between different components of the application running on different physical machines. Stage 3 27

  28. SLA Driven Application Service Container Stage 3 • Provides built-in support for deployment of Spring based applications • Virtualize the network and physical resources from the application • Handles Fail Over, Scaling and Relocation policies using SLA based definitions. • Provides distributed dependency injection to handle partial failure and deployment dependency. • Provides single point of access for monitoring and management

  29. SLA Driven Deployment Stage 3 • SLA: • Failover policy • Scaling policy • Ststem requirements • Space cluster topology • PU Services beans definition

  30. Continuous High Availability Stage 3 Failure Fail-Over

  31. A A B B E E F F Partition 2 Partition 2 D D Partition 1 Partition 1 C C Partition 3 Partition 3 Dynamic Partitioning = Dynamic Capacity Growth P - Primary Max Capacity=6G Max Capacity=4G Max Capacity=2G B - Backup VM 1 ,2G VM 2 ,2G VM 3 , 2G GSC GSC GSC P P P VM 4 ,4G VM 5 , 4G GSC GSC B In some point VM 1 free memory is below 20 % - it about the time to increase the capacity – lets move Partitions 1 to another GSC and recover the data from the running backup! B B Later .. Partition 2 needs to move… After the move , data is recovered from the backup

  32. A closer look at OpenSpaces and Declarative SBA Development

  33. Step 1: Implement POJO domain model Step 2: Implement the POJO Services Step 3: Wire the services through spring Step 4: Packaging Deploy to Grid (Scale-Out) Declarative Spring-SBA – How it works.

  34. SpaceClass indicate that this is a SpaceEntry – SpaceClass includes classlevel attributes such as FIFO,Persistent… SpaceId used to define the key for that entry. SpaceRouting used to set the data affinity i.e. define the partition where this entry will be routed to. @SpaceClass public class Data { @SpaceId(autoGenerate = true) public String getId() { return id; } @SpaceRouting public Long getType() { return type; } public void setProcessed(boolean processed) { this.processed = processed; } } The POJO Based Data Domain Model

  35. Order Processor Service Bean SpaceDataEvent annotation marks the processData method as the one that need to be called when an event is triggered public class DataProcessor implements IDataProcessor { @SpaceDataEvent public Data processData(Data data) { data.setProcessed(true); data.setData("PROCESSED : " + data.getRawData()); // reset the id as we use auto generate true data.setId(null); System.out.println(" ------ PROCESSED : " + data); return data; } }

  36. Wiring Order Processor Service Bean through Spring <bean id="dataProcessor“ class="com.gigaspaces.pu.example1.processor.DataProcessor" /> <os-events:polling-container id="dataProcessorPollingEventContainer" giga-space="gigaSpace"> <os-events:tx-support tx-manager="transactionManager"/> <os-core:template> <bean class="org.openspaces.example.data.common.Data"> <property name="processed" value="false"/> </bean> </os-core:template> <os-events:listener> <os-events:annotation-adapter> <os-events:delegate ref="dataProcessor"/> </os-events:annotation-adapter> </os-events:listener> </os-events:polling-container> The PollingEventContainer will implicitly call take with template defined in the template property and invoke the method marked with @SpaceDataEevent on dataProcessor bean.

  37. Processed Orders Routing Service Bean Order Processor ServiceBean Polling Event Container Notify Event Container Take Write Notify Space BUS Direct Data Loader Client Space Proxy Write Data Loader

  38. Space Based Remoting SpaceServiceExporter Order Processor ServiceBean ProcesData Order Proxy Invoke Order Processor Client Write SpaceInvokeData OrderProcessor Delegator SpaceServiceProxyFactoryBean Take SpaceInvokeData Write result Space BUS

  39. SpaceServiceExporter Order Processor ServiceBean Write SpaceInvokeData ProcessData Order Proxy Invoke Order Processor Client OrderProcessor Delegator SpaceServiceProxyFactoryBean Take SpaceInvokeData Write result Space BUS Space Based Remoting – Inherent Scalability/Reliability

  40. Looking into the Future… Many Enhancements! • Enhance Performance • Built in infiniband support – Voltaire , Cisco • Enhance Database integration • Enhance the Space Mirror support (async persistency) • Enhance partnership and integration with grid vendors • DataSynapse , Platform Computing , Sun Grid Engine, Microsoft Compute Cluster Server • Enhance CPP and .Net support • Performance optimization – first goal – same as java • Support for complex object mapping

  41. Conclusions and Summary • Typical IMDG won’t help you • You need Data Aware Enterprise IMDG to solve the data contention and latency challenges. • Data affinity need its twin: data & business locality • The Enterprise IMDG co-locates the data with the business logic • Using self-sufficient autonomic processing unit deployed into SLA based container that scales via the Enterprise Grid • The Enterprise IMDG bring the Front-office into the grid • Makes the grid a utility model for wide spectrum of applications across the organization

  42. Case Studies

  43. A Dynamically Scalable Architecture for Data IntensiveTrading Analysis Applications • Most financial organizations today use Excel™ or Reporting Databases as the main trading analysis tools. These are very difficult to scale. • The solution is to create a shared In-Memory Data Grid (IMDG) which stores the trading data in a shared pool of machines. Common data calculation and analysis run on that pool as well, leveraging the available memory and CPU resources. • JavaSpaces is a powerful model for distributed persistence. GigaSpaces is a JavaSpaces vendor providing Enterprise features. • Spring hides the details of the JavaSpaces model, allows effort to be focused on requirements rather than frameworks. Using shared data grid for all users Running analytics close to the data to improve performance and leverage the available resources

  44. Reconciliation Calculation

  45. Questions?

  46. Thank You!shay@gigaspaces.com

More Related