SlideShare a Scribd company logo
Alachisoft
.NET Performance Solutions

How to Handle Relational Data
in a Distributed Cache

Iqbal Khan
iqbal@alachisoft.com Ph: +1 (925) 236-2125
www.alachisoft.com

1
Alachisoft

Following Applications Need Scalability
1.

ASP.NET Apps


2.

WCF & .NET Web Services


3.

To quickly process very large amounts of data thru distribution

Grid Computing Apps


5.

To handle millions of requests

Big Data Apps


4.

To handle millions of users

To process very large computations thru distribution

Other .NET Server Apps


NCache

To handle millions of requests
www.alachisoft.com

2
Alachisoft

Data Storage is Scalability Bottleneck
ASP.NET/WCF Example

App Database

ASP.NET/WCF Servers

Database Servers
Data Access

Scale Web Farm

Web Clients

Http Calls

...
NCache

Load Balancer

www.alachisoft.com

ASP.NET Session
Storage

3
Alachisoft

The Solution

Scalable In-Memory Distributed Cache

NCache
NCache

www.alachisoft.com

4
Alachisoft

What is an In-Memory Distributed Cache?
1.

Cluster of multiple inexpensive cache servers


2.

Synchronizes cache updates across all cache servers


3.

Cache updates are immediately visible from all cache servers

Linearly scales transaction & memory capacity


4.

Pools their memory and CPU into one logical capacity

Just add more cache servers to grow capacity

Replicates data for reliability


NCache

Intelligent replication without compromising performance & scalability

www.alachisoft.com

5
Alachisoft

NCache: In-Memory Distributed Cache
ASP.NET Web Apps

WCF Web Services

Grid Computing Apps
(.NET)

.NET Server Apps

Distributed Cache Cluster
Memory pooled from all cache servers

Scale Horizontally
Windows 2008/2012 (64-bit)

Filesystem

NCache

Database Servers

www.alachisoft.com

Mainframe

6
Alachisoft

What Data to Cache?
1.

Reference Data


2.

Transactional Data


3.

Does not change very frequently (but is not static)

Changes frequently (as frequently as in a few seconds)

Most Cached Data is Relational


NCache

Comes from relational databases

www.alachisoft.com

7
Alachisoft

Challenge: Cache versus Relational Data


Cache provides a Hashtable-like interface





Each item is separate and has a “key” and a “value”.
“Value” is usually an “object”

Relational data has relationships between entities


NCache

This is a challenge for your application

www.alachisoft.com

8
Alachisoft

Peek into Caching API


Read from the Cache






Add to the Cache






object obj = cache.Get(“myKey”);
object obj = cache[“myKey”];
bool isPresent = cache.Contains(“myKey”);

cache.Add(“myKey”, obj);
cache.Insert(“myKey”, obj);
cache[“myKey”] = obj;

Remove from the Cache


NCache

object obj = cache.Remove(“myKey”);

www.alachisoft.com

9
Alachisoft

First Step: Use CacheDependency


Lets you manage relationships in the cache




One cached item depends on another




A depends on B and B depends on C. Change in C triggers both A & B

Feature introduced by ASP.NET Cache




If target cached item updated/removed, dependent automatically removed

Cascaded dependencies possible




Cache keeps track of a one-way “dependency” between cached items

Key based dependency is our focus here

NCache also provides it

NCache

www.alachisoft.com

10
Alachisoft

Second Step: Use Object Relational Mapping


Benefits of O/R Mapping





Benefits of O/R Mapping Tools






Cut down development time
Improve code quality in persistence & domain objects
Simplifies programming. No need to directly use ADO.NET

Which O/R Mapping Tools to Use?





Simplifies programming by mapping domain objects to data model
Promotes code reuse of persistence and domain objects

Entity Framework (Microsoft)
NHibernate (Open Source)

At Least Map Domain Objects to Database




NCache

Map to database entities
Capture relationships in these objects
Transform DataReader or DataTable into domain objects

www.alachisoft.com

11
Alachisoft

