spring-attic / gs-accessing-data-gemfire

Accessing Data in Pivotal GemFire :: Learn how to build an application using Gemfire's data fabric.
https://spring.io/guides/gs/accessing-data-gemfire/
Apache License 2.0
9 stars 25 forks source link

Confused about the Pivotal GemFire cluster this example connects to? #9

Closed steeeeets closed 5 years ago

steeeeets commented 5 years ago

Hi,

I this example, I haven't found any locator, query server start up. I see it says, the region is "LOCAL"? Local here means the region type of gemfire? How to understand this local? I think pivot gemfire is a commerical software, people pay for it, but in this example, seems there an embedded one in spring-data-jap?

Please help. Thanks.

jxblum commented 5 years ago

Yes, this is a self-contained, Pivotal GemFire (or alternatively, Apache Geode, if you prefer) cache client (i.e. org.apache.geode.cache.client.ClientCache) application.

NOTE: Apache Geode is the open source core of Pivotal GemFire. As of SD Kay, the dependencies (i.e. org.springframework.data:spring-data-geode & org.springframework.data:spring-data-gemfire) are interchangeable. See here for more details.

With Apache Geode, or Pivotal GemFire, a cache client application does not require a server (cluster) to connect and put or retrieve data. A ClientCache instance can, in fact, store data locally using a LOCAL Region data management policy. This is often useful during development to get you started quickly and easily.

However, as your application requirements and Use Cases (UC) grow, it is very common (and especially recommended in production deployments) to switch to a client/server topology. That is, 1 or more ClientCache, Spring Boot (using Spring Data for Apache Geode or Pivotal GemFire) applications connect to a dedicated cluster of Geode/GemFire servers managing the data, bound together through 1 or more Locators. Clients can connect directly to 1 or more CacheServers, but more likely than not, you want to configure your client Pool to connect to 1 or more Locators in the cluster of servers to take advantage of the single-hop, load-balanced and automatic failure capabilities of the client connection Pool.

But, to get started, it is far less overhead (e.g. faster startup times) and simpler to standup a local cache client, than to use the client/server topology or use the embedded peer deployment model. In that way, you can progress towards a client/server topology and scale-out your cluster as your demand dictates.

You can read more about Region Data Storage and Distribution in the Pivotal GemFire User Guide (same chapter exists in the Apache Geode User Guide as well)

This is the exact definition of a LOCAL Region.

Pivotal GemFire is commercial software, owned and sold by Pivotal Software, Inc. However, you can start from open source, using Apache Geode, and then migrate to the commercial offering as you need. It is also possible to move from commercial back to open source (i.e. by switching from Spring Data for Pivotal GemFire back to Spring Data for Apache Geode; going both ways is possible as explained in my blog entry).

Now, Pivotal even offers the Pivotal Cloud Cache service (PCC) on Pivotal CloudFoundry (PCF), which is built on Pivotal GemFire, which is built on Apache Geode.

Therefore, when you use the new Spring Boot for Apache Geode/Pivotal GemFire project (documentation available here), you are covered "locally" all the way on your journey to the cloud.

See my S1P-2018 talk (video link) this year.

Hope this helps!

steeeeets commented 5 years ago

Hi,

Thanks VM for your answer, it's crystal. And... Thanks for correct my programmer in title 😳😳