Showing posts with label GemFire. Show all posts
Showing posts with label GemFire. Show all posts

Sunday, October 20, 2013

How the JTA Transaction Manager helps to GemFire

 

JTA provides direct coordination between the GemFire cache and another transactional resource,

such as a database. Using JTA, your application controls all transactions in the same standard way, whether the transactions act on the GemFire cache, a JDBC resource, or both together.

By the time a JTA global transaction is done, the GemFire transaction and the database transaction are both complete.


imageContributed by Gemstone.

Using GemFire with JTA transactions requires these general steps.

During configuration:
1. Configure the JDBC data sources in the cache.xml file.
2. Include the jar file for any data sources in your CLASSPATH.


At run-time:
3. Initialize the GemFire cache.
4. Get the JNDI context and look up the data sources.
5. Start a JTA transaction.
6. Execute operations in the cache and database as usual.
7. Commit the transaction.


The transactional view exists until the transaction completes. If the commit fails or the transaction is rolled
back, the changes are dropped. If the commit succeeds, the changes recorded in the transactional view are
merged into the cache. At any given time, the cache reflects the cumulative effect of all operations on the
cache, including committed transactions and non-transactional operations.

JTA Transaction Limitations:

• Only one JDBC database instance per transaction is allowed, although you can have multiple connections
to that database.
• Multiple threads cannot participate in a transaction.
• Transaction recovery after a crash is not supported.
In addition, JTA transactions are subject to the limitations of GemFire cache transactions, which is discussed
in the previous section. When a global transaction needs to access the GemFire cache, JTA silently
starts a GemFire cache transaction.

JTA Sync Up :

JTA syncs up multiple transactions under one umbrella by enabling transactional resources to enlist with a
global transaction. The GemFire cache can register as a JTA resource through JTA synchronizations. This
allows the JTA transaction manager to call methods like commit and rollback on the GemFire resource and
manage the GemFire transactions. You can bind in JDBC resources so you can look them up in the JNDI
context. When bound in, XAPooledDataSource resources will automatically enlist if called within the context
of a transaction.

Example :

Using GemFire JTA Transaction Manager

The external data sources used in this transaction are configured in cache.xml.

Region r = ...; // the gemfire regionDataSource 
ds = ...; // other datasource

try {
Context ctx = cache.getJNDIContext();
Connection conn = null;
UserTransaction
tx = (UserTransaction)
ctx.lookup("java:/UserTransaction");
tx.begin();
conn = ds.getConnection();
Statement stmt = conn.createStatement();
String sqlSTR = "insert into " + tableName + " values (........ )";
stmt.executeUpdate(sqlSTR);
r.put("key", "value");
stmt.close();
tx.commit();
conn.close();
} catch (NamingException e) {
// handle the exception
}

Tuesday, September 3, 2013

How gfsh Commands differs in vFabric GemFire 7.0 compare to Previous versions

The following table provides a mapping of previous GemFire commands (for example, gemfire, cacheserver, start locator, and so on) to new gfsh commands

Previous Command GemFire 7.0 gfsh Command
Old (pre-7.0) gfsh Commands
bcp export data --to-file=...
import data --from-file=...
clear remove --all
connect connect
debug enable with options --error-details and --logging-level
deploy deploy
fetch environment variable APP_FETCH_SIZE
gc gc
get get
index create index
destroy index
list index
key get/put/locate entry commands with option --key-class
ls describe region
describe member
list members
list regions
show config
mkdir create region
next implicit with select
put put
pwd environment variable APP_CONTEXT_PATH (Read only)
rebalance rebalance
rm remove
rmdir destroy region
select select
show With environment variables
show -col APP_COLLECTION_LIMIT
value get/put commands with option -value-class
which locate entry
Old (pre-7.0) cacheserver Commands
cacheserver start start server
cacheserver status status server
cacheserver stop stop server
Old (pre-7.0) gemfire Commands
gemfire backup-disk-store (online command) export disk-store
gemfire compact-all-disk-store (online command) compact disk-store
gemfire compact-disk-store (offline command) compact offline-disk-store
gemfire info-locator describe member (with --name to identify locator)
gemfire list-missing-disk-stores (online command) show missing-disk-stores
gemfire modify-disk-store (offline command) alter disk-store
gemfire revoke-missing-disk-store (online command) revoke missing-disk-store
gemfire start-locator start locator
gemfire status-locator status locator
gemfire stop-locator stop locator
gemfire shutdown-all-members (online command) shutdown
gemfire validate-disk-store (offline command) validate disk-store