Mapping Domain Objects to Database
Data Model

NCache

www.alachisoft.com

12
Alachisoft

What is a Primary Object?


It is a domain object




Starting point for the application





Mapped to a table in the database

Application fetches this objects first
All other objects fetched in relation to this object

All other objects fetched in relation to this object


NCache

One-to-many and many-to-one relationships

www.alachisoft.com

13
Alachisoft

Mapping Domain Objects to Database

NCache

www.alachisoft.com

14
Alachisoft

1-1/n-1 Relationships in Distributed Cache


Strategy 1: cache related object with primary object



Strategy 2: cache related object separately

NCache

www.alachisoft.com

15
Alachisoft

1-1/n-1 Relationships in Distributed Cache
Cache related object with primary object

NCache

www.alachisoft.com

16
Alachisoft

1-1/n-1 Relationships in Distributed Cache
Cache related object separately

NCache

www.alachisoft.com

17
Alachisoft

1-n Relationships in Distributed Cache


Strategy 1: cache related objects collection with primary object




Strategy 2: cache related objects separately separately




Cache entire collection as part of the primary object

Cache entire collection as one item but separately

Strategy 3: cache related objects from collections separately


NCache

Cache each item of the collection separately

www.alachisoft.com

18
Alachisoft

1-n Relationships in Distributed Cache
Cache related object collection separately

NCache

www.alachisoft.com

19
Alachisoft

1-n Relationships in Distributed Cache
Cache each object in related collection separately

NCache

www.alachisoft.com

20
Alachisoft

m-n Relationships in Distributed Cache


Many-to-many relationships don’t exist in domain objects



Instead, represented by two one-to-many relationships




E.g. Customer->Orders and Product->Orders

Intermediary object contains many-to-one references


NCache

E.g. Order has a reference to Customer and Product

www.alachisoft.com

21
Alachisoft

Handling Collections in Distributed Cache


Scenario 1: cache entire collection as one item



Scenario 2: cache each collection item separately

NCache

www.alachisoft.com

22
Alachisoft

Handling Collections in Distributed Cache
Cache entire collection as one item

NCache

www.alachisoft.com

23
Alachisoft

Handling Collections in Distributed Cache
Cache each collection item separately

NCache

www.alachisoft.com

24
Alachisoft

Hands on Demo

NCache

www.alachisoft.com

25
Alachisoft

Some Object Caching Features


Expirations






Locking (Pessimistic & Optimistic)





Lock/Unlock for pessimistic locking (writer-lock)
Object versioning for optimistic locking (reader-lock)

Bulk Operations




Absolute-time + idle-time
Auto-reload data on expiration (if read-thru enabled)

Bulk Get, Add, Insert, and Remove

Async Operations


NCache

Async Add, Insert, and Remove

www.alachisoft.com

26
Alachisoft

Synchronize Cache with Data Sources


Synchronize with Relational Databases (SQL, Oracle, etc.)







SqlDependency
OracleDependency
DbDependency

Synchronize with non-Relational Data Sources



NCache

File based Cache Dependency
Custom Cache Dependency

www.alachisoft.com

27
Alachisoft

Data Grouping in the Cache


Group/Subgroup



Tags



Named Tags

NCache

www.alachisoft.com

28
Alachisoft

Searching the Cache


Parallel Queries with Object Query Language (OQL)




Parallel LINQ Queries




SQL-like query language to search cache based on object attributes

Standard LINQ queries can search the cache

Indexing Object Attributes for Querying


NCache

Create indexes on object attributes to speed up queries

www.alachisoft.com

29
Alachisoft

Some Other Features


NHibernate L2 Cache Provider




Entity Framework L2 Cache




Plug into NHibernate application without any code change

Plug into Entity Framework application without any code change

Dynamic Compact Serialization



NCache

Faster and more compact then regular .NET serialization
No code writing required

www.alachisoft.com

30
Alachisoft

What to Do Next?






Find more about NCache
Download 60-day Trial
Request a Personalized LIVE Demo
Read product Documentation

Thank You

