Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

Data grid

1.208 Aufrufe

Veröffentlicht am

An introduction to JBoss Data Grid

Veröffentlicht in: Software
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier

Data grid

  1. 1. JBoss Data Grid Infinispan Ugo Landini Solution Architect, Red Hat versione 1.4 06 Aug 2014
  2. 2. Agenda • NoSQL: introduzione • Consistent Hashing e CAP Theorem • Cos’è un Data Grid • Infinispan/JDG features
  3. 3. Big Data new generation of technologies ... designed to economically extract value from very large volumes of a wide variety of data, by enabling high velocity capture, discovery and/or analysis IDC, 2012
  4. 4. NoSQL Not Only SQL. ! Definizione A: un sistema di storage alternativo ad un RDBMS ! Definizione B: un qualsiasi sistema utilizzato in alternativa ad un RDBMS
  5. 5. Eventi chiave • Google BigTable (2005, sviluppi iniziati nel 2004) • Amazon rilascia il paper con il design di Dynamo (2007)
  6. 6. NoSQL • K/V Store • Document Store • Column based DB • Graph DB • ma anche XML, Object DB, Multidimensional, Grid/Cloud, …
  7. 7. “Classic” NoSQL MongoDB CouchDB Redis Riak Infinispan LevelDB Voldemort Neo4J BigTable HBase Cassandra Elastic Search Document K/V Column Oriented Graph
  8. 8. Grid & Cloud NoSQL Infinispan/ JDG Coherence Gemfire HazelCast Gigaspaces Grid & Cloud
  9. 9. NoSQL • Impossibile categorizzare in maniera sistematica • Moltissime sfumature • Molti casi di “Convergenza Evolutiva”
  10. 10. CAP Theorem
  11. 11. CAP Theorem • Tre caratteristiche di un Sistema Distribuito • Consistency • Availability • Partition Tolerance
  12. 12. Consistency • Tutti i nodi di un sistema distribuito vedono gli stessi dati allo stesso momento
  13. 13. Availability • La garanzia che ogni richiesta riceverà una risposta (positiva o negativa)
  14. 14. Partition Tolerance • Il sistema è in grado di continuare ad operare in caso di perdita di connettività fra i nodi (es: split brain)
  15. 15. CAP Theorem
  16. 16. CAP Theorem: la versione popolare • CAP è stato formulato nel 2000 • La spiegazione semplice: C, A, P: scegline due è stata abusata in questi anni da diversi vendor ed è considerata una tautologia • Nella realtà la questione è più complessa, e dipende dai vincoli e dai tradeoff del sistema
  17. 17. CAP Theorem: modern version • In altre parole, è vero che è impossibile avere una Availability PERFETTA ed anche la consistenza dei dati in presenza di un partizionamento, che è però un evento raro
  18. 18. CAP Theorem: modern version • I sistemi moderni possono prendere decisioni diverse rispetto a C ed A: • per operazioni diverse • per dati diversi • in momenti diversi
  19. 19. CAP Theorem: modern version • Inoltre, C, A e P non sono binarie: • A è ovviamente continua • C ha diversi livelli • Anche P ha delle sfumature, per esempio ci può essere un disaccordo se in un sistema ci sia effettivamente un partizionamento o meno
  20. 20. CAP Theorem: modern version • Più informazioni nell’articolo di Eric Brewer “CAP 12 anni dopo” • http://www.infoq.com/articles/cap-twelve-years- later-how-the-rules-have-changed
  21. 21. Storia di un’applicazione
  22. 22. Architettura con DB tradizionale
  23. 23. Limiti architetturali • I Database non scalano e sono un SPF • Tecnologia datata e tipicamente “conservativa” • Non cloud-friendly e virtualization-friendly • Di solito vuole hardware “speciale”
  24. 24. Come i programmatori risolvono il problema: local caching client 1 3. reads A 2. write A to cache Node 1. read A RDBMS A VM1 cache
  25. 25. Local caching • Non scala al “livello successivo” • poca memoria • no HA
  26. 26. Local caching distribuito
  27. 27. Local caching distribuito • Local caching distribuito su più nodi • Gestione dei Dirty reads? (multiple writes, invalidation, ecc.) • Gestione del Write behind?
  28. 28. “Clustering” della cache
  29. 29. “Clustering” della cache • Cache topology influisce sui client • Startup time che aumentano • start della cache, transfer state • JVM tunings incompatibili • GC • Non JVM clients
  30. 30. Cache servers RDBMS VM cache client 1 VM client 2 VM client 3 VM VM cache 1. Write 2. Update Cache 3. Read cluster
  31. 31. Cache servers • Protocolli • open o proprietari • Transazionalità • Topologie: replica totale o dati distribuiti • Smart routing
  32. 32. Consistent Hashing
  33. 33. Consistent Hashing • Hashing Wheel: una “ruota” matematica sulla quale vengono effettuati gli hash delle K (chiavi) • Ma anche gli hash dei nodi che partecipano al cluster • La posizione della chiave sulla ruota, rispetto a quella dei nodi, determina chi è il nodo master per quella chiave (e quali nodi contengono le eventuali repliche)
  34. 34. Cos’è un Data Grid?
  35. 35. Cos’è un Data Grid? • Motore per gestione di storage in memoria • Tipicamente distribuito in un cluster • “Networked memory” • Una distributed cache “on steroids” • Un NoSQL Transazionale
  36. 36. Perchè un Datagrid? • Scalabilità superiore • Minore latenza • Ma… • ... tecnologia nuova da imparare • ... migrazione applicazioni
  37. 37. Caratteristiche di un Data Grid • Un semplice key/value storage • Motore di search per Document storage • Scalabilità lineare, elasticità e fault tolerance grazie ad algoritmi distribuiti • Spesso è memory-based, quindi low-latency
  38. 38. Data Grid > Distributed Cache • Diverse Topologie • Querying • Task Execution e Map/Reduce • Controllo sulla colocation dei dati per ottenere il massimo delle performance
  39. 39. Cos’è Infinispan/JDG? • Open Source (Apache) data grid platform • Basato su alcune delle idee di JBoss Cache • Basato su alcune delle idee di Amazon Dynamo • Progetto partito nel 2009 • Base per JBoss Data Grid (JDG)
  40. 40. Cos’è Infinispan/JDG? • Può essere configurato in maniera ACID, privilegiando la consistenza e l’availability • Può essere configurato in maniera BASE, sacrificando la Consistency
  41. 41. Topologie (Cluster modes) • LOCAL • come una semplice cache locale (EHCache) • INVALIDATION • no sharing • REPLICATED • Tutti i nodi sono identici, la capacità totale è quella del singolo nodo. Ex: 2 nodi da 8Gb = 8Gb totali • DISTRIBUTED • La capacità totale è la somma dei singoli nodi meno le repliche. Ex: 10 nodi da 8Gb con 1 replica = 40 Gb totali
  42. 42. Esempi di topologie
  43. 43. Distributed senza replica
  44. 44. Distributed con una replica sync
  45. 45. Distributed con una replica async
  46. 46. Replicated
  47. 47. Come scegliere • Replicated: • “Piccoli” set di dati con alte % di letture e pochi cambiamenti (Ex: Comuni, CAP) • Distributed: • Molti dati: scalare linearmente con il numero dei nodi • effettuare M/R o Distexec
  48. 48. Come scegliere • Importante: la modalità di clustering si applica per Cache e non per Grid (CacheManager) • In uno stesso cluster è dunque possibile avere diverse Cache, ognuna con la sua topologia
  49. 49. Consistent Hashing in Infinispan • Self healing • No single point of failure • Highly concurrent • MVCC locking
  50. 50. Consistent Hashing • Algoritmo di hashing di default per il Distributed mode: MurmurHash3. • Può essere modificato o sostituito: ottima idea se la K è un valore che già di per se individua un criterio di partizionamento. • Può essere “ottimizzato” tramite Server Hinting, Virtual Servers, Grouping e Key Affinity
  51. 51. Hashing: Server Hinting • Server Hinting • una tripla di valori (site, rack, server) • E’ un “Aiuto” al consistent hashing per aumentare l’Availability complessiva del sistema • Utile per esempio per evitare che le repliche di un dato risiedano nello stesso rack
  52. 52. Hashing: Virtual Servers • Numero di “segmenti” in cui si partiziona logicamente un cluster • Migliora la distribuzione dei nodi sull’hashing wheel e dunque la ripartizione delle chiavi stesse • Default: 60
  53. 53. Hashing: Grouping • Colocation dei dati: lo stesso nodo contiene il dato X ma anche i dati afferenti ad X (es: anagrafica cliente e suoi movimenti sul conto) • Si definisce un “gruppo” per il quale il Data Grid garantisce che gli oggetti appartenenti saranno presenti sullo stesso nodo • Si lavora sui pattern di accesso ai dati più frequenti
  54. 54. Hashing: Key Affinity • Scopo simile alle Grouping API: il Key Affinity Service è un servizio attraverso il quale possiamo richiedere un ID di cui siamo certi che verrà gestito da un particolare nodo • Grouping e/o Key Affinity sono fondamentali se si vuole raggiungere il Nirvana del Data Grid
  55. 55. Nirvana del Data Grid • Tutti i dati che servono ad una applicazione sono disponibili in locale, e dunque alla distanza di una singola chiamata Java
  56. 56. Persistenza dei dati • Cache Store • Non solo in memoria! • Write through e write behind (ACK sincrono o asincrono) • Pluggable “drivers” per diversi store • File System, JDBC, LevelDB • MongoDB, JPA, Cassandra, BerkeleyDB, ecc.
  57. 57. Eviction dei dati • Evita al sistema degli Out Of Memory • Le entry possono anche essere “passivate” su disco (in diverse modalità, vedi CacheStore)
  58. 58. Expiry dei dati • Si assegna una “vita” al dato stesso (lifespan) o un tempo massimo di “non utilizzo” (max idle time) • Dopodiché superati questi valori il dato verrà invalidato e rimosso dal Data Grid (senza passivazione) • Evita di doversi scrivere job “spazzini” • Evita degli Out Of Memory
  59. 59. Eviction/Expiry: differenze • Tutte e due le tecniche servono fondamentalmente per evitare gli Out Of Memory • I dati “Evicted” a differenza di quelli “Expired” possono essere mantenuti nel Grid per usi futuri con la Passivazione
  60. 60. Transactions • A differenza della maggior parte dei Database “NoSQL”, Infinispan ha un full support per le transazioni • Local Transactions • Global Transactions (XA): individua il TX Manager dell’AS che lo ospita e lo usa • Batching (come le Global, fra diversi cluster Infinispan)
  61. 61. Listeners / Notifications • Capacità di ricevere eventi • A livello di Cache o di CacheManager • Cambio di topologia • Aggiunta/Rimozione/Modifica di oggetti
  62. 62. Querying the Grid • Modulo Infinispan-query • utilizza Hibernate Search e Lucene • Querying via DSL • Gli indici di Lucene possono essere in memoria, su disco o anche essi nella griglia
  63. 63. Map / Reduce • Map/Reduce è un algoritmo reso famoso da Google per l’implementazione del suo famoso algoritmo di ricerca distribuito • M/R permette di effettuare delle operazioni “globali” sulla griglia • Ogni nodo lavora sui dati di sua competenza (Map) • I risultati vengono poi aggregati (Reduce)
  64. 64. Map / Reduce
  65. 65. Map / Reduce
  66. 66. Distexec: Distributed Execution • Distexec permette di sottomettere dei “task” alla griglia • Il task può essere eseguito su tutti i nodi o su un sottoinsieme dei nodi • Il task può modificare i dati stessi del Grid
  67. 67. Cross Site Replication
  68. 68. Cross Site Replication • Architetture Follow the Sun • Permette di avere più Cluster che si sincronizzano fra loro • In sync o async
  69. 69. Management Tooling • Infinispan Command Line Console • JMX • RHQ/JON Plugin • Hawt.io plugin (si, la stessa console di Fuse :) )
  70. 70. Modi di utilizzo • Embedded mode / Library mode • Direttamente dalla JVM • Client/Server mode • REST • Memcached • Hot Rod
  71. 71. Library Mode
  72. 72. Library Mode Il Library mode da accesso a tutte le API e le feature • Map-like key/value store • Querying, JPA-like layer (Hibernate OGM) • Listener e Notification • Transazioni Locali e Globali, Batching • Map/Reduce e Distexec
  73. 73. Client/Server mode Protocolli supportati • REST • Memcached • Hot Rod
  74. 74. Client/Server Mode • Non tutte le API sono a disposizione su protocolli remoti • Ci sono differenze di feature per le diverse API • Il grid può però scalare indipendentemente ed essere accessibile a diversi sistemi
  75. 75. REST • Utile per client non Java per i quali non esista un protocollo • HTTP Transport: Firewall friendly • E’ ovviamente più lento delle alternative
  76. 76. Memcached protocol • Protocollo text based molto diffuso • Clustering • State sharing • Non ha configurazione dinamica: se un nodo cade va riconfigurata la lista dei server • Utile per swap-in di Memcached, CouchDB o CouchBase
  77. 77. Hot Rod • Wire protocol per comunicazioni client server • Open Source • Language independent • Built-in failover e load balancing • Smart routing
  78. 78. Confronto protocolli Protocol Client Libs Smart Routing Load Balancing/ Failover TX Listeners M/R Dist Search Cluster separato Library mode inVM N/A Yes Dinamico Yes Yes Yes Yes Yes No REST Text HTTP No Qualsiasi HTTP load balancer No No No No No Yes Memcached Text Molte No Solo con predefined server list No No No No No Yes Hot Rod Binary Java/ Python/ C++ Yes Dinamico Locali con MVCC Yes (6.4) No No Yes (6.3) Yes
  79. 79. Confronto protocolli Protocol Client Libs Smart Routing Load Balancing/ Failover TX Listeners M/R Dist Search Cluster separato Library mode inVM N/A Yes Dinamico Yes Yes Yes Yes Yes No REST Text HTTP No Qualsiasi HTTP load balancer No No No No No Yes Esempio di ciclo virtuoso OSS Memcached Text Molte No Solo con predefined server list No No No No No Yes Hot Rod Binary Java/ Python/ C++ Yes Dinamico Locali con MVCC Yes (6.4) No No Yes (6.3) Yes
  80. 80. Chi usa ?
  81. 81. Chi usa i Data Grids? • Chiunque abbia bisogno di: • massive data volumes • high transactional throughput • strict performance characteristics • uptime elevati
  82. 82. Link e risorse JDG JBoss Data Grid • Product page: http://www.redhat.com/products/jbossenterprisemiddleware/data-grid/ ! Infinispan • Project page: http://www.infinispan.org • Blog: http://blog.infinispan.org • Twitter: http://twitter.com/infinispan • Community wiki e docs: http://community.jboss.org/wiki/Infinispan

×