GithubHelp home page GithubHelp logo

nemomq-server's Introduction

NemoMQ

What is it

A very simple implementation of a Message Broker system with C# and dotnet core, for educational purposes.

Goal

The main goal of this project is to keep the features of the Broker to a bare-minimum and focus on its performance.

Architecture

The communication between the Broker and its clients is handled through TCP connections. The messages are serialized in a custom byte[] format. Client connections are handled with async/await pattern

Basic API

  • connect(serverIP, serverPort)
  • createQueue(queueName)
  • subscribe(queueName, callback)
  • publish(queueName, data)

Milestones

  • [✔] Create a client implementation in C# and a playground application
  • [✔] Add performance metrics and load-test the Broker
  • [✔] Replace JSON de/serialization with raw strings and check performance gains
  • [✔] Instead of seperate Thread per client, use Thread-pooling and check performance gains
  • [✔] Use async/await and check performance gains
  • [✔] Make the broker more stable (handle errors and client disconnects)
  • [✔] Remove the 255 bytes max message size
  • Add some more Broker features, like persistent messages, durable queues, routing algorithms etc
  • Creare a rest API exposing Broker status (queues, clients, messages etc)

Performance Conclusions

  • Performance is evaluated as messages per second the broker can serve
  • Replacing thread per client with async/await pattern gave a 110% performance boost
  • Replacing JSON de/serialization with byte manipulation gave another 200% performance boost

nemomq-server's People

Contributors

nemo-js avatar

Watchers

 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.