NCache 4.1

www.alachisoft.com

31
Ad

More Related Content

What's hot (20)

HTTP Session Replication with Oracle Coherence, GlassFish, WebLogic
HTTP Session Replication with Oracle Coherence, GlassFish, WebLogicHTTP Session Replication with Oracle Coherence, GlassFish, WebLogic
HTTP Session Replication with Oracle Coherence, GlassFish, WebLogic
Oracle
 
SQL Developer for DBAs
SQL Developer for DBAsSQL Developer for DBAs
SQL Developer for DBAs
Leighton Nelson
 
Speed Up Your Existing Relational Databases with Hazelcast and Speedment
Speed Up Your Existing Relational Databases with Hazelcast and SpeedmentSpeed Up Your Existing Relational Databases with Hazelcast and Speedment
Speed Up Your Existing Relational Databases with Hazelcast and Speedment
Hazelcast
 
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
Andrew Morgan
 
Exadata MAA Best Practices
Exadata MAA Best PracticesExadata MAA Best Practices
Exadata MAA Best Practices
Rui Sousa
 
Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?
Severalnines
 
New life inside monolithic application
New life inside monolithic applicationNew life inside monolithic application
New life inside monolithic application
Taras Matyashovsky
 
What to expect from MariaDB Platform X5, part 1
What to expect from MariaDB Platform X5, part 1What to expect from MariaDB Platform X5, part 1
What to expect from MariaDB Platform X5, part 1
MariaDB plc
 
Microsoft SQL Server Query Tuning
Microsoft SQL Server Query TuningMicrosoft SQL Server Query Tuning
Microsoft SQL Server Query Tuning
Mark Ginnebaugh
 
GemFire In-Memory Data Grid
GemFire In-Memory Data GridGemFire In-Memory Data Grid
GemFire In-Memory Data Grid
Kiril Menshikov (Kirils Mensikovs)
 
Hazelcast 3.6 Roadmap Preview
Hazelcast 3.6 Roadmap PreviewHazelcast 3.6 Roadmap Preview
Hazelcast 3.6 Roadmap Preview
Hazelcast
 
Visualizing Kafka Security
Visualizing Kafka SecurityVisualizing Kafka Security
Visualizing Kafka Security
DataWorks Summit
 
eBay Cloud CMS - QCon 2012 - http://yidb.org/
eBay Cloud CMS - QCon 2012 - http://yidb.org/eBay Cloud CMS - QCon 2012 - http://yidb.org/
eBay Cloud CMS - QCon 2012 - http://yidb.org/
Xu Jiang
 
Unified Batch & Stream Processing with Apache Samza
Unified Batch & Stream Processing with Apache SamzaUnified Batch & Stream Processing with Apache Samza
Unified Batch & Stream Processing with Apache Samza
DataWorks Summit
 
Novinky v Oracle Database 18c
Novinky v Oracle Database 18cNovinky v Oracle Database 18c
Novinky v Oracle Database 18c
MarketingArrowECS_CZ
 
From cache to in-memory data grid. Introduction to Hazelcast.
From cache to in-memory data grid. Introduction to Hazelcast.From cache to in-memory data grid. Introduction to Hazelcast.
From cache to in-memory data grid. Introduction to Hazelcast.
Taras Matyashovsky
 
Cassandra in e-commerce
Cassandra in e-commerceCassandra in e-commerce
Cassandra in e-commerce
Alexander Solovyev
 
Productizing a Cassandra-Based Solution (Brij Bhushan Ravat, Ericsson) | C* S...
Productizing a Cassandra-Based Solution (Brij Bhushan Ravat, Ericsson) | C* S...Productizing a Cassandra-Based Solution (Brij Bhushan Ravat, Ericsson) | C* S...
Productizing a Cassandra-Based Solution (Brij Bhushan Ravat, Ericsson) | C* S...
DataStax
 
How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?
Alkin Tezuysal
 
Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Extreme Availability using Oracle 12c Features: Your very last system shutdown?Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Toronto-Oracle-Users-Group
 