Tuesday, August 13, 2013

How to Install VMware GemFire 7 in Windows


First of all I would like to appreciate people those who are reading my posts and giving feedbacks.
I decided to write this post as my friends(readers) requested me to write a post for installation of VMware GemFire 7 in Windows.
Here I am using my personal windows7 machine.
I assume that you have already installed JDK 1.6 or above in your machine.
Step 1.
I have downloaded the VMware GemFire 7 Evaluation from VMware site
Step 2.
Extracted the downloaded package to “C:\vmware\gemfire7 “
Step 3.
open command prompt  and execute the below commands one at a time as you are seeing in the below image.gfsh
1. set GEMFIRE=C:\vmware\gemfire7  (Note : path should be your extracted folder )
2. set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_40  (Note : Java installed path)
3. set GF_JAVA=%JAVA_HOME%\bin\java.exe
4. set PATH=%PATH%;%JAVA_HOME%\bin;%GEMFIRE%\bin
5. set CLASSPATH=%CLASSPATH%;^
    %GEMFIRE%\lib\gemfire.jar;^
    %GEMFIRE%\lib\antlr.jar;^
    %GEMFIRE%\lib\gfSecurityImpl.jar;^
    %GEMFIRE%\lib\jackson-core-asl-1.9.9.jar;^
    %GEMFIRE%\lib\commons-logging.jar;^
    %GEMFIRE%\lib\tomcat-embed-core.jar;^
    %GEMFIRE%\lib\tomcat-embed-logging-juli.jar;^
    %GEMFIRE%\lib\tomcat-embed-jasper.jar;^
    %JAVA_HOME%\lib\tools.jar

Note: You only need to add commons-logging.jar, tomcat-embed-core.jar, tomcat-embedlogging-juli.jar, and tomcat-embed-jasper.jar     files to your CLASSPATH
if you are planning on using the GemFire member as a GemFire Pulse application server.
 
You have successfully installed.

Now you can go to your <gemfire product folder> to run the gfsh commands to manage GemFire.

gfsh1
Enjoy.

Thursday, May 30, 2013

Fix the failing Locator on the startup in GemFire


This fix is applicable for GemFire 6.x and 7.x.
If your terminal or command prompt fails while starting the locator for the first time in Network Discovery
Symptoms :
  • When you start VMware vFabric GemFire, the locator connection begins, but fails after discovery.
  • Connection can fail with cache servers, but is typically observed with locators first.
Cause :
  • This occurs when UDP is blocked (such as by Windows Firewall), which vFabric GemFire uses to communicate between peer members, such as cache servers and locators.
  • Since the initial connection for locator discovery is made via TCP, a firewall rule set that allows TCP, but prohibits UDP connections, allows the initial discovery while blocking the member-to-member connection.

Resolution :
To resolve this issue, allow the necessary UDP traffic.
To do so:
  • Remove the firewall rule that blocks UDP traffic
    or
  • Set “membership-port-range” in the gemfire.properties file to restrict the port range used for membership communication.
image

Not sure how to Allow / Deny the ports in Windows firewall ?
http://technet.microsoft.com/en-us/library/cc947789%28v=ws.10%29.aspx
in RedHat Enterprise Linux ?
http://www.techotopia.com/index.php/Basic_RHEL_5_Firewall_Configuration
Write to me if you get struck

Monday, May 27, 2013

Vfabric GemFire - Firewalls and Ports

 
For a server, there are two different port settings you may need to be concerned with regarding firewalls:
  • Port that the cache server listens on: This is configurable using the cache-server element in xml, on the Cache Server class in java, and as a command line option to the cache server script.
  • Locator port: Gemfire clients can use the locator to automatically discover cache servers. The locator port is the same one that is configured for peer-to-peer messaging. The locator port is configurable in as an option to the Gemfire start-locator command.
