zoukankan      html  css  js  c++  java
  • 初探eXtreme scale

    Note: This document was based on WebSphere Extreme Scale 8.6. It doesn’t supported for lower version on some operate.

    1. Download the extreme scale to your own PC, Extract it to a directry.

    Server Side:

    2. Open a DOS window. And direct to ${xs install home}/bin

    3. Start a catalog server.

                    startXsServer ${catalogServer_name}

    Help info:

       <server> [options]

    --------CatalogServer Arguments-------------------------------

    -catalogServiceEndPoints <server:host:port:port,server:host:port:port>

    -quorum true|false

    -heartbeat 0|1|-1|10|-10

    -clusterSecurityFile <cluster security xml file>

    -clusterSecurityUrl <cluster security xml URL>

    -domain <domain name>

    -transport <ORB|XIO>

    --------Common Arguments-------------------------------

    -listenerHost <hostname>

    -listenerPort <port>

    -serverProps <server properties file>

    -JMXServicePort <port>

    -JMXConnectorPort <port>

    -traceSpec <trace specification>

    -traceFile <trace file>

    -timeout <seconds>

    -script <script file>

    -jvmArgs <JVM arguments>

    Note : The default configuration port is [localhost], the default configuration port is [2809].

    Also multiple endpoints was supported only with separated with ‘,’.

    4. Start a container Server:

    StartXsServer.bat  ${container_Server_name}  -objectgridFile ${file_name or  location} –catalogServiceEndpoints  localhost:2809

    Help info:

    <server> -objectgridFile <xml file> [options]

    <server> -objectgridUrl <xml URL> [options]

    ---------------Container Arguments ---------------------------

    -catalogServiceEndPoints <host:port,host:port>

     -deploymentPolicyFile <deployment policy xml file>

     -deploymentPolicyUrl <deployment policy xml URL>

     -haManagerPort <port>

     -zone <zoneName>
    --------Common Arguments-------------------------------

    -listenerHost <hostname>

    -listenerPort <port>

    -serverProps <server properties file>

    -JMXServicePort <port>

    -JMXConnectorPort <port>

    -traceSpec <trace specification>

    -traceFile <trace file>

    -timeout <seconds>

    -script <script file>

    -jvmArgs <JVM arguments>

     

    Example for objectgrid.xml  & deployment_objectgrid.xml

    Objectgrid.xml

    <?xml version="1.0" encoding="UTF-8"?>
    
    <objectGridConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    
         xsi:schemaLocation="http://ibm.com/ws/objectgrid/config ../objectGrid.xsd" 
    
         xmlns="http://ibm.com/ws/objectgrid/config">
    
        <objectGrids>
    
            <objectGrid name="accounting">
    
                <backingMap name="customer" readOnly="false" copyKey="true"/>
    
            </objectGrid>
    
        </objectGrids>
    
    </objectGridConfig>
    
    


     

    Deployment_objectgrid.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <deploymentPolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://ibm.com/ws/objectgrid/deploymentPolicy ../deploymentPolicy.xsd"
         xmlns="http://ibm.com/ws/objectgrid/deploymentPolicy">
     
         <objectgridDeployment objectgridName="accounting">
                <mapSet name="mapSet1" numberOfPartitions="1" minSyncReplicas="0" maxSyncReplicas="2" 
                        maxAsyncReplicas="1">
                        <map ref="customer"/>
                </mapSet>
         </objectgridDeployment>
    </deploymentPolicy>
    

     

    Client Side: (Java code)

    Condition: ObjectGrid.jar must be approved by version 8.6

    5. Get the ObjectGrid

    ObjectGridManager ogManager = ObjectGridManagerFactory.getObjectGridManager();
    
    ClientClusterContext ccContext = ogManager.connect(“localhost:2809”, null, null);
    
    ObjectGrid og = ogManager.getObjectGrid(ccConext, “accounting”);
    
    


    6. Execute query by object query

    Session session = og.getSession();
    
    ObjectMap customerMap =  session.getMap(“customer”);
    
    String customer = customerMap.get(“0001”);
    
    If(customer==null){
    
                    customerMap.insert(“0001”, ”Insert UserName_Freud”);
    
    }else{
    
                    customerMap.update(“0001”, “Updated UserName_Freud”);
    
    }
    
    Customer = (String) customerMap.get(“0001”);
    
    System.out.println(“The customer Name is : ” + customer);
    
    

    7. Parallel query

                    Waiting to be edit…

    8. Map Agent

    Waiting to be edit…

    9. Add Index

    Waiting to be edit…

    10. Relationship – Cascade (Waiting to be edit…)

    One to one

    One to many

    Many to one

  • 相关阅读:
    九度oj 题目1208:10进制 VS 2进制
    九度oj 题目1209:最小邮票数
    九度oj 题目1207:质因数的个数
    九度oj 题目1030:毕业bg
    九度oj 题目1014:排名
    九度oj 题目1048:判断三角形类型
    九度oj 题目1335:闯迷宫
    [Luogu] Tree
    点分治 算法学习 && [Poj] 1741
    [Luogu] 排序机械臂
  • 原文地址:https://www.cnblogs.com/riskyer/p/3268840.html
Copyright © 2011-2022 走看看