Well, what I think Amit means (correct me if I am wrong) is the Geode
embedded peer cache use case, meaning the application is also a peer cache
in the cluster, while not the most common UC (nor maybe recommended in most
UCs), it is a valid UC none-the-less.

It is to have your application participate a peer in the Geode cluster by
simply constructing a peer Cache using the CacheFactory
<http://geode.incubator.apache.org/releases/latest/javadoc/org/apache/geode/cache/CacheFactory.html>
[1],
and setting the locators property have your application join existing
cluster, something like so...

Cache peerCache = new CacheFactory().set("locators",
"<host>[<port>]").set(..)...create();

You can also do this in SDG with...

<util:properties id="geodeProperties">
 <prop key="name">MyApplication</prop>
 <prop key="mcast-port">0</prop>
 <prop key="log-level">${geode.log.level:config}</prop>
 <prop key="locators">${geode.locators.host-port:localhost[10334]}</prop>
 <prop key="start-locator">${geode.locator.embedded.host-port:}</prop>
</util:properties>

<gfe:cache properties-ref="geodeProperties"/>

The <gfe:cache> element created a "peer" cache (as opposed to the
<gfe:client-cache> element).

You are then free to create Regions used by your application as necessary.

I have examples of both GemFire peer and client/server configurations here
<https://github.com/jxblum/pivotal-gemfire-clientserver-examples> [2] and
here <https://github.com/jxblum/contacts-application/tree/apache-geode> [3]
(see configuration examples).

Hope this helps.

Cheers,
John

[1]
http://geode.incubator.apache.org/releases/latest/javadoc/org/apache/geode/cache/CacheFactory.html
[2] https://github.com/jxblum/pivotal-gemfire-clientserver-examples
[3] https://github.com/jxblum/contacts-application/tree/apache-geode


On Mon, Nov 14, 2016 at 11:28 AM, Michael Stolz <[email protected]> wrote:

> Geode clients have the ability to registerInterest(key) which works a lot
> like a topic.
>
> Not sure what you mean by using Geode embedded and with a cluster of
> external processes, but what I THINK you're asking is, can you use the
> Geode client/server model where the client is embedded into your
> application process and the servers that are responsible for holding all
> the data are in a separate cluster. The answer is YES, that is the most
> common configuration for Geode usage.
>
>
>
> --
> Mike Stolz
> Principal Engineer, GemFire Product Manager
> Mobile: 631-835-4771
>
> On Sat, Nov 12, 2016 at 12:41 PM, Amit Pandey <[email protected]>
> wrote:
>
>> Hi Guys,
>>
>> Is there any example of public subscribe with geode?  Hazelcast and
>> Ignite seem to have topics, is there any such thing in Geode.
>>
>> Also I want to use Geode embedded. Can I use it with a cluster of
>> external processes as well.
>>
>> Regards
>>
>
>


-- 
-John
503-504-8657
john.blum10101 (skype)

Reply via email to