Default Ports
Port Name
Default Port
HTTP
8080
RMI
1099
RMI Server
0
Bridge Server
40404
Gateway Hub
1
Cache Server
40404
Multicast
10334
TCP
ephemeral port
Membership Port Range
1024 to 65535
Locator
no default
For a client: you tell the client how to connect to the server using the pool options. In the client's pool configuration you can create a pool with either a list of server elements or a list of locator elements. For each element, you specify the host and port to connect to.
By default, Gemfire clients and servers discover each other on a pre-defined port (40404) on the local host.
Each gateway-hub usually has a port where it listens for incoming communication and one or more gateways defined for outgoing communication to remote hubs.
Limiting Ephemeral Ports for Peer-to-Peer Membership
By default, GemFire assigns ephemeral ports, that is, temporary ports assigned from a designated range, which can encompass a large number of possible ports. When a firewall is present, the ephemeral port range usually must be limited to a much smaller number, for example six. If you are configuring P2P communications through a firewall, you must also set each the tcp port for each process and ensure that UDP traffic is allowed through the firewall.
Properties for Firewall and Port Configuration
This table contains properties potentially involved in firewall behavior, with a brief description of each property. Click on a property name for a link to the gemfire.properties topic in the GemFire Reference section.

Gemfire Properties
gemfire.properties
Setting
Definition
peer-to-peer config
Specifies whether sockets are shared by the system member's threads.
peer-to-peer config
The list of locators used by system members. The list must be configured consistently for every member of the distributed system.
peer-to-peer config
Address used to discover other members of the distributed system. Only used if mcast-port is non-zero. This attribute must be consistent across the distributed system.
peer-to-peer config
Port used, along with the mcast-address, for multicast communication with other members of the distributed system. If zero, multicast is disabled for member discovery and distribution.
peer-to-peer config
The range of ephemeral ports available for unicast UDP messaging and for TCP failure detection in the peer-to-peer distributed system.
peer-to-peer config
The TCP port to listen on for cache communications.
Server Configuration Properties
gemfire.properties
Setting
Definition
cache server config
Hostname or IP address to pass to the client as the location where the server is listening.
cache server config
Maximum number of client connections for the server. When the maximum is reached, the server refuses additional client connections.
cache server config
Port that the server listens on for client communication.








Thursday, May 16, 2013

gfsh basic commands for Vfabric GemFire 7

 

To view a list of available gfsh commands, press Tab at an empty prompt.

The list of commands that you see depends on whether you are connected to a GemFire distributed system. If you are not connected, you see a list of local commands that are available.

image

Use the hint command to get information on a particular topic.

The hint command displays a one-line description and associated commands for a specified topic. For example, typing hint data returns a description of the "data" topic and all the possible actions available for data:

image

Type hint server to view a description of servers in GemFire and a list of commands available for managing and monitoring them.

image

To view a list of hint topics, type hint.

gfsh>hint
Hints are available for following topics. Use "hint <topic-name>" for a specific hint.
image

Use the help command to get information on a particular command.

Depending on the command, typing help <command-name> displays usage information for that particular command or a list of commands related to the command.

For example, type help start to display a list of start commands with short descriptions. The descriptions indicate whether the command is available, depending on your connection status. In the following example, you are not currently connected to a vFabric GemFire distributed system (via connection to a JMX Manager node), so some start commands are unavailable.

gfsh>help start

image


In the following example, typing help export data displays the command name, availability (depending on your connection status), a description, its syntax, and a list of all its required and optional parameters.

gfsh>help export data
image

Use the Tab key to auto-complete a command or trigger possible completions.

Use the Tab key after entering a partial command to trigger auto-completion of the command or a list of possible command completions. For example, hitting Tab after typing hint displays all available topics:

gfsh>hint 
image
Configuration Data Debug-Utility
Disk Store Function Execution GFSH
GemFire Help JMX
Lifecycle Locator Management-Monitoring
Manager Region Server
Statistics WAN

 


Hitting tab after typing hint d displays the topics available that begin with 'd':

gfsh>hint d

data debug-Utility disk Store
Auto-completion also supplies available parameters and arguments to commands; for example, hitting tab after typing start will list all the processes that can be started.
gfsh>start

start data-browser start jconsole start jvisualvm
start locator start pulse start server
start vsd

Hitting tab after start locator will populate the required --name parameter after the command.

Note: The available commands that are listed varies depending on whether you are currently connected to a distributed system.

Access command history with the Up arrow.

Access a command in your shell history by scrolling through previous commands with the Up arrow.

Delimit multi-line commands with \.