HTTP Session Replication with Oracle Coherence, GlassFish, WebLogic
HTTP Session Replication with Oracle Coherence, GlassFish, WebLogicHTTP Session Replication with Oracle Coherence, GlassFish, WebLogic
HTTP Session Replication with Oracle Coherence, GlassFish, WebLogic
Oracle
 
Speed Up Your Existing Relational Databases with Hazelcast and Speedment
Speed Up Your Existing Relational Databases with Hazelcast and SpeedmentSpeed Up Your Existing Relational Databases with Hazelcast and Speedment
Speed Up Your Existing Relational Databases with Hazelcast and Speedment
Hazelcast
 
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
MySQL Cluster - Latest Developments (up to and including MySQL Cluster 7.4)
Andrew Morgan
 
Exadata MAA Best Practices
Exadata MAA Best PracticesExadata MAA Best Practices
Exadata MAA Best Practices
Rui Sousa
 
Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?Webinar slides: How to Measure Database Availability?
Webinar slides: How to Measure Database Availability?
Severalnines
 
New life inside monolithic application
New life inside monolithic applicationNew life inside monolithic application
New life inside monolithic application
Taras Matyashovsky
 
What to expect from MariaDB Platform X5, part 1
What to expect from MariaDB Platform X5, part 1What to expect from MariaDB Platform X5, part 1
What to expect from MariaDB Platform X5, part 1
MariaDB plc
 
Microsoft SQL Server Query Tuning
Microsoft SQL Server Query TuningMicrosoft SQL Server Query Tuning
Microsoft SQL Server Query Tuning
Mark Ginnebaugh
 
Hazelcast 3.6 Roadmap Preview
Hazelcast 3.6 Roadmap PreviewHazelcast 3.6 Roadmap Preview
Hazelcast 3.6 Roadmap Preview
Hazelcast
 
Visualizing Kafka Security
Visualizing Kafka SecurityVisualizing Kafka Security
Visualizing Kafka Security
DataWorks Summit
 
eBay Cloud CMS - QCon 2012 - http://yidb.org/
eBay Cloud CMS - QCon 2012 - http://yidb.org/eBay Cloud CMS - QCon 2012 - http://yidb.org/
eBay Cloud CMS - QCon 2012 - http://yidb.org/
Xu Jiang
 
Unified Batch & Stream Processing with Apache Samza
Unified Batch & Stream Processing with Apache SamzaUnified Batch & Stream Processing with Apache Samza
Unified Batch & Stream Processing with Apache Samza
DataWorks Summit
 
From cache to in-memory data grid. Introduction to Hazelcast.
From cache to in-memory data grid. Introduction to Hazelcast.From cache to in-memory data grid. Introduction to Hazelcast.
From cache to in-memory data grid. Introduction to Hazelcast.
Taras Matyashovsky
 
Productizing a Cassandra-Based Solution (Brij Bhushan Ravat, Ericsson) | C* S...
Productizing a Cassandra-Based Solution (Brij Bhushan Ravat, Ericsson) | C* S...Productizing a Cassandra-Based Solution (Brij Bhushan Ravat, Ericsson) | C* S...
Productizing a Cassandra-Based Solution (Brij Bhushan Ravat, Ericsson) | C* S...
DataStax
 
How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?
Alkin Tezuysal
 
Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Extreme Availability using Oracle 12c Features: Your very last system shutdown?Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Toronto-Oracle-Users-Group
 

Similar to Handling Relational Data in a Distributed Cache (20)

Four Ways to Improve ASP .NET Performance and Scalability
 Four Ways to Improve ASP .NET Performance and Scalability Four Ways to Improve ASP .NET Performance and Scalability
Four Ways to Improve ASP .NET Performance and Scalability
Alachisoft
 
nHibernate Caching
nHibernate CachingnHibernate Caching
nHibernate Caching
Guo Albert
 
