shout icon indicating copy to clipboard operation
shout copied to clipboard

Option to store messages in a flat-file

Open darshan-talati opened this issue 9 years ago • 13 comments

As all the messages are currently stored in-memory, when the number of users increases or the amount of messages increases, memory can fill up very easily resulting in a crash. It would be nice to have an option to store messages in a flat-file rather so that Shout can be used for large/active group chats.

darshan-talati avatar Oct 07 '15 21:10 darshan-talati

@thisisdarshan you're right, it's definitely something we may want to do IMHO. Any figures/tests allowing to take the measure of the current issue storing everything in RAM ?

JocelynDelalande avatar Oct 07 '15 23:10 JocelynDelalande

This is really hardware agnostic. But from my experience, about 100-200 users can easily fill up ec2 micro instance (with 1GB RAM) in a week time. Sometimes earlier than that.

darshan-talati avatar Oct 08 '15 02:10 darshan-talati

See #391 (already merged in Shuo)

floogulinc avatar Oct 08 '15 14:10 floogulinc

@floogulinc, it looks good but i was hoping of something that stores in json.

darshan-talati avatar Oct 08 '15 15:10 darshan-talati

This is really hardware agnostic. But from my experience, about 100-200 users can easily fill up ec2 micro instance (with 1GB RAM) in a week time. Sometimes earlier than that.

@thisisdarshan Do you mean 100-200 shout users oh 100-200 buddies in the chans you're chatting on ?

JocelynDelalande avatar Oct 10 '15 10:10 JocelynDelalande

I would really love this feature as well, my 512M DO server is almost full. :+1:

zkanda avatar Oct 12 '15 03:10 zkanda

@JocelynDelalande 100-200 shout users, but there are only 2 active channels in the network.

darshan-talati avatar Oct 12 '15 16:10 darshan-talati

@zkanda how many users ?

(/me is getting feedback for https://github.com/erming/shout-roadmap/issues/3)

JocelynDelalande avatar Oct 12 '15 21:10 JocelynDelalande

@thisisdarshan, I recorded that in the roadmap: https://github.com/erming/shout-roadmap/pull/5/files#diff-04c6e90faac2675aa89e2176d2eec7d8R14 (to be merged soon).

However, there is no real benefit in storing that in JSON, which would be a flavor-of-the-day choice here. Simple flat-file would probably be best, but that goes into the pros and cons to discuss about in the roadmap. If we can go with a driver mechanism (to handle database connections as external drivers), nothing prevents someone to write a heavier solution with JSON, while keeping the defaults as the bare minimum. Makes sense? :-)

astorije avatar Oct 12 '15 21:10 astorije

Make sense @astorije. Thank you for adding this to the road-map. Looking forward to the second phase of Shout. Do we have any plans on when can we start implementing some of the new features listed on the roadmap?

darshan-talati avatar Oct 13 '15 02:10 darshan-talati

Sadly, not yet. However, the more we can discuss details in the roadmap, the easier it will be to get that to the code. Feel free to dump your ideas in issues and PRs in the roadmap so that we can get as many points of view as possible. Of course we won't be able to satisfy everyone, but it will help avoiding dead ends or bad choices!

astorije avatar Oct 13 '15 04:10 astorije

Hi, any progress in this issue during the last 2 years? I'm really hoping for this feature as well and hopefully a method to backup the database somewhere else as well

leopck avatar Apr 04 '17 23:04 leopck

hey @leopck : Shout's currently inactive, and I'd check out thelounge (the official fork)

that being said, Lounge doesn't have messages saving yet, but there is a WIP pull request to implement it, here: https://github.com/thelounge/lounge/pull/663

MaxLeiter avatar Apr 05 '17 02:04 MaxLeiter