When entering long commands, you can break the command line up by using the \ character as a delimiter.

For example:

gfsh>create region --name=region1 \
--type=REPLICATE_PERSISTENT \
--cache-writer=com.gemstone.gemfire.examples.MyCacheWriter \
--group=Group1 --disk-store=DiskStore1

 



Wednesday, April 24, 2013

Analyze GemFire Performance using VSD

 

VSD – Visual Statistics Display

In a distributed systems data management is very complex problem space but GemFire gives very excellent results that everyone should agree once they realized but of course we need something to monitor the performance , resources and runtime of GemFire all that time, yeah we have Hyperic.

In simple form I would like to explain that how the VSD differs from Hyperic while monitoring.

Hyperic – monitoring tool with alert system

VSD – monitoring tool with out alert system.

VSD is a visual tool for analyzing GemFire statistics. It reads GemFire statistics from special statistics archive files created by GemFire, and renders their graphs for analysis. It is not a real-time online monitoring tool, such as Hyperic as I said , so it does not have the real-time monitoring and alerting capabilities that they have. On the other hand, it is the most powerful tool for examining the state of a vFabric GemFire system, as it provides access to all the statistics collected by GemFire. No real-time monitoring tool can do that, as the amount of statistics that GemFire collects is prohibitive for real-time collection in a distributed system.

Having a complete view into the state of a GemFire process for performance analysis, and tracking down problems by performing offline analysis of distributed systems using statistics gathered by the cluster. It is also helpful any time we need to verify the runtime state of a distributed system, for example: upon startup or data loading; to make sure that all the nodes are present and see one another, that all the entries are loaded and well balanced across all the nodes; or that JVM heaps have enough headroom; etc.

important statistics that are useful in verifying the state of a distributed system, including its configuration, resource usage, and throughput for different operations.

setting the VSD configuration properties:

statistic-sampling-enabled=true, and statistic-archive-file=myStats.gfs. As the collection of statistics at the default sampling rate of 1s does not affect performance, it should always be turned on–during development, testing, and in production.

There is a special category of statistics called time-based statistics that can be very useful in troubleshooting and assessing performance of some GemFire operations, but they should be used with caution because their collection can affect performance. They can be enabled using the property enable-time-statistics=true.

Once a distributed system is up and running, every GemFire instance will have its statistics file created. you can copy all the stat files into one directory so that you  can easily load them into VSD.

Always you can find the VSD under tools of GemFire7 Product folder like shown on the below screen.

image

detailed documentation if you need here

Analyzing the Data

Once you have VSD running and statistics archives loaded, it will be populated with lots of interesting data, as shown in the screen shot below.

image

Runtime Configuration

 

  • The number of peer nodes in the system:
  • DistributionStats:nodes. This value should be the same for every node in the system.
  • The number of clients and client connections for each server: CacheServerStats: currentClients, andcurrentClientConnections
  • The number of data entries:
    • CachePerfStats:entries. Each region has its own CachePerfStats instance per JVM namedRegionStats-<region name>, or RegionStats-partition-<region name> for partitioned regions, and its entries statistic is the number of entries for that region in the JVM.
    • DiskRegionStatistics (a per region disk statistic category about the region’s disk use): entriesInVM, and entriesOnlyOnDisk show the number of entries in the JVM (which can also be on disk too), and the number of entries that are only on disk, respectively.
  • Partitioned Region Configuration: One of the main parameters of Partitioned Region (PR) configuration is the primary bucket distribution. To make sure that primary buckets for a PR are evenly distributed, check thePartitionedRegionStats.primaryBucketCount statistic for each partition. This statistic shows the number of primary buckets in a partition.
Resources