Building High Performance and Scalable Applications Using AppFabric Cache- Im...
Building High Performance and Scalable Applications Using AppFabric Cache- Im...Building High Performance and Scalable Applications Using AppFabric Cache- Im...
Building High Performance and Scalable Applications Using AppFabric Cache- Im...
Impetus Technologies
 
HBaseCon 2013: Using Coprocessors to Index Columns in an Elasticsearch Cluster
HBaseCon 2013: Using Coprocessors to Index Columns in an Elasticsearch Cluster HBaseCon 2013: Using Coprocessors to Index Columns in an Elasticsearch Cluster
HBaseCon 2013: Using Coprocessors to Index Columns in an Elasticsearch Cluster
Cloudera, Inc.
 
HBaseCon 2013: Using Coprocessors to Index Columns in an Elasticsearch Cluster
HBaseCon 2013: Using Coprocessors to Index Columns in an Elasticsearch Cluster HBaseCon 2013: Using Coprocessors to Index Columns in an Elasticsearch Cluster
HBaseCon 2013: Using Coprocessors to Index Columns in an Elasticsearch Cluster
Cloudera, Inc.
 
Microsoft Windows Server AppFabric
Microsoft Windows Server AppFabricMicrosoft Windows Server AppFabric
Microsoft Windows Server AppFabric
Mark Ginnebaugh
 
Architecting applications in the AWS cloud
Architecting applications in the AWS cloudArchitecting applications in the AWS cloud
Architecting applications in the AWS cloud
Cloud Genius
 
Branch office access with branch cache
Branch office access with branch cacheBranch office access with branch cache
Branch office access with branch cache
Concentrated Technology
 
Introducing windows server_app_fabric
Introducing windows server_app_fabricIntroducing windows server_app_fabric
Introducing windows server_app_fabric
Marco Titta
 
Caching By Nyros Developer
Caching By Nyros DeveloperCaching By Nyros Developer
Caching By Nyros Developer
Nyros Technologies
 
Academy PRO: HTML5 Data storage
Academy PRO: HTML5 Data storageAcademy PRO: HTML5 Data storage
Academy PRO: HTML5 Data storage
Binary Studio
 
Html5 cache mechanism & local storage
Html5 cache mechanism & local storageHtml5 cache mechanism & local storage
Html5 cache mechanism & local storage
Sendhil Kumar Kannan
 
1Z0_997_21__5_.pdf.pdf
1Z0_997_21__5_.pdf.pdf1Z0_997_21__5_.pdf.pdf
1Z0_997_21__5_.pdf.pdf
MohamedHusseinEid
 
Ror caching
Ror cachingRor caching
Ror caching
Kashyap Parmar
 
Red Hat Storage Day New York - Persistent Storage for Containers
Red Hat Storage Day New York - Persistent Storage for ContainersRed Hat Storage Day New York - Persistent Storage for Containers
Red Hat Storage Day New York - Persistent Storage for Containers
Red_Hat_Storage
 
Data Streaming with Apache Kafka & MongoDB
Data Streaming with Apache Kafka & MongoDBData Streaming with Apache Kafka & MongoDB
Data Streaming with Apache Kafka & MongoDB
confluent
 
MayaData Datastax webinar - Operating Cassandra on Kubernetes with the help ...
MayaData  Datastax webinar - Operating Cassandra on Kubernetes with the help ...MayaData  Datastax webinar - Operating Cassandra on Kubernetes with the help ...
MayaData Datastax webinar - Operating Cassandra on Kubernetes with the help ...
MayaData Inc
 
Extending Analytic Reach
Extending Analytic ReachExtending Analytic Reach
Extending Analytic Reach
Agilisium Consulting
 
Extending Analytic Reach - From The Warehouse to The Data Lake by Mike Limcaco
Extending Analytic Reach - From The Warehouse to The Data Lake by Mike LimcacoExtending Analytic Reach - From The Warehouse to The Data Lake by Mike Limcaco
Extending Analytic Reach - From The Warehouse to The Data Lake by Mike Limcaco
Data Con LA
 
