Currently learning stuff and building things
daswolke / cloudstorm Goto Github PK
View Code? Open in Web Editor NEWModular discord gateway library for microservice oriented bots
License: MIT License
Modular discord gateway library for microservice oriented bots
License: MIT License
Hello,
Is this still alive? Can't get it through npm, tried with git getting lot of node gyp errors about zlib sync
There appears to be a memory leak somewhere in CloudStorm, possibly related to the erlpack.node
library.
CloudStorm uses a reasonable amount of memory upon startup (~1-2 MiB). This memory usage remains constant and does not increase over time, even as events in the server occur.
CloudStorm starts out using 1 MiB of memory. After about 1-2 minutes, memory usage begins to increase. At 17 minutes of runtime, memory usage has risen to 27.03 MiB.
Profiling to find this memory leak was done in Instruments using a boilerplate script (seen below).
Here are some of the screenshots illustrating CloudStorm's memory usage:
One screenshot appears to link the issue to erlpack.node
:
Here's the full .trace
file, if you'd like. It can be viewed in Instruments and should reveal more details.
CloudStorm Allocations.trace.zip
The code I used to test and isolate this memory leak was fairly straightforward. Here it is:
const CloudStorm = require('Cloudstorm');
let bot = new CloudStorm(process.env.BOT_TOKEN, {
initialPresence: { status: 'online', game: { name: 'memory leaks. Fun!' } },
firstShardId: 0,
lastShardId: 0,
shardAmount: 1
});
function ready() {
console.log("CloudStorm ready");
}
function event(event) {
console.log("=== RECEIVED AN EVENT ===");
console.log(event.t);
}
bot.on("ready", ready);
bot.on("event", event);
bot.connect();
There is probally an easier way to ask questions but I just threw it in issues but is CloudStorm it's own thing or do RainCache and etc get used with CloudStorm also if I understood your reply to my old thing i'm looking forward to seeing an open source bot used with CloudStorm! :)
So if this actual ever gets finished would you ever think about making a full modular bot out of your system rather than using something like discord.js, it would be cool to see this made with a real bot as well just some ideas for the bot if you did do this, moderation commands, music, fun, etc, and very beautiful rich embed help, you could even name the bot CloudStorm and the bot would run off CloudStorm! ๐
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.