The resources that are vital for normal operation and performance are memory, file descriptors (most importantly sockets, then files), CPU, network, and disk (when disk operations, such as overflow and persistence, are involved). The following stats cover all those:

  • Memory: There are several stats categories that show memory usage, for different types and granularity of memory.
    • Heap: VMMemoryUsageStats:vmHeapMemoryStats are all about heap usage, as are the memory stats under VMStats:vmStats: freeMemory, totalMemory, maxMemory.
    • Non-heap memory: VMMemoryUsageStats:vmNonHeapMemoryStats.
    • System-wide memory stats as reported by the OS: The OS statistic category (e.g.LinuxSystemStats on Linux) includes various system level memory statistics, such as freeMemory, which shows the free memory on the host (as opposed to related to the JVM process),physicalMemory (total physical memory on the host), paging related statistics (pagesSwappedIn, pagesSwappedOut, unallocatedSwap).
    • Client and gateway queue sizes: while not actual resources, these queues may be responsible for increased memory usage, so it’s good to keep them in mind when investigating memory issues. The client queue stats are in ClientSubscriptionStats category: eventsQueued, and eventsRemoved. The difference between the two is the current queue size. The gateway queue stats are inGatewayStatistics (GatewaySenderStatistics as of GemFire 7.0) category: eventQueueSize is the size of the queue.
  • File Descriptors: file descriptor related statistics are captured in the category VMStats: fdsOpen and fdLimitshow the number of open file descriptors, and the limit on file descriptors for the host, respectively
  • CPU: The CPU usage is captured in OS statistic category, e.g. LinuxSystemStats. The statistic cpuActiveshows the percentage of the total available CPU time that has been used in a non-idle state.
  • System load: OS statistic category (e.g. LinuxSystemStats) includes the loadAverage1, loadAverage5, loadAverage15 statistics, which show the average system load for 1, 5, and 15 minutes.
  • Network: OS stats also include network related stats for received (recv) and transmitted traffic (recvBytes, xmitBytes, recvErrors, xmitErrors). Note that some of these statistics may be incorrect in GemFire versions prior to 6.6.2 due to a bug that is fixed in GemFire 6.6.2.
  • Disk: DiskDirStatistics:diskSpace shows the amount of disk space used for GemFire disk storage on a given disk. Above mentioned entriesOnlyOnDisk, and entriesInVM  from DiskRegionStatistics are useful for determining the distribution of data between memory and disk, for regions that use disk overflow/persistence.

Monday, March 11, 2013

Types of VFabric-GemFire Configurations


This post is to talk about types of configurations.
How to configure distributed system and cache properties for your vFabric GemFire installation.
For your applications, it provides guidance for writing code to manage your cache and distributed system connection, data regions, and data entries, including custom classes.
  • Distributed System and Cache Configuration
    To work with your vFabric GemFire applications, you use a combination of configuration files and application code.
    1. Distributed System Members
      Distributed system members are programs that connect to a vFabric GemFire distributed system. You configure members to belong to a single distributed system, and you can optionally configure them to be clients or servers to members in other distributed systems, and to communicate with other distributed systems.
    2. Options for Configuring the Distributed System
      GemFire provides a default distributed system configuration, for out-of-the-box systems. To use non-default configurations and to fine-tune your member communication, you will customize your system configuration. You can use a mix of various options for customizing your distributed system configuration.
    3. Options for Configuring the Cache and Data Regions
      To populate your vFabric GemFire cache and fine-tune its storage and distribution behavior, you need to define cached data regions and provide custom configuration for the cache and regions.
    4. Local and Remote Membership and Caching
      For many vFabric GemFire discussions, you need to understand the difference between local and remote membership and caching.
  • Cache Management
    The vFabric GemFire cache is the entry point to GemFire caching management. GemFire provides different APIs and XML configuration models to support the behaviors of different members.
    1. Introduction to Cache Management
      The cache provides in-memory storage and management for your data.
    2. Managing a Peer or Server Cache
      You start your peer or server cache using a combination of XML declarations and API calls. Close the cache when you are done.
    3. Managing a Client Cache
      You have several options for client cache configuration. Start your client cache using a combination of XML declarations and API calls. Close the client cache when you are done.
    4. Managing a Cache in a Secure System
      When you create your cache in a secure system, you provide credentials to the connection process for authentication by already-running, secure members. Clients connect to secure servers. Peers are authenticated by secure locators or peer members.
    5. Managing Region Services for Multiple Secure Users
      In a secure system, you can create clients with multiple, secure connections to the servers from each client. The most common use case is a GemFire client embedded in an application server that supports data requests from many users. Each user may be authorized to access a subset of data on the servers. For example, customer users may be allowed to see and update only their own orders and shipments.
    6. Launching an Application after Initializing the Cache
      You can specify a callback application that is launched after the cache initialization.
  • Data Regions
    The region is the core building block of the vFabric GemFire distributed system. All cached data is organized into data regions and you do all of your data puts, gets, and querying activities against them.

    1. Data Region Management
      GemFire provides different APIs and XML configuration models to support configuration and management of your data regions.
    2. Creating a Region with gfsh
      A simple and fast way to create a data region in the vFabric GemFire cache is to use the gfsh command-line tool.
    3. Creating a Region Through the cache.xml File
      A common way to create a data region in the vFabric GemFire cache is through cache.xml declarations.
    4. Creating a Region Through the API
      You can use the GemFire caching API to create regions in your cache after startup. For run-time region creation, you need to use the API.
    5. Region Naming
      To get the full range of vFabric GemFire capabilities for your cached data regions, follow Gem Fire's region naming guidelines.
    6. Region Shortcuts and Custom Named Region Attributes
      GemFire provides region shortcut settings, with preset region configurations for the most common region types. For the easiest configuration, start with a shortcut setting and customize as needed. You can also store your own custom configurations in the cache for use by multiple regions.
    7. Storing and Retrieving Region Shortcuts and Custom Named Region Attributes
      Use these examples to get started with GemFire region shortcuts.
    8. Managing Region Attributes
      Use region attributes to fine-tune the region configuration provided by the region shortcut settings.
    9. Creating Custom Attributes for Regions and Entries
      Use custom attributes to store information related to your region or its entries in your cache. These attributes are only visible to the local application and are not distributed.
  • Data Entries
    The data entry is the key/value pair where you store your data. You can manage your entries individually and in batches. To use domain objects for your entry values and keys, you need to follow vFabric GemFire requirements for data storage and distribution.
    1. Managing Data Entries
      Program your applications to create, modify, and manage your cached data entries.
    2. Requirements for Using Custom Classes in Data Caching
      Follow these guidelines to use custom domain classes for your cached entry keys and values.