Scale Your Data Tier with Windows Server AppFabric
Scale Your Data Tier with Windows Server AppFabricScale Your Data Tier with Windows Server AppFabric
Scale Your Data Tier with Windows Server AppFabric
Wim Van den Broeck
 
Four Ways to Improve ASP .NET Performance and Scalability
 Four Ways to Improve ASP .NET Performance and Scalability Four Ways to Improve ASP .NET Performance and Scalability
Four Ways to Improve ASP .NET Performance and Scalability
Alachisoft
 
nHibernate Caching
nHibernate CachingnHibernate Caching
nHibernate Caching
Guo Albert
 
Building High Performance and Scalable Applications Using AppFabric Cache- Im...
Building High Performance and Scalable Applications Using AppFabric Cache- Im...Building High Performance and Scalable Applications Using AppFabric Cache- Im...
Building High Performance and Scalable Applications Using AppFabric Cache- Im...
Impetus Technologies
 
HBaseCon 2013: Using Coprocessors to Index Columns in an Elasticsearch Cluster
HBaseCon 2013: Using Coprocessors to Index Columns in an Elasticsearch Cluster HBaseCon 2013: Using Coprocessors to Index Columns in an Elasticsearch Cluster
HBaseCon 2013: Using Coprocessors to Index Columns in an Elasticsearch Cluster
Cloudera, Inc.
 
HBaseCon 2013: Using Coprocessors to Index Columns in an Elasticsearch Cluster
HBaseCon 2013: Using Coprocessors to Index Columns in an Elasticsearch Cluster HBaseCon 2013: Using Coprocessors to Index Columns in an Elasticsearch Cluster
HBaseCon 2013: Using Coprocessors to Index Columns in an Elasticsearch Cluster
Cloudera, Inc.
 
Microsoft Windows Server AppFabric
Microsoft Windows Server AppFabricMicrosoft Windows Server AppFabric
Microsoft Windows Server AppFabric
Mark Ginnebaugh
 
Architecting applications in the AWS cloud
Architecting applications in the AWS cloudArchitecting applications in the AWS cloud
Architecting applications in the AWS cloud
Cloud Genius
 
Introducing windows server_app_fabric
Introducing windows server_app_fabricIntroducing windows server_app_fabric
Introducing windows server_app_fabric
Marco Titta
 
Academy PRO: HTML5 Data storage
Academy PRO: HTML5 Data storageAcademy PRO: HTML5 Data storage
Academy PRO: HTML5 Data storage
Binary Studio
 
Html5 cache mechanism & local storage
Html5 cache mechanism & local storageHtml5 cache mechanism & local storage
Html5 cache mechanism & local storage
Sendhil Kumar Kannan
 
Red Hat Storage Day New York - Persistent Storage for Containers
Red Hat Storage Day New York - Persistent Storage for ContainersRed Hat Storage Day New York - Persistent Storage for Containers
Red Hat Storage Day New York - Persistent Storage for Containers
Red_Hat_Storage
 
Data Streaming with Apache Kafka & MongoDB
Data Streaming with Apache Kafka & MongoDBData Streaming with Apache Kafka & MongoDB
Data Streaming with Apache Kafka & MongoDB
confluent
 
MayaData Datastax webinar - Operating Cassandra on Kubernetes with the help ...
MayaData  Datastax webinar - Operating Cassandra on Kubernetes with the help ...MayaData  Datastax webinar - Operating Cassandra on Kubernetes with the help ...
MayaData Datastax webinar - Operating Cassandra on Kubernetes with the help ...
MayaData Inc
 
Extending Analytic Reach - From The Warehouse to The Data Lake by Mike Limcaco
Extending Analytic Reach - From The Warehouse to The Data Lake by Mike LimcacoExtending Analytic Reach - From The Warehouse to The Data Lake by Mike Limcaco
Extending Analytic Reach - From The Warehouse to The Data Lake by Mike Limcaco
Data Con LA
 
Scale Your Data Tier with Windows Server AppFabric
Scale Your Data Tier with Windows Server AppFabricScale Your Data Tier with Windows Server AppFabric
Scale Your Data Tier with Windows Server AppFabric
Wim Van den Broeck
 
