The proper way of defining map loaders from application - hazelcast - hazelcast

I have an application using Hazelcast in the embedded mode. I use MapLoaders and indexes. I want to change my application so I can use an existing external Hazelcast cluster to which I will connect using the client api and here lies my problem. There is no way of defining those map loaders in the client app, so I need to use the server mode. Right now I'm using the JoinConfig so I can join the cluster and define my map loaders, but if I understand correctly, by joining the cluster my app will become a part of the cluster itself (and host some data partitions) and this is something I would like to avoid. So is there another way of connecting to this external cluster so my app doesn't start hosting the cache data, or is my approach correct and I shouldn't mind being a part of the cluster?

If you use Hazelcast Client, it just connects to the cluster, but it does not become part of the cluster. It seems like what you want.
Concerning Map Loaders, please check the related code sample.

Related

Is there a way to remove a rogue node from our hazelcast cluster?

We are currently running a hazelcast cluster using it to communicate information on a queue to be picked up by a single node in the cluster. We are vulnerable however to a "rogue" node that joins the cluster but without the right version of software to handle the request in a way that's proper.
Is there a way proactively remove rogue nodes of this nature in a way that prevents them from actively re-joining the cluster? I haven't been able to see a way from the documentation.
It looks like you are using default hazelcast xml. You better need to have a custom hazelcast xml with updated Group credentials.

Cassandra Multi Node Cluster - Scan name

I am new to cassandra database , i have configured multi-node cassandra , configured like one node per machine
I want to access the cassandra db using one name ( like Scan name in Oracle RAC) from client applications is it possible to do it in that manner,
Our developers are used to the Oracle RAC scan name they are expecting something similer thing in multi node cassandra as well
At the moment I can access the induvidual nodes using seperate IP's which i have assigned
Can any one help me on this
What I think your describing is service discovery. You should have a look at Consul (https://www.consul.io/) to define the contact points for your application to connect to Cassandra.
Essentially, you can use Consul to manage a single DNS entry (https://www.consul.io/docs/agent/dns.html) for your applications to use without having to hardcode an IP etc.

Connecting to Couchbase Server Cluster

I've been using Couchbase for my database solution and so far it looks very good.
I'm confused however with connecting to a Cluster. A Cluster is just a group of nodes so when you use the API to connect to a Cluster what do you use as the IP? Do you just use one of the nodes in the Cluster? Does it matter which one?
I'm personally using the Node.js API.
Technically all you need is just one node in the list. As soon as it connects to that one, it will get the cluster map of the entire cluster and know all of the rest of the nodes. No it does not matter which node.
That being said, best practice is to have at least 3 nodes of the cluster listed in the connection string or better yet if the SDK you are using supports it, use a DNS SRV record with at least 3 nodes in there. With three nodes in the list if for some reason (e.g. server failure or maintenance) one of the nodes is unavailable, you can still bootstrap an application server to get that cluster map with one of the other nodes in the list.
I asked this question a few months ago on couchbase forums and the author of the node.js module answered that you should use "some" of them
like :
cluster.openBucket("couchbase://server1,server2,server3", function(err) {});
if you have server4 and 5 are added , they will be automatically added to the cluster as soon as they are available in the cluster.
Check here for details : https://forums.couchbase.com/t/couchnode-connection-to-cluster/6281

How to run Couchbase on multiple server or multiple AWS instances?

I am trying to evaluate couchbase`s performance on multiple nodes. I have a Client that generates data for me based on some schema(for 1 node currently, local). But I want to know how I can horizontally scale Couchbase and how it works. Like If I have multiple machines or AWS instances or Windows Azure how can I configure Couchbase to shard the data and than I can evaluate its performance for multiple nodes. Any suggestions and details as to how I can do this?
I am not (yet) familiar with Azure but you can find a very good white paper about Couchbase on AWS:
Running Couchbase on AWS
Let's talk about the cluster itself, you just need to
install Couchbase on multiple nodes
create a "cluster" on one of then
then you simply have to add other nodes to the cluster and rebalance.
I have created an Ansible script that use exactly the steps to create a cluster from command line, see
Create a Couchbase cluster with Ansible
Once you have done that your application will leverage all the nodes automatically, and you can add/remove nodes as you need.
Finally if you want to learn more about Couchbase architecture, how sharding, failover, data consistency, indexing work, I am inviting your to look at this white paper:
Couchbase Server: An Architectural Overview

Set cluster name when using Cassandra CQL/JDBC driver

I'm using the Cassandra CQL/JDBC driver I got from google code but it doesn't seem to let me provide a cluster name - is there a way?
I'm using cluster names to ensure I don't run commands against a live system, it has a different cluster name to my dev systems.
Edit: Just to clarify, I have two totally separate Cassandra clusters, one live and one for test. They have different cluster names to ensure that I don't accidentally run test code meant for the test cluster on the live cluster. Therefore any client I need to use must let me set a cluster name. Hector does this.
There is no inbuilt protection for checking cluster names for Cassandra clients. It is built to ensure nodes from different clusters don't try and join together but not to ensure clients connect to the right cluster. It would be possible to add this checking to a client though (since the cluster name is exposed to the client) but I'm not aware of any clients doing this.
I'd strongly recommend firewalling off your different environments to avoid this kind of mistake. If that isn't possible, you should choose different ports to avoid confusion. Change this with the 'rpc_port' setting in cassandra.yaml.
You'd have to mirror the data on two different clusters. You cant access the same cluster with different names.
To rename your cluster (from the default 'Test Cluster') you edit the cassandra configuration file found in location/of/cassandra/conf/cassandra.yaml. Its the top line, if you need more details look at the datastax configuration documentation and explanation.

Resources