Contributed by VMware.

Friday, February 15, 2013

vFabric GemFire Supported Configurations


vFabric GemFire is supported on a variety of platforms, as a standalone product and as part of VMware® vFabric Suite™.
 

32-Bit Platforms


Operating Systems :
RHEL 5 ,Solaris 9 ,Solaris 10 , SLES 10 ,Windows XP SP3  Windows 2003 Server SP2 ,
Windows 2008 Server R1 ,Windows 2008 Server R2 , Windows 7 Ultimate ,Windows 7.

The Microsoft Loopback Adapter is not supported

Detailed Table view
 

64-Bit Platforms


Operating Systems :
RHEL 5 , RHEL 6 ,Solaris 10 ,SLES 10 , Windows 2003 Server SP2 (pure Java) ,Windows 2008 Server R1
Windows 2008 Server R2 , Windows 7 Ultimate , Ubuntu 10.04.

The Microsoft Loopback Adapter is not supported 

Detailed Table view
Pure Java Mode and Other Configurations
Note :-  GemFire can also be installed to run in pure Java mode on any standard Java platform with some functional differences. However, this type of configuration is not tested and should not be used for production purposes without consulting with VMware support first.
 
Pure Java Mode and Other Configurations
Production Support and Developer Support


Friday, February 8, 2013

What is special in GemStone - GemFire?


I hope you guys spend some time with previous posts which is describing about GemFire so I would like to dedicate this post to talk about features of GemFire.
Features of GemFire :
GemStone GemFire, an in-memory object caching system pluggable into any JVM. GemFire is intended to provide a zero-latency object cache for applications running on multiple JVMs.
GemFire uses Operating System style shared-memory techniques, which offers real time performance by eliminating disk and network bottlenecks.
GemStone GemFire, zero-latency performance software that significantly improves the performance and scalability of real-time business applications, enabling customers to make split-second business decisions, immediately adapt to market changes and increase user and system productivity.
GemFire is the first product to allow data to be shared across multiple Java™ virtual machines at the application level using shared-memory techniques, which offers breakthrough performance by eliminating disk and network bottlenecks.
GemFire will make it easy for developers to integrate shared-memory technology incrementally into existing Java, C and C++ architectures without overhaul to the application, and build it into new applications without having to learn the intricacies of shared-memory programming.
GemFire Offers Features to Enhance Performance, Administration and Development
GemFire Increases Performance:
· Uses shared memory for sharing data, object change notification, thread synchronization and garbage collection across multiple virtual machines to significantly increase the performance of applications
· Enables the creation, access or manipulation of shared data from thousands of concurrently executing application components at in-memory speeds
· Optimizes general-purpose programming commands for fast, safe performance in high-volume environments
· Reduces unnecessary database communication on a customer’s systems as much as 98 % and is over 40x faster
GemFire Reduces Administration Time and Costs:
· Automatic garbage collection of the shared-memory object space
· Console for configuration, starting and stopping GemFire
· Unobtrusive, fast performance monitoring of both system and application-defined statistics
· Can be introduced into an existing architecture incrementally without overhaul to the application
GemFire Enables Faster Time to Market for Java Developers:
· Expresses shared memory capabilities in familiar Java form, so developers don’t need to learn shared-memory programming
· Provides an off-the-shelf software component that can be incrementally integrated into existing architectures and built into new applications
· Extends the simple Java synchronization model without additional programming
· The desired high-performance in applications can be realized with simple programming ensuring high developer productivity and fast deployment of business applications.









