🧙 Sharding backend infrastructure for Nino v2, handles as a sharding operator for Nino.

Overview

shibe

🧙 Sharding backend infrastructure for Nino v2, handles as a sharding operator for Nino.

Why?

I feel like this was needed because I wanted to keep Discord's gateway multi-threaded without blocking the Node.js thread, and this is the possible way I can do it. I will keep Nino in TypeScript, but I wanted to have an operator handling shards and add/remove shards without having to reload the bot and having it available without any restarts.

It's possible using singyeong for sending messages between production and staging instances about Discord events, health-related issues, etc. and singyeong is pretty cool as in features, and I wanted to use it as a messaging router. The database is handled under the bot and cached through Redis, so we don't have overlying connections between database connections and possibly destroying data if I am dumb.

I would like to note that shibe is for Nino's use-case and probably does not fit under your needs, this is just a project on how the backend infrastructure for Nino will work. Self-hosted instances will not require shibe and can be handled with Eris (the old gateway library we use) without any pressure. This is mainly for production and staging.

Isn't this just another "discord clustering" thing?

I wouldn't really say so, and here me out:

shibe doesn't rely on the clustering idea, which might sound weird. I won't add automatic scaling since Nino uses Kubernetes to manage scaling, so that's not an issue there. It's just a backend job to scale shards in a multi-threaded environment and dispatch events faster + reliably.

It also doesn't rely on IPC, or a relay service! It's just a WebSocket connection like Discord's gateway! I wanted to create an environment that feels similar to Discord's gateway. You can see the implementation details, but I added some packets of my own to help manage shibe, nothing more!

Modules

  • core ~ Core infrastructure for shibe, most of the heavy work is here.
  • gateway ~ Gateway connection towards Discord.
  • singyeong ~ Library for interacting with singyeong using Ktor.

License

shibe is released under the GPL-3.0 License, read the LICENSE file for more information.

You might also like...
Kotlin microservices with REST, and gRPC using BFF pattern. This repository contains backend services. Everything is dockerized and ready to
Kotlin microservices with REST, and gRPC using BFF pattern. This repository contains backend services. Everything is dockerized and ready to "Go" actually "Kotlin" :-)

Microservices Kotlin gRPC Deployed in EC2, Check it out! This repo contains microservices written in Kotlin with BFF pattern for performing CRUD opera

A sample skeleton backend app built using Spring Boot kotlin, Expedia Kotlin Graphql, Reactive Web that can be deployed to Google App Engine Flexible environmennt

spring-kotlin-gql-gae This is a sample skeleton of a backend app that was built using: Spring Boot(Kotlin) Reactive Web Sprinng Data R2DBC with MYSQL

Kotrlin Programming Language Cross-Platform Development which includes Android, iOS and Backend. Pretty much everwhere.
Kotrlin Programming Language Cross-Platform Development which includes Android, iOS and Backend. Pretty much everwhere.

Kotlin-Everywhere: Kotlin Programming Language Cross-Platform Development This is still a WIP but the idea is to create a tiny KOTLIN project that cou

Blog Backend Api built with Kotlin, Springboot and AWS

Kotlin, Spring Boot, MySQL, JPA, Hibernate Rest API for Blogs A Restful CRUD API using Kotlin, Spring Boot, Mysql, JPA and Hibernate hosted on AWS Ela

Backend coding challenge using Kotlin and Ktor

Backend Coding Challenge We appreciate you taking the time to participate and su

Kbackend - A simple backend library for creating backends in Kotlin/Java

kbackend A simple backend library for creating backends in Kotlin/Java Setup Thi

Trawler - Trawler is a BaaS system. Backend as a service

Trawler is a BaaS system. Backend as a service. BaaS Generate REST and GraphQL f

Android login spring - Android login against spring backend

Android Jetpack Compose login implementation with JWT tokens against our own bac

A small backend for the Thinkrchive app written in Kotlin with Ktor

A small backend for the Thinkrchive app written in Kotlin with Ktor. It uses Postgresql with a few requests and JWT authentication for admins.

Owner
Nino
Cute, advanced discord moderation bot made in Eris. Make your server cute and automated with utilities for you and your server moderators *:・゚✧*:・゚✧
Nino
🐹 Kotlin microservice to aid slash command creation for Nino.

slash-commands ?? .Kotlin microservice to aid slash command creation for Nino. More of this README will be fixed up once the first release is here. Li

Nino 5 Oct 1, 2021
🧶 Full-fledged Kotlin client for MikaBot/cluster-operator as a separate package

?? Eri Full-fledged Kotlin client for MikaBot/cluster-operator as a separate package Usage Connecting to operator fun main(args: Array<String>) {

Nino 3 Nov 17, 2021
R2DBC Sharding Example with Kotlin Coroutine

R2DBC Sharding Example with Kotlin Coroutine A minimal sharding example with R2DBC and coroutine, where user table is divided into 2 different shards.

K.S. Yim 0 Oct 4, 2021
Backend-aio - A ktor based ready to use backend

BackendAIO A ktor based ready to use backend BackendAIO is a project made to hel

Fabrizio Scarponi 2 Jan 24, 2022
Backend aio - A project made to help all newbie programmers that are approaching backend development

BackendAIO A ktor based ready to use backend BackendAIO is a project made to hel

Fabrizio Scarponi 4 Feb 1, 2022
This library handles conversion between Request Params and JPA Specification.

Spring Jpa Magic Filter This library handles conversion between spring rest Request Params and JPA Specification. It can be considered a simpler alter

Verissimo Joao Ribeiro 4 Jan 12, 2022
New Relic Kotlin Instrumentation for Kotlin Coroutine. It successfully handles thread changes in suspend states.

new-relic-kotlin-coroutine New Relic Kotlin Instrumentation for Kotlin Coroutine. It successfully handles thread changes in suspend states. Usage 1- U

Mehmet Sezer 7 Nov 17, 2022
📒 NotyKT is a complete 💎Kotlin-stack (Backend + Android) 📱 application built to demonstrate the use of Modern development tools with best practices implementation🦸.

NotyKT ??️ NotyKT is the complete Kotlin-stack note taking ??️ application ?? built to demonstrate a use of Kotlin programming language in server-side

Shreyas Patil 1.4k Dec 26, 2022
It is a repository containing backend structure for Ktor.

Backend Architecture with Ktor + KMongo This project contains, Authentication using Jwt Database Layer (KMongo - Orm for MongoDB) Routing Advanced Rou

Himanshu Singh 56 Dec 28, 2022
Kotlin backend based on the Clean Architecture principles. Ktor, JWT, Exposed, Flyway, KGraphQL/GraphQL generated endpoints, Gradle.

Kotlin Clean Architecture Backend Kotlin backend based on the Clean Architecture principles. The application is separated into three modules: Domain,

null 255 Jan 3, 2023