Ad

Recently uploaded (20)

Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Ad

Handling Relational Data in a Distributed Cache

  • 1. Alachisoft .NET Performance Solutions How to Handle Relational Data in a Distributed Cache Iqbal Khan [email protected] Ph: +1 (925) 236-2125 www.alachisoft.com 1
  • 2. Alachisoft Following Applications Need Scalability 1. ASP.NET Apps  2. WCF & .NET Web Services  3. To quickly process very large amounts of data thru distribution Grid Computing Apps  5. To handle millions of requests Big Data Apps  4. To handle millions of users To process very large computations thru distribution Other .NET Server Apps  NCache To handle millions of requests www.alachisoft.com 2
  • 3. Alachisoft Data Storage is Scalability Bottleneck ASP.NET/WCF Example App Database ASP.NET/WCF Servers Database Servers Data Access Scale Web Farm Web Clients Http Calls ... NCache Load Balancer www.alachisoft.com ASP.NET Session Storage 3
  • 4. Alachisoft The Solution Scalable In-Memory Distributed Cache NCache NCache www.alachisoft.com 4
  • 5. Alachisoft What is an In-Memory Distributed Cache? 1. Cluster of multiple inexpensive cache servers  2. Synchronizes cache updates across all cache servers  3. Cache updates are immediately visible from all cache servers Linearly scales transaction & memory capacity  4. Pools their memory and CPU into one logical capacity Just add more cache servers to grow capacity Replicates data for reliability  NCache Intelligent replication without compromising performance & scalability www.alachisoft.com 5
  • 6. Alachisoft NCache: In-Memory Distributed Cache ASP.NET Web Apps WCF Web Services Grid Computing Apps (.NET) .NET Server Apps Distributed Cache Cluster Memory pooled from all cache servers Scale Horizontally Windows 2008/2012 (64-bit) Filesystem NCache Database Servers www.alachisoft.com Mainframe 6
  • 7. Alachisoft What Data to Cache? 1. Reference Data  2. Transactional Data  3. Does not change very frequently (but is not static) Changes frequently (as frequently as in a few seconds) Most Cached Data is Relational  NCache Comes from relational databases www.alachisoft.com 7
  • 8. Alachisoft Challenge: Cache versus Relational Data  Cache provides a Hashtable-like interface    Each item is separate and has a “key” and a “value”. “Value” is usually an “object” Relational data has relationships between entities  NCache This is a challenge for your application www.alachisoft.com 8
  • 9. Alachisoft Peek into Caching API  Read from the Cache     Add to the Cache     object obj = cache.Get(“myKey”); object obj = cache[“myKey”]; bool isPresent = cache.Contains(“myKey”); cache.Add(“myKey”, obj); cache.Insert(“myKey”, obj); cache[“myKey”] = obj; Remove from the Cache  NCache object obj = cache.Remove(“myKey”); www.alachisoft.com 9
  • 10. Alachisoft First Step: Use CacheDependency  Lets you manage relationships in the cache   One cached item depends on another   A depends on B and B depends on C. Change in C triggers both A & B Feature introduced by ASP.NET Cache   If target cached item updated/removed, dependent automatically removed Cascaded dependencies possible   Cache keeps track of a one-way “dependency” between cached items Key based dependency is our focus here NCache also provides it NCache www.alachisoft.com 10
  • 11. Alachisoft Second Step: Use Object Relational Mapping  Benefits of O/R Mapping    Benefits of O/R Mapping Tools     Cut down development time Improve code quality in persistence & domain objects Simplifies programming. No need to directly use ADO.NET Which O/R Mapping Tools to Use?    Simplifies programming by mapping domain objects to data model Promotes code reuse of persistence and domain objects Entity Framework (Microsoft) NHibernate (Open Source) At Least Map Domain Objects to Database    NCache Map to database entities Capture relationships in these objects Transform DataReader or DataTable into domain objects www.alachisoft.com 11
  • 12. Alachisoft Mapping Domain Objects to Database Data Model NCache www.alachisoft.com 12
  • 13. Alachisoft What is a Primary Object?  It is a domain object   Starting point for the application    Mapped to a table in the database Application fetches this objects first All other objects fetched in relation to this object All other objects fetched in relation to this object  NCache One-to-many and many-to-one relationships www.alachisoft.com 13
  • 14. Alachisoft Mapping Domain Objects to Database NCache www.alachisoft.com 14
  • 15. Alachisoft 1-1/n-1 Relationships in Distributed Cache  Strategy 1: cache related object with primary object  Strategy 2: cache related object separately NCache www.alachisoft.com 15
  • 16. Alachisoft 1-1/n-1 Relationships in Distributed Cache Cache related object with primary object NCache www.alachisoft.com 16
  • 17. Alachisoft 1-1/n-1 Relationships in Distributed Cache Cache related object separately NCache www.alachisoft.com 17
  • 18. Alachisoft 1-n Relationships in Distributed Cache  Strategy 1: cache related objects collection with primary object   Strategy 2: cache related objects separately separately   Cache entire collection as part of the primary object Cache entire collection as one item but separately Strategy 3: cache related objects from collections separately  NCache Cache each item of the collection separately www.alachisoft.com 18
  • 19. Alachisoft 1-n Relationships in Distributed Cache Cache related object collection separately NCache www.alachisoft.com 19
  • 20. Alachisoft 1-n Relationships in Distributed Cache Cache each object in related collection separately NCache www.alachisoft.com 20
  • 21. Alachisoft m-n Relationships in Distributed Cache  Many-to-many relationships don’t exist in domain objects  Instead, represented by two one-to-many relationships   E.g. Customer->Orders and Product->Orders Intermediary object contains many-to-one references  NCache E.g. Order has a reference to Customer and Product www.alachisoft.com 21
  • 22. Alachisoft Handling Collections in Distributed Cache  Scenario 1: cache entire collection as one item  Scenario 2: cache each collection item separately NCache www.alachisoft.com 22
  • 23. Alachisoft Handling Collections in Distributed Cache Cache entire collection as one item NCache www.alachisoft.com 23
  • 24. Alachisoft Handling Collections in Distributed Cache Cache each collection item separately NCache www.alachisoft.com 24
  • 26. Alachisoft Some Object Caching Features  Expirations    Locking (Pessimistic & Optimistic)    Lock/Unlock for pessimistic locking (writer-lock) Object versioning for optimistic locking (reader-lock) Bulk Operations   Absolute-time + idle-time Auto-reload data on expiration (if read-thru enabled) Bulk Get, Add, Insert, and Remove Async Operations  NCache Async Add, Insert, and Remove www.alachisoft.com 26
  • 27. Alachisoft Synchronize Cache with Data Sources  Synchronize with Relational Databases (SQL, Oracle, etc.)     SqlDependency OracleDependency DbDependency Synchronize with non-Relational Data Sources   NCache File based Cache Dependency Custom Cache Dependency www.alachisoft.com 27
  • 28. Alachisoft Data Grouping in the Cache  Group/Subgroup  Tags  Named Tags NCache www.alachisoft.com 28
  • 29. Alachisoft Searching the Cache  Parallel Queries with Object Query Language (OQL)   Parallel LINQ Queries   SQL-like query language to search cache based on object attributes Standard LINQ queries can search the cache Indexing Object Attributes for Querying  NCache Create indexes on object attributes to speed up queries www.alachisoft.com 29
  • 30. Alachisoft Some Other Features  NHibernate L2 Cache Provider   Entity Framework L2 Cache   Plug into NHibernate application without any code change Plug into Entity Framework application without any code change Dynamic Compact Serialization   NCache Faster and more compact then regular .NET serialization No code writing required www.alachisoft.com 30
  • 31. Alachisoft What to Do Next?     Find more about NCache Download 60-day Trial Request a Personalized LIVE Demo Read product Documentation Thank You NCache 4.1 www.alachisoft.com 31