Red Hat Data Grid 8.1 Migrating to Data Grid 8
Total Page:16
File Type:pdf, Size:1020Kb
Red Hat Data Grid 8.1 Migrating to Data Grid 8 Data Grid Migration Guide Last Updated: 2021-05-27 Red Hat Data Grid 8.1 Migrating to Data Grid 8 Data Grid Migration Guide Legal Notice Copyright © 2021 Red Hat, Inc. The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/ . In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version. Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law. Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries. Linux ® is the registered trademark of Linus Torvalds in the United States and other countries. Java ® is a registered trademark of Oracle and/or its affiliates. XFS ® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries. MySQL ® is a registered trademark of MySQL AB in the United States, the European Union and other countries. Node.js ® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project. The OpenStack ® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community. All other trademarks are the property of their respective owners. Abstract This guide provides detailed information to help you successfully migrate to Red Hat Data Grid 8 from previous versions. Table of Contents Table of Contents .C . H. .A . P. .T .E . R. 1.. .R . E. .D . .H . A. .T . .D . A. .T . A. G. .R . I.D . 5. 1.1. DATA GRID DOCUMENTATION 5 1.2. DATA GRID DOWNLOADS 5 1.3. MAKING OPEN SOURCE MORE INCLUSIVE 5 .C . H. .A . P. .T .E . R. 2. D. .A . T. .A . .G . .R .I .D . .8 . 6. 2.1. MIGRATION TO DATA GRID 8 6 2.2. MIGRATION PATHS 6 2.3. COMPONENT DOWNLOADS 6 Maven Repository 7 Data Grid Server 7 Modules for JBoss EAP 8 Tomcat Session Client 8 Hot Rod Node.js Client 8 Source Code 8 .C . H. .A . P. .T .E . R. 3. M. I.G . .R . A. .T .I .N . G. D. .A . T. .A . .G . R. .I .D . .S .E . R. .V . E. .R . I. N. .S . T. A. .L . L. .A . T. I.O . .N . S. 9. 3.1. DATA GRID 8 SERVER ARCHITECTURE 9 3.2. DATA GRID SERVER CONFIGURATION 9 Dynamic configuration 9 Static configuration 10 Cache container configuration 10 Server configuration 11 3.3. DATA GRID SERVER ENDPOINT AND NETWORK CONFIGURATION 12 Interfaces 13 Data Grid 7.x 13 Data Grid 8 13 Socket Bindings 13 Data Grid 7.x 13 Data Grid 8 14 Endpoints 14 Data Grid 7.x 14 Data Grid 8 14 3.4. DATA GRID SERVER SECURITY 14 3.4.1. Security Realms 14 Supported Security Realms 15 3.4.2. Server Identities 15 3.4.3. Endpoint Authentication Mechanisms 16 Hot Rod SASL Authentication Mechanisms 16 HTTP (REST) Authentication Mechanisms 17 Authenticating EAP Applications 18 3.4.4. Logging 18 Access Logs 18 3.5. SEPARATING DATA GRID ENDPOINTS 19 3.6. DATA GRID SERVER SHARED DATASOURCES 21 3.7. DATA GRID SERVER JMX AND METRICS 21 3.8. DATA GRID SERVER CHEATSHEET 22 Starting Servers 22 Starting the CLI 22 Creating Users 22 Stopping Servers 23 1 Red Hat Data Grid 8.1 Migrating to Data Grid 8 Listing Available Command Options 23 7.x to 8 Reference 23 .C . H. .A . P. .T .E . R. 4. .M . I. G. .R . A. .T . I.N . G. D. A. .T .A . .G . .R .I .D . .C . O. .N . .F .I G. U. .R . A. .T . I.O . N. .2 . 4. 4.1. DATA GRID CACHE CONFIGURATION 24 4.1.1. Cache Encoding 25 4.1.2. Cache Health Status 25 4.1.3. Data Grid 8.1 Configuration Changes 26 New and Modified Elements and Attributes 26 Deprecated Elements and Attributes 26 Removed Elements and Attributes 27 4.2. EVICTION CONFIGURATION 27 4.2.1. Storage Types 27 Changes in Data Grid 8 27 Object Storage in Data Grid 8 28 Off-Heap Storage in Data Grid 8 28 Off-Heap Address Count 28 Binary Storage in Data Grid 8 28 4.2.2. Eviction Threshold 28 Eviction based on total number of entries 29 Eviction based on maximum amount of memory 29 4.2.3. Eviction Strategies 29 Eviction Algorithms 30 4.2.4. Eviction Configuration Comparison 30 Object Storage and Evict on Number of Entries 30 7.2 to 8.0 30 8.1 30 Object Storage and Evict on Amount of Memory 30 7.2 to 8.0 30 8.1 30 Binary Storage and Evict on Number of Entries 30 7.2 to 8.0 30 8.1 31 Binary Storage and Evict on Amount of Memory 31 7.2 to 8.0 31 8.1 31 Off-Heap Storage and Evict on Number of Entries 31 7.2 to 8.0 31 8.1 31 Off-Heap Storage and Evict on Amount of Memory 31 7.2 to 8.0 31 8.1 31 4.3. EXPIRATION CONFIGURATION 32 4.4. PERSISTENT CACHE STORES 32 Persistence SPI 32 Custom Cache Stores 33 Segmented Cache Stores 33 Single File Cache Stores 33 JDBC Cache Stores 33 Connection Factories 33 Segmentation 33 Write-Behind 34 Removed Cache Stores and Loaders 34 2 Table of Contents Cache Store Migrator 34 4.5. DATA GRID CLUSTER TRANSPORT 35 4.5.1. Transport Security 36 4.6. DATA GRID AUTHORIZATION 36 Cache Manager Authorization 36 Implicit Cache Authorization 36 .C . H. .A . P. .T .E . R. 5. M. I.G . .R . A. .T .I .N . G. T. .O . .D . A. .T . A. G. .R . I. D. 8. .A . P. .I S. .3 . 8. 5.1. REST API 38 5.2. QUERY API 38 Indexing Data Grid Caches 38 Enabling Indexing in Data Grid 8 39 Querying Values in Caches 39 .C . H. .A . P. .T .E . R. 6. .M . I. G. .R . A. .T . I.N . G. A. .P . P. .L . I.C . A. .T . I.O . N. S. .T . O. D. A. .T .A . .G . .R .I .D . .8 . 4. .1 . 6.1. MARSHALLING IN DATA GRID 8 41 6.1.1. ProtoStream Marshalling 41 Marshalling with Data Grid Server 41 Cache Stores and ProtoStream 41 6.1.2. Alternative Marshaller Implementations 41 JBoss Marshalling 42 6.2. MIGRATING APPLICATIONS TO THE AUTOPROTOSCHEMABUILDER ANNOTATION 42 6.2.1. Basic MessageMarshaller implementation 43 Migrated to the AutoProtoSchemaBuilder annotation 44 Important observations 45 6.2.2. MessageMarshaller implementation with custom types 45 Migrated code with an adapter class 46 Migrated code without an adapter class 48 .C . H. .A . P. .T .E . R. 7. M. I.G . .R . A. .T .I .N . G. D. .A . T. .A . .G . R. .I D. .C . L. U. .S . T. .E . R. S. O. N. R. .E .D . H . .A . T. .O . .P . E. N. S. H. I.F .T . .5 .0 . 7.1. DATA GRID ON OPENSHIFT 50 Creating Data Grid Services 50 Creating Cache service Nodes in 7.3 50 Creating Data Grid service nodes in 7.3 50 Creating Services in Data Grid 8 50 7.1.1. Container Storage 51 7.1.2. Data Grid CLI 51 7.1.3. Data Grid Console 51 7.1.4. Customizing Data Grid 51 7.1.5. Deployment Configuration Templates 51 .C . H. .A . P. .T .E . R. 8. .M . I. G. .R . A. .T .I .N . G. D. .A . T. .A . .B . E. .T . W. .E . E. .N . .C . A. .C . H. .E . .S . T. .O . R. .E . S. .5 . 2. 8.1. CACHE STORE MIGRATOR 52 8.2. GETTING THE STORE MIGRATOR 52 8.3. CONFIGURING THE STORE MIGRATOR 53 8.3.1. Store Migrator Properties 54 8.4. MIGRATING CACHE STORES 58 3 Red Hat Data Grid 8.1 Migrating to Data Grid 8 4 CHAPTER 1. RED HAT DATA GRID CHAPTER 1. RED HAT DATA GRID Data Grid is a high-performance, distributed in-memory data store. Schemaless data structure Flexibility to store different objects as key-value pairs. Grid-based data storage Designed to distribute and replicate data across clusters. Elastic scaling Dynamically adjust the number of nodes to meet demand without service disruption. Data interoperability Store, retrieve, and query data in the grid from different endpoints. 1.1. DATA GRID DOCUMENTATION Documentation for Data Grid is available on the Red Hat customer portal. Data Grid 8.1 Documentation Data Grid 8.1 Component Details Supported Configurations for Data Grid 8.1 Data Grid 8 Feature Support Data Grid Deprecated Features and Functionality 1.2. DATA GRID DOWNLOADS Access the Data Grid Software Downloads on the Red Hat customer portal. NOTE You must have a Red Hat account to access and download Data Grid software.