Giter Site home page Giter Site logo

monrabit's Introduction

MonRabit

this is a tool for handle net requests with high performance process

  • support all protocol, like http, tcp, udp etc.
  • Job\Worker network model
  • use golang channel

get

go get github.com/r00tjimmy/MonRabit

sample HTTP handler

package main

import (
  "github.com/r00tjimmy/MonRabit/worker"
)

var (
  maxWorker = 3
  maxJob = 10
  handleType = "http"   // set network protocol type
)

func main() {
  // make the worker at first
  // make the worker, listening work_pool channel
  dispatcher := worker.NewDispatcher(maxWorker, handleType)
  dispatcher.Run()

  // make the job for test sample
  // get requet
  request := worker.NewRequest(maxJob, handleType)
  request.Run()

}

examples code build && test && run

cd examples

# change config file
vim ./utils/config.ini

# just build
make build

after build, you can run with ./monrabit in current folder

# just test
make gotest

# auto build and run 
make all

performance reports

hardware: 4C 16G

OS: CentOS 7.4 x64

comapre Apache/2.4.12 with MonRabit use ab tool. detail can see the report files, the performance reports files in folder preformance_reports

monrabit's People

Contributors

halokid avatar

Stargazers

JinSSJ3 avatar  avatar Jackal.C avatar  avatar

Watchers

James Cloos avatar  avatar

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.