logo资料库

High Performance in-memory computing with Apache Ignite.pdf

第1页 / 共360页
第2页 / 共360页
第3页 / 共360页
第4页 / 共360页
第5页 / 共360页
第6页 / 共360页
第7页 / 共360页
第8页 / 共360页
资料共360页,剩余部分请下载后查看
High Performance in-memory computing with Apache Ignite Building low latency, near real time application Shamim Ahmed Bhuiyan, Michael Zheludkov and Timur Isachenko This book is for sale at http://leanpub.com/ignite This version was published on 2017-05-09 This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and many iterations to get reader feedback, pivot until you have the right book and build traction once you do. © 2016 - 2017 Shamim Ahmed Bhuiyan
Tweet This Book! Please help Shamim Ahmed Bhuiyan, Michael Zheludkov and Timur Isachenko by spreading the word about this book on Twitter! The suggested hashtag for this book is #shamim_ru. Find out what other people are saying about the book by clicking on this link to search for this hashtag on Twitter: https://twitter.com/search?q=#shamim_ru
In memory of my Father. - Shamim Ahmed Bhuiyan
Contents Preface . . . . . . . . . . . What this book covers . . Code Samples Support . . . . . . . . . . . . . About the authors . Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Introduction . . . . . . . . . . . . . . . . . . . . . . What is Apache Ignite? . . Modern application architecture with Apache Ignite . Who uses Apache Ignite? . . Why Ignite instead of others? . . . . Our Hope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter one: Installation and the first Ignite application . . . . Pre-requisites . Installation . . . Run multiple instances of Apache Ignite in a single host . Configure a multi-node cluster in different host . . . Rest client to manipulate with the Apache Ignite . . . . Java client . . SQL client . Conclusion . . . . . What’s Next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 2 3 4 5 6 7 8 13 13 14 15 15 15 18 19 20 23 27 32 33 34 34 35 35 37 38 39 40 . . . . . . . . . . . . . . . Chapter two: Architecture overview . . . . . . Functional overview . . . . . Cluster Topology . . . Client and Server . . . . Embedded with the application . Server in separate JVM (real cluster topology) . Client and Server in separate JVM on single host . . Caching Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CONTENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Caching strategy . . Partitioned caching topology . Replicated caching topology . . Local mode . . . . . . . Cache-aside . . Read-through and Write-through . . Write behind . . . . . . . . . . Data model . . CAP theorem and where does Ignite stand in? . . Clustering . . . . . . . . . . . . . . . . Cluster group . . . Data collocation . . Compute collocation with Data . . Zero SPOF . . . . . . . . . How SQL queries works in Ignite . . Multi-datacenter replication . . . Asynchronous support . . . . . Resilience . . Security . . . . . . . . Key API . . . . . Conclusion . What’s next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MyBatis 2ⁿ level cache . Hibernate 2ⁿ level cache . . Chapter three: In-memory caching . Apache Ignite as a 2ⁿ level cache . . . . . . . . . . . . . Java method caching . . Web session clustering with Apache Ignite . . Apache Ignite as a big memory, off-heap memory . . Conclusion . What’s next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter four: Persistence . . . . . . . . . . . . . . Cache queries . Persistence Ignite’s cache . . . Persistence in RDBMS (PostgreSQL) . Persistence in MongoDB . . . . . . . . . . . . . . . . . . Projection and indexing with annotations . Query API . . Scan queries . Text queries . . SQL queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 41 41 42 42 43 44 44 48 50 50 52 53 55 56 56 58 59 60 60 61 61 62 . 63 . 64 . 74 . 88 . . 96 . 109 . 116 . 116 . 117 . 118 . 121 . 128 . 135 . 137 . 142 . 145 . 147 . 150
CONTENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Expiration . . Eviction . Transaction . . Collocated distributed Joins . . Non-collocated distributed joins . Performance tuning SQL queries . . . . . Apache Ignite with JPA . Expiration & Eviction of cache entries in Ignite . . . . . . . . . . . . . . . . . . . . Ignite transactions . . Transaction commit protocols . . . Optimistic Transactions . . Pessimistic Transactions . . . Performance impact on transaction . . . Conclusion . What’s next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Hadoop accelerator Ignite for Apache Spark . Chapter five: Accelerating Big Data computing . . . . . . . . . . . . In-memory Map/Reduce . . . Using Apache Pig for data analysis . Near real-time data analysis with Hive . . Replace HDFS by Ignite In-memory File System (IGFS) Hadoop file system cache . . . . . . . . . . . . . . . . Apache Spark – an introduction . . . . IgniteContext . . . . . IgniteRDD . . . . . Preparing the sandbox . . Spark-shell to run Spark jobs . . . Spark application example in Scala to share states . . . Conclusion . What’s next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Camel data streamer . . Chapter six: Streaming and complex event processing . . . . . . . . . . Introducing data streamer . . IgniteDataStreamer StreamReceiver . . . . StreamVisitor . . . . . . . . . . Direct Ingestion . . Mediated Ingestion . . . Flume streamer . Storm data streamer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 . 154 . 156 . 156 . 166 . 166 . 170 . 174 . 176 . 178 . 180 . 181 . 181 . 182 . 182 . 183 . 183 . 185 . 197 . 204 . 210 . 225 . 228 . 229 . 231 . 231 . 232 . 235 . 238 . 240 . 241 . 242 . 243 . 244 . 250 . 250 . 253 . 255 . 260 . 264 . 274
CONTENTS Conclusion . What’s next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Compute grid . Chapter seven: Distributed computing . . . . . . . . Distributed Closures . . . . MapReduce and Fork-join . . . . Per-Node share state . . . Distributed task session . . . Fault tolerance and checkpointing . . Collocation of computation and data . Job scheduling . . . . . . . . . . . . . . . . . . . Developing services . Cluster singleton . Service management and configuration . . . Service Grid . . . . . . . . . . . . . . . . . . . . . . . . . Developing microservices in Ignite . Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 . 285 . 286 . 288 . 290 . 295 . 303 . 310 . 313 . 323 . 329 . 331 . 333 . 338 . 340 . 343 . 352
分享到:
收藏