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.

JBoss Data Grid Tech Lab

1.319 Aufrufe

Veröffentlicht am

Infinispan/JDG (JBoss Data Grid) Tech Lab.

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 (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/qURD } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/qURD } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download doc Ebook here { https://soo.gd/qURD } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... 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

JBoss Data Grid Tech Lab

  1. 1. JBoss Data Grid Tech Lab Ugo Landini Solution Architect, Red Hat versione 1.7 29 Jan 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 Node RDBMS 1. read A A client 1 VM1 cache 2. write A to cache3. reads A
  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 cache VM client 1 VM client 2 VM client 3 VM cache VM 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 • “Networked memory” • Storage distribuito • 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 al Consistent Hashing • Memory-based, quindi low-latency • ma possibile anche gestione persistenza
  38. 38. Data Grid > Distributed Cache • Diverse Topologie • Querying • Task Execution e Map/Reduce • Partition Handling • 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
  40. 40. 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
  41. 41. Esempi di topologie
  42. 42. Distributed senza replica
  43. 43. Distributed con una replica sync
  44. 44. Distributed con una replica async
  45. 45. Replicated
  46. 46. 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
  47. 47. 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 configurazione
  48. 48. Consistent Hashing in Infinispan • Self healing • No single point of failure • Highly concurrent • MVCC locking
  49. 49. Consistent Hashing • Algoritmo di hashing di default per il Distributed mode: MurmurHash3. • Può essere modificato o sostituito: ha senso 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
  50. 50. 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
  51. 51. 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 • Nota: nessuna relazione con la virtualizzazione :)
  52. 52. 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
  53. 53. 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
  54. 54. 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
  55. 55. DEMO Time: Consistent Hashing
  56. 56. • Abilitando il Partition Handling, quando il JDG “sospetta” uno split brain, le partizioni possono entrare in “Degraded mode” • Una partizione in Degraded mode può leggere/scrivere solo le chiavi che sono “fully owned”, • Le richieste per chiavi che non sono “fully owned” risulteranno in una Availability Exception • Il Partition Handling è disponibile sia in Library mode che in Client/Server mode Partition Handling
  57. 57. • Cache Store • Non solo in memoria! • Write through e write behind (ACK sincrono o asincrono) • Pluggable “drivers” per diversi store • File System, JPA, LevelDB (supported) • MongoDB, Cassandra, BerkeleyDB, ecc. (community) Persistenza dei dati
  58. 58. Eviction dei dati • Evita al sistema degli Out Of Memory • Le entry possono anche essere “passivate” su disco (in diverse modalità, vedi CacheStore)
  59. 59. Eviction dei dati • Evita al sistema degli Out Of Memory • Le entry possono anche essere “passivate” su disco (in diverse modalità, vedi CacheStore)
  60. 60. 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
  61. 61. Expiry dei dati
  62. 62. Eviction/Expiry: differenze • Tutte e due le tecniche evitano gli Out Of Memory • I dati “Evicted” a differenza di quelli “Expired” possono essere mantenuti nel Grid per usi futuri con la Passivazione • Eviction è una configurazione per “cache”, Expiration per dato (e dunque globale) • Expiration è una caratteristica di business, Eviction una di sistema
  63. 63. 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 API
  64. 64. Listeners / Notifications • Capacità di ricevere eventi • A livello di Cache o di CacheManager • Cambio di topologia • Aggiunta/Rimozione/Modifica di oggetti (cluster wide ed anche su Hotrod)
  65. 65. 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
  66. 66. 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)
  67. 67. Map / Reduce
  68. 68. Map / Reduce
  69. 69. Map / Reduce • Prossimamente Infinispan/JDG sarà utilizzabile come Hadoop store • Implementerà le api HDFS • Coming soon… in JDG 7
  70. 70. 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
  71. 71. Cross Site Replication
  72. 72. Cross Site Replication • Architetture Follow the Sun • Permette di avere più Cluster che si sincronizzano fra loro • In sync o async
  73. 73. Standardizzazione API • JSR-107 • Java Temporary Caching API • Confermato a Gennaio 2015 • In roadmap per JDG 6.5 • JSR-347 • Data Grids for the Java Platform • JSR Ritirato a Gennaio 2015
  74. 74. Management Tooling • Infinispan Command Line Console • JMX • RHQ/JON Plugin • Hawt.io plugin (si, la stessa console di Fuse :) )
  75. 75. • Side Cache • Inline Cache • Compute Grid Data Grid Usage Patterns
  76. 76. • In una side cache, è l’applicazione che gestisce direttamente la cache e lo store principale • Esempio: accesso alla cache, se K non è presente l’applicazione effettua una richiesta al DB e poi inserisce K Side cache
  77. 77. • In una inline cache, l’applicazione dialoga solo con la cache • La cache ha uno store configurato via Cache Store • Esempio: accesso alla cache, se K non è presente la cache stessa chiede al DB ed inserisce K Inline cache
  78. 78. • Cache distribuita • Utilizzo della griglia per sottomettere Distributed Task e/o Map/Reduce • Possibilità di processare terabyte di dati molto velocemente • multiple nodes, multiple cores,“piccoli” set di dati per ogni nodo Compute Grid
  79. 79. Modi di utilizzo • Embedded mode / Library mode • Direttamente dalla JVM • Client/Server mode • REST • Memcached • Hot Rod
  80. 80. Library Mode
  81. 81. Il Library mode da accesso a tutte le API e le feature • Map-like key/value store • Transazioni Locali e Globali, Batching • Map/Reduce e Distexec Library Mode
  82. 82. Client/Server mode Protocolli supportati • REST • Memcached • Hot Rod
  83. 83. • 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 Client/Server Mode
  84. 84. REST • Utile per client non Java per i quali non esista un protocollo • HTTP Transport: Firewall friendly • E’ ovviamente più lento delle alternative
  85. 85. 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
  86. 86. Hot Rod • Wire protocol per comunicazioni client server • Open Source • Language independent • Built-in failover e load balancing • Smart routing
  87. 87. Confronto protocolli Protocol Client Libs Smart Routing Load Balancing/ Failover TX Listeners M/R Dist Querying 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
  88. 88. Confronto protocolli Protocol Client Libs Smart Routing Load Balancing/ Failover TX Listeners M/R Dist Querying 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 Esempio di ciclo virtuoso OSS
  89. 89. DEMO Time: Advanced features
  90. 90. Data Security • User Authentication • SASL • Role Based Access Control (RBAC) • Utenti, Ruoli e mapping fra ruoli ed operazioni su Cache e Cache-Manager • Node authentication & Authorisation • Evitare che nodi “malevoli” possano fare join del cluster • Encrypted communication fra i nodi del cluster
  91. 91. Supporto Enterprise per JDG 6.4
  92. 92. Supported JDK • Oracle,OpenJDK ed IBM JDK • 1.6, 1.7 ed 1.8 • Azul ZVM • 14.09
  93. 93. Container supportati (Library Mode)
  94. 94. Container supportati (Client/Server)
  95. 95. More details… • Molti Database relazionali (Oracle, DB2, ecc.) • Modulo camel-jbossdatagrid per Fuse 6.1 • Modulo infinispan-spring3 (Spring 3.2.9) • Modulo infinispan-spring4 (Spring 4.1.0) https://access.redhat.com/articles/115883
  96. 96. Chi usa ?
  97. 97. Chi usa i Data Grids? • Chiunque abbia bisogno di: • massive data volumes • high transactional throughput • strict performance characteristics • uptime elevati • offloading DB (anche per risparmi su licensing)
  98. 98. Chi usa i Data Grids? • Telco • Real-time, Global routing, tracking information: geolocation, user data, user authorization, ecc. • Retail • Cataloghi Online per milioni di utenti concorrenti (user tracking, user personalization, listini, sconti, promozioni, ecc.)
  99. 99. Chi usa i Data Grids? • Transportation and logistics • Real-time, Global routing, tracking information: geolocation, delivery priority, routing, ecc. • Financial Services • Stock Trading simulations
  100. 100. Chi usa i Data Grids? • Media and entertainment • Gaming online, On-demand streaming video, user data • Generic offloading • Diminuire workload dei Database (e costi di licenza)
  101. 101. Chi usa i Data Grids? • Telco: caso d’uso di Softbank in Giappone • Inline cache • circa 300 nodi di JDG con 64GB ciascuno • 500 diverse cache • 50% heap, circa 10 TB di dati online • prossimo upgrade a 500 nodi (16 TB)
  102. 102. Corso di formazione JB453 • Corso specifico per sviluppatori JBoss Data Grid (Gennaio 2015) • ILT (Instructor Led Training) • https://www.redhat.com/it/services/training/ jb453-red-hat-jboss-data-grid-development
  103. 103. Link e risorse JDG JBoss Data Grid • Product page: http://www.redhat.com/products/jbossenterprisemiddleware/data-grid/ • JDG JB 453 https://www.redhat.com/it/services/training/jb453-red-hat-jboss-data-grid-development 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

×