Giter Club home page Giter Club logo

adidis's Introduction

adidis

what?

a distributed discord sharder.

this guy makes shards to connect to discord. distributes the messages across workers.

there's a whitepaper about this design, it's pretty interesting and you should read it some time.

why?

scenario: my discord bot has lots of big image commands. i use python because it has great image manipulation libraries and a great discord library. but my bot uses so much memory and the CPU is constantly pinned, so it runs really slow.

problem: you are getting bottlenecked by your own code, but because your bot is coupled so tightly to discord, you can't really do anything about it. more shards = more complexity and more points of failure.

answer: use a super fast language to talk to discord. keep a couple of these guys answering dispatch events. drop the ones you don't care about, put the ones you do care about in a big queue. cache the data you want in an in-memory database, get rid of the rest of it because it's fat and wastes memory. spawn a million python workers to answer discord events, bring them up and down as you choose, have basically zero downtime.

who?

this design is owed to zeyla and wolke who each have their own implementations of this system.

this one was written for fun, mostly.

where?

no where, yet.

when?

when someone asks.

wlicense

Licensed under ISC. LICENSE

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.