Wednesday, February 6, 2013

How to Install and Run GemFire

 

Prerequisites :

1. Download : http://www.springsource.com/products/gemfire-evaluation-download
2. Download : JDK from Oracle site
 

To Install the JDK Software and Set JAVA_HOME on a UNIX System


  1. Install the JDK software.
    1. Go to http://java.sun.com/javase/downloads/index.jsp.

    2. Select the appropriate JDK version and click Download.
      The JDK software is installed on your computer, for example, at /usr/jdk/jdk1.6.0_02. You can change this location.
  2. Set JAVA_HOME.

    • Korn and bash shells:
      export JAVA_HOME=jdk-install-dir
      export PATH=$JAVA_HOME/bin:$PATH

    • Bourne shell:
      JAVA_HOME=jdk-install-dir
      export JAVA_HOME
      PATH=$JAVA_HOME/bin:$PATH
      export PATH

    • C shell:
      setenv JAVA_HOME jdk-install-dir
      setenv PATH $JAVA_HOME/bin:$PATH
      export PATH=$JAVA_HOME/bin:$PATH


  3. Change the permissions to enable you to run the GlassFish ESB Installer.
    chmod 755 JavaCAPS.bin



To Install the JDK Software and Set JAVA_HOME on a Windows System




  1. Install the JDK software.


    1. Go to http://java.sun.com/javase/downloads/index.jsp.


    2. Select the appropriate JDK software and click Download.
      The JDK software is installed on your computer, for example, at C:\Program Files\Java\jdk1.6.0_02. You can move the JDK software to another location if desired.

  2. Set JAVA_HOME:


    1. Right click My Computer and select Properties.


    2. On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.6.0_02.

Install Gemfire :


Locate the GemFire package folder in terminal / command prompt  then execute the below command to install GemFire on your machine.

%JAVA_HOME%\bin\java.exe -jar GemFire65_Installer.jar

This installs the Gemfire
 

Running GemFire Application :


1.  Set the JAVA_HOME environment variable to point to your Java runtime installation. There should be a bin directory under JAVA_HOME.
2.  Set the GEMFIRE environment variable to point to your GemFire installation.
3.  Update your PATH environment variable to include the bin directories under JAVA_HOME and GEMFIRE.
For example, for Unix Bourne and Korn shells (sh, ksh, bash):
> PATH=$PATH:$JAVA_HOME/bin:$GEMFIRE/bin;export PATHand Windows
> set PATH=%PATH%;%JAVA_HOME%\bin;%GEMFIRE%\bin
4.  Update your CLASSPATH environment variable to include the GemFire classes:
Unix Bourne and Korn shells (sh, ksh, bash):
> CLASSPATH=$GEMFIRE/lib/gemfire.jar:$GEMFIRE/lib/antlr.jar:$GEMFIRE/lib/gfSecurityImpl.jar:$CLASSPATH;export CLASSPATH
Windows:
> set CLASSPATH=%GEMFIRE%\lib\gemfire.jar;%GEMFIRE%\lib\antlr.jar;%GEMFIRE%\lib\gfSecurityImpl.jar;%CLASSPATH%
5.  Set a GF_JAVA environment variable to point to the java executable file under your JAVA_HOME.
Unix Bourne and Korn shells (sh, ksh, bash):
> GF_JAVA=$JAVA_HOME/bin/java;export GF_JAVA
Windows:
> set GF_JAVA=%JAVA_HOME%\bin\java.exe
 

