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

Consider adding 'sentinels' to avoid accidental mistyped database names. #21

Open
danielballan opened this issue Apr 25, 2019 · 0 comments

Comments

@danielballan
Copy link
Member

MongoDB will gladly, silently create a Database and Collections in that database if they don't exist. This makes it easy to connect to the wrong Database and start putting data in it without realizing. To avoid that, we require the user to explicitly initialize a Database for use with databroker by creating a "sentinel" collection.

Should we take this approach again in suitcase? I see one big Pro and several smaller Cons with no strong sense of how we should weigh them at this point.

Pro

  • Avoid accidentally putting data in the wrong place.

Con

  • Creates a hurdle for people getting set up to try this library
  • Seems to me not an idiomatic usage of MongoDB
  • The 'Pro' may be less relevant when MongoDB connections are managed centrally (behind an intake server) and never typed by end users.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant