Skip to content

This is a simple example of Hazelcast usage. It explains how to run a Hazelcast cluster using a Docker container provided by Hazelcast. Furthermore, it explains how to connect to the cluster and how to use the Hazelcast client to store and retrieve data with both Python and SQL.

Notifications You must be signed in to change notification settings

TimoFeucht/DB2-Hazelcast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hazelcast - Example

This is a simple example of Hazelcast usage. It explains how to run a Hazelcast cluster using a Docker container provided by Hazelcast. Furthermore, it explains how to connect to the cluster and how to use the Hazelcast client to store and retrieve data with both Python and SQL.

Usage

All information is based on the official Hazelcast documentation. If there are any issues, please refer to the official documentation.

  1. To run the application, you need to have Docker installed and running. If you don't have Docker installed, please follow the instructions on the official website. Please check with following command:
docker version

If you do not see a version number, see the Docker docs for troubleshooting information.

  1. Pull the Hazelcast Docker image from Docker Hub.
docker pull hazelcast/hazelcast:5.3.6
  1. Create a network for the Hazelcast Docker container.
docker network create hazelcast-network
  1. Run the Hazelcast Docker container.

WARING: Run Docker container in PowerShell with admin rights to avoid issues!

docker run -it --network hazelcast-network --rm -e HZ_NETWORK_PUBLICADDRESS=10.0.75.1:5701 -e HZ_CLUSTERNAME=DB2 -p 5701:5701 hazelcast/hazelcast:5.3.6

You should see your cluster name in the console along with the IP address of the Docker host:

platform-cluster-name.png

Appendix

Note

The project was created with PyCharm and tested on a Windows 11 machine with Docker Desktop 4.26.0 and Python 3.11. Any other environment was not tested and may not work as expected.

Authors

This example was created by Mick Eisebraun, Timo Feucht, Lea Gastgeb and Louis Schaak for the course "Datenbanken 2: Aktuelle Datenbanken Architekturen und Technologien". The course is part of the Bachelors's program "Informatik" at the DHBW. The course is taught by Rykarda Heim.

Literature

About

This is a simple example of Hazelcast usage. It explains how to run a Hazelcast cluster using a Docker container provided by Hazelcast. Furthermore, it explains how to connect to the cluster and how to use the Hazelcast client to store and retrieve data with both Python and SQL.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published