Running in Pure Java Mode :


GemFire Enterprise is designed to run as documented on platforms running Solaris, Linux, and Microsoft Windows.
GemFire Enterprise runs with some functional differences in pure Java mode without GemFire native code.
In pure Java mode Gem Fire's Java code does not call any of its own native methods. Distributed system members still have access to Gem Fire's caching and distribution capabilities.
To run in pure Java mode, your application must have the proper CLASSPATH settings and must not have access to the GemFire native library.
Pure Java mode is enabled automatically when Gem Fire's Java code cannot load the GemFire native library. Pure Java mode can be forced on platforms that support native code by renaming the native library in the product tree, or by setting the GemFire.pure Java Mode system property to true on members running user applications.
The Programming APIs
The Java APIs, supplied in product Dir/lib/GemFire.jar, allow you to configure your distributed system and cache, manage and query cached data, and run administrative tasks.

 


Packages


com.gemstone.gemfire :
Statistics,Logging,DataSerialization,and System Failure.The classes, interfaces, and               exceptions used for logging and sta­tistics and for  data serialization and system failure  management. This includes the LogWriter and Statistics classes that allow application-specific logging and statistics gathering. This also includes DataSerializable and SystemFailure.
com.gemstone.gemfire.admin :
Administration API Tools for administering and monitoring GemFire distributed systems.
com.gemstone.gemfire.cache:
Caching An implementation of distributed object caching that is capable of leveraging GemFire’s distribution capabilities. This package includes Cache, Region, and Region.Entry interfaces.
com.gemstone.gemfire.cache.client:
Client Used to configure client applications for communication with cache servers.
com.gemstone.gemfire.cache.query:
Querying and Indexing An implementation of OQL querying for local cache data and continuous querying on a server by a client. Supplemented by querying shortcut methods in cache.Region.
com.gemstone.gemfire.cache.server:
Server Used to run GemFire servers and to replace the default GemFire server load probe software with custom software written by you.
com.gemstone.gemfire.cache.util:
Customized Caching Classes Utilities for use with the caching classes. These utilities include an object sizer that returns the size of the object passed in, con­venience stub implementation classes for GemFire application plug-ins  and customized application plug-ins that implement the client side in client/server caching.
com.gemstone.gemfire.distributed:
Distributed System Membership Common tools for  GemFire distributed systems including the Distributed Member and Locator classes.
com.gemstone.gemfire.security:
Security and Authorization Tools for authenticating and authorizing system and data access.


Tuesday, February 5, 2013

What is GemFire?


Generally the GemFire is a Command-line utility that allows you to start, stop, and otherwise manage GemFire locators from an operating system command prompt. The utility also provides license information and log management and merging. explained by Google web dictionary
GemFire Enterprise is in-memory distributed data management platform that pools memory (and CPU, network and optionally local disk) across multiple processes to manage application objects and behavior. Using dynamic replication and data partitioning techniques, GemFire Enterprise offers continuous availability, high performance and linear scalability for data intensive applications without compromising on data consistency, even under failure conditions. In addition to being a distributed data container, it is an active data management system that uses an optimized low latency distribution layer for reliable asynchronous event notifications and guaranteed message delivery. explained by gemstone.

VMware's Cloud-Based GemFire Makes It Easier To Work With Big Data
Contributed by VMware.
Why companies are moving to GemFire ?
All companies are struggling with the growth of information overload often referred to as “Big Data,” some IT developers and database deploys are approaching the challenge with a cloud-based service designed to make accessing mass amounts of data faster. In short  they are started to move to GemFire.
GemFire is a distributed in-memory data grid database software product that enables data distribution, data replication and partitioning (sharding- DB term), cashing data management at the exact moment the information is needed.
While the ability to move data from server to server and replicate it to more than one location has proven invaluable over the last few years, today's critical challenge is how can companies manage this data properly.
  • Maintain simultaneous data connections over long distances.
  • Protect their data from disasters.
  • Maintain data reliability and availability, even when server hardware periodically fails.
The software is able to achieve these goals by creating an object-oriented "data fabric" across a server cluster. It accesses copies of data that are stored in various locations as needed. To ensure compatibility with the latest cloud configurations, the management platform can spread the data across many virtual machines and GemFire servers to manage application objects.