You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@training.apache.org by GitBox <gi...@apache.org> on 2019/07/26 13:29:25 UTC

[GitHub] [incubator-training] lfrancke commented on a change in pull request #33: TRAINING-18: Apache Ignite: JDK requirements, put & get operations

lfrancke commented on a change in pull request #33: TRAINING-18: Apache Ignite: JDK requirements, put & get operations
URL: https://github.com/apache/incubator-training/pull/33#discussion_r307741180
 
 

 ##########
 File path: content/Ignite/src/main/asciidoc/index.adoc
 ##########
 @@ -99,3 +125,192 @@ Both server and client nodes will log
 `Topology snapshot [ver=2, locNode=b5fc314f, servers=1, clients=1, state=ACTIVE, CPUs=12, offheap=3.2GB, heap=7.1GB]`
 
 This means nodes detected each other
+
+== Save data into Grid
+Ignite supports JCache JSR 107 API,
+`IgniteCache<K,V> extends javax.cache.Cache<K,V>`
+
+[source,java]
+----
+include::{sourcedir}/example/PutGetExample.java[tags=contains,indent=0]
+----
+
+== Dynamic Cache
+----
+ignite.getOrCreateCache(CacheConfiguration cfg)
+----
+
+Creates an instance of the cache on the fly
+
+----
+ignite.createCache(CacheConfiguration cfg)
+----
+
+Creates cache instance
+
+Ignite will create and deploy the cache across all server cluster members
+
+Cache will be deployed to any new joined node
+
+Limitation - not possible to create new cache in transaction
+
+== Static cache
+Accessed using method
+----
+ignite.cache(String name)
+----
+Will return existing cache or null
+
+- No cache creation under running transaction
+
+- User has to provide configuration before node startup
+
+== Application and cache
+Applications are usually made up of multiple caches
+
+- one for each data type to be stored
+
+-- This is a best practice
+
+-- If you have two classes, Card and Client, you should have two caches
+
+== Replicated and partitioned
+
+image::replicated_vs_partitioned.png[]
+
+Replicated - Cache A
+Partitioned - Cache B & C
+Replicated, use case:
+rare write, often - read, e.g. dictionary
+
+== Partitioned Caches
+Most common usage of cache
+
+Defaults
+
+. 1024 partitions
+. No redundancy
+. In-memory - volatile
+
+WARNING: Configure backups for fault tolerance
+
+For most cases: 1 backup is enough
+
+== Cache Atomicity Mode
+ATOMIC
+
+- distributed transactions not supported; distributed locking not supported
+- higher performance and throughput ratios
+
+TRANSACTIONAL
+
+- ACID Compliant
+- Transaction over several caches requires all caches to be transactional
+
+TRANSACTIONAL_SNAPSHOT
+
+- ACID for SQL Queries
+
+== Non SQL query Scan query
+Provides iteration over cache data
+
+May have additional filter
+
+Filter is sent do server
 
 Review comment:
   ```suggestion
   Filter is sent to server
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services