Oracle Coherence Chinese Tutorial II: Installing Oracle Coherence

Source: Internet
Author: User

Installing Oracle Coherence

This chapter provides instructions for installingOracle Coherenceof theJava (referred to asCoherence). This chapter does not include instructions for installation coherence*Extended Client Distribution (C + +and. NET) or coherent*website. Please seeOracle Coherencethe customer guide andOracle Coherenceof theOracle Coherencethe network, User Guide, and instructions for installing these components.

This chapter contains the following sections:

System Requirements
Extract Dispatch
Setting environment variables
Continuity of initial operation

2.1System Requirements

The following are the recommended minimum system requirements for the consistency of installation in the development environment:

MBdisk space for the installation

1 GBof theRAM(assuming maximumJavaHeap Size is512MB)- This amount ofRAMcan be in a single nodeTo store backups of all data (150mbx2), and set aside more support for the ideal maximum cache sizeSmall for150MBthan1/3the heap has scratches andJVMtasks. Please seeOracle Coherencethe administrator'sThe Guide recommends calculating the cache size.

1.6UpdateThe JVMor a later version

Windowsor based onUNIXsystem that supports the requiredJavaversion

Network adapter

2.2Extract Dispatch

Coherencedistributed as aZIPfile. UseZIPutility or command-line utility decompressionZIPThe file is extracted to a location on the destination computer. The extracted files are organized in a separate directory calledCoherence. is called asCoherence_homeThe full path to the consistent directory throughout this document. For example,C:\INSTALL_DIR\coherence.

The following example uses the Extract utility, which extracts the distribution, which is recommended based on theUNIXinstallation directory of the operating system/OPTdirectory. UseZIPtool, Target operating system, if the decompression utility is not.

Decompression unzip/path_to_zip/coherence-version_number.zip-d/opt
The following example extracts theC:\under the directoryWindowsThe decompression utility on the operating system is allocated for use.

Decompression C:\path_to_zip\coherence-version_number.zip-d c \
The following list describes what is included in the directoryCoherence_homeof:

Bin-The directory includes a set of scripts for performing different tasks, such as common scripting: Starting a cache server, starting with a development tool, and performing network tests. Provided in the scriptWindows(CMD) and based onUNIX(SH) format.

DOC-This directory contains links to coherent documents.

LIB-This directory contains all the delivery libraries. Coherence.jarIt is primarily developed and run-time libraries and is discussed in detail throughout the documentation.

2.3 Setting Environment variables

The following system environment variables can be set, but they do not need to run coherently:

Java_home-The variable contained in the coherence_home/bin directory is used when the script is run. The value of this variable is the full path to the Java installation directory. If you do not set java_home, use your computer's default installation JAVA script. Set this variable to ensure that the script uses a specific Java version.

Coherence_home- This variable is usually used as a convenience. The value of this variable is the full path to the Iinstall_dir/coherence directory.

2.4 The first time continuity of Operation

The coherence_home/bin directory includes two scripts for development and testing, and provides design-time convenience. The cache server script starts the default configuration used by the cache server. The coherence script launches a default configuration that is used by a cache factory instance. A cache of factory instances includes a command-line tool for creating and interacting caches (which include).

In this case, a basic cluster is created, and then the command-line tool, used to create and host a cache in the cluster, can interact.

2.4.1 Creating a basic cluster

In this step, a basic cluster creates a cache server with three separate Java processes and two cache factory instances. For simplicity, the three operations are collocated on a single computer. The cache server, by default, configures the storage backup data. In the case of both cache factories, the storage of backup data is not configured by default. Because each process is started, they are automatically joined and become cluster members (also referred to as cluster nodes).

For this example, the default configuration for coherence is slightly modified to create a unique cluster that ensures that these cluster members do not attempt to join existing clusters that may run on the network.

Precautions:
The coherent default behavior is to use multicast to discover cluster members. Coherence can be configured to use unicast if a network is not allowed to use multicasting. For more information, see " using well-known addresses ."

To create a basic cluster:

1 using a text editor, open coherence_home/bin/cache-server script.

2 modifying java_opts variables including tangosol.coherence.cluster and The System properties of the Tangosol.coherence.clusterport are as follows:

Set java_opts = "-xms% memory% of -xmx% of memory%Dtangosol.coherence.cluster = Cluster_Name Dtangosol.coherence.clusterport = Port "

Replacing the cluster name and port value is the only cluster. For example, use your name for the cluster name and your phone number as the last four digits of the port.

Save and close the cache server script.

Repeat steps 1 through 3 for coherence_home/bin/coherence script.

Run the cache server script. The cache server starts and emits output, providing information about this cluster member.

Running 2 coherence ?? The script instance. As each instance starts, the output is emitted, providing information about the respective cluster members. Each instance returns a command-line tool at the command prompt.

2.4.2Create Cache

In this step, the cache is created and hosted on the base cluster. A simple string is entered into the cache using the first cache factory instance of the command-line tool. The string is then retrieved from the cached second cache factory instance using the command-line tool. This example is simple and not very practical, but it quickly proves the distributed nature of the coherent cache. In addition, these steps are usually directed to the use of coherentAPI.

To create a cache:

At the command prompt, either cache factory instances, create aTestCache with cache command:

Cache test

At the command prompt, use theputcommand will place a simple string in the new cache, by entering a key/value pairs (separated by spaces):

PutKEY1Hello
The command returns, which is displayed as empty. Always return the command to the previous value given the key. Returns a null value because this is the first time this key is entered.

Switch to another cache factory instance and use the cached command at the command prompt to create the test cache:
Cache test
From this command prompt, use theGetcommand, and enter the key name to retrieve the string in the cache:
Get KEY1
The command returns and displays the greeting. Either the cache entry can be added or deleted during the cache factory process because the process is part of the same cluster because the test is called caching to all cluster members. Additionally, the data in the cache is still present because of a backup of the cache server's data store, whether the cache factory process (or both) can be closed.

Oracle Coherence Chinese Tutorial II: Installing Oracle Coherence

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.