Skip to content

sagar-sontakke/cluster2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation


Contents

  1. Introduction
  2. How to use it?
  3. How to test it?
  4. Working mechanism
  5. References

  1. Introduction

    • This is cluster-programming library that provides the interfaces for creating/using the clusters containing multiple server nodes
    • The working is simple and easy to use the abstraction functions
    • The cluster configuration is to be specified in a configuration file
    • The main function of these library are described below
  2. How to use it?

    • Specifying the cluster configuraton with config file:

      • This file contains the details about each server in the cluster

      • The name of this file is as specified by the user

      • This file contains the entries as a pair of server id and IP:port address which are comma separated eg:

          200, tcp://127.0.0.1:1201  
          300, tcp://127.0.0.1:1202  
        
      • The node ids and ip:port addresses for all the servers in a cluster must be unique else there will be a parse error

    • This library provides a number of basic functions to use for cluster set-up and managing communications between them. These function roles are explained in the corresponding comments in the code

  3. How to test it?

    • Go to the directory where the cluster_test.go file is present

    • Set the testing parameters (default values are also set) like when to timeout, how many times to loop, whether to broadcast/unicast messages and display intervals (after how much time to show the current status)

    • The functions of these parameters are mentioned in the comments

    • To print the details of the tests, (how many nodes in cluster, how many messages, kind of messages broadcast/unicast/both, total sent, total received and total expected messages) set the flag "PRINT_DETAILS" in the cluster_test.go file to true.

    • To run, hit the following command:

        $ go test github.com/sagar-sontakke/cluster  
      
  4. References

About

This is a new repository with changes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages