Code Monkey home page Code Monkey logo

raithe's Introduction

Raithe Maintainability Go Report Card GoDoc

The Compact and Persistent Messaging Queue

Getting Started

Run Go Get

go get github.com/catmullet/Raithe

Modifying your env file

Your env file simply contains the port you want to run from and the redis configuration.

# Essential Configurations
PORT=8021

# Redis
REDIS_URL=127.0.0.1:6379
REDIS_PASSWORD=""
REDIS_DB=0

Fire It Up

go run raithe.go

Raithe

Your Agents List

Your agents list will contain all agents that can register as a "producer" or "consumer", both are the same to Raithe. Contained within your agents_list.json of the root folder you will see something like this. Just list the names of the agents and each agent will need to call the register path (/auth/register) to stake thier claim on that agent name.

{
  "agents": [
    "test"
  ]
}

Playing Around

Register Clients

A Client is any service attempting to push or pop from the message queue.
Contained within the root directory is a file agents_list.json. This file contains all the agents that can register and is read in realtime. So Adding an agent is easy.

Request /auth/register

{
	"agent_name":"{{agent name}}"
}

Response

{
    "success": true,
    "message": "",
    "security_token": {
        "agent_name": "{{agent name}}",
        "token": "{{token}}"
    }
}

Push Message

Pusing a message can be done by any agent. Queues are the key and will be how agents identify which queue to pull from.

Request /queue/push

{
	"queue":"test",
	"message":"Hello World",
	"security_token": {
        	"agent_name": "{{agent name}}",
        	"token": "{{token}}"
    }
}

Response

{
    "success": true
}

Pop Message

Popping a message from the queue will grab the oldest message first. Simple as that.

Request /queue/pop

{
	"queue":"test",
	"security_token": {
        	"agent_name": "{{agent name}}",
        	"token": "{{token}}"
    }
}

Response

{
    "queue": "test",
    "message": "Hello World"
}

raithe's People

Contributors

catmullet avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

thefronzo

raithe's Issues

Benchmarks

Need benchmarks to give a better idea of speed and scalability of Raithe

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.