Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Pickle with an in-memory DB #57

Open
Corb3nik opened this issue Sep 19, 2017 · 3 comments
Open

Replace Pickle with an in-memory DB #57

Corb3nik opened this issue Sep 19, 2017 · 3 comments

Comments

@Corb3nik
Copy link
Collaborator

We should replace Pickle with an actual database such as Redis.

Any suggestions on what to use?

@Grazfather
Copy link
Contributor

Right now it looks like we use a combination of pickle and the channel purposes. I think we should move to just one.

What do we store in pickle?

I would like for us not to rely on channel listings, purpose, etc, (Maybe only the users IN a channel to see who's working on it?), that way we don't want to 'trust' the data.

On the other hand, this'll make it so that two bots running in different locations will have completely different ideas of what CTFs are running. This usecase shouldn't happen so often in the future.

On the other hand, we could keep everything in slack.

  1. We have to handle people editing the purpose
  2. How can the bots find the private channels if they've left (or we switch users?)

@Corb3nik
Copy link
Collaborator Author

We can't use a single source of information.

We need to use the channel purposes to get the most up-to-date information about CTFs/members/channels in case the bot needs a reboot.

We also need a local database to offload some of the API calls. Slack has rate limiting, so we can't query it intensely.

I'm ready to trust the information in purposes, since Slack notifies us when someone edits a purpose. Anyway, editing the bot's purpose without permission will simply result in a ban of the user IMO.

As for finding private channels, as long as the main CTF channel remains intact, there's no problem.
We need to keep the same user though. Admins have the API key, so I don't see why we would use any other user anyway :/

@Grazfather
Copy link
Contributor

Yes, let's use redis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants