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

Support multiple machine use case #448

shawkinsl opened this Issue Dec 1, 2018 · 3 comments


None yet
3 participants
Copy link

shawkinsl commented Dec 1, 2018

With 5.0.0, all data is now stored on local machines. This means that users who play MTGA on two different machines now have fragmented data. This ticket is to discuss potential solutions to the multi-machine problem.

Proposal A

MTGATracker allows users to select a "Secondary" database. On each launch, MTGATracker reads from the secondary database(s) (but never writes to them), and adds missing data to it's primary database. Users are in charge of syncing database files across machines themselves, but MTGATracker can come up with some recommendations that have been tested (e.g. google drive, dropbox, etc).


  • MTGATracker doesn't have to store data (no capacity / cost issues)
  • Supports 2 machines
  • No privacy concerns--users must vet their own syncing solution


  • Requires user setup outside of MTGATracker / requires users to potentially install additional software
  • Code to support 3rd+ machine may be more complex
  • Syncing is still not quite "automatic"

Proposal B

Leveraging open-source ideals, MTGATracker publishes docs showing how to spin up self-hosted inspector stacks (including how to sign up for free-tier DBaaS & compute resources, etc). MTGATracker is updated to allow users to send MTGATracker events to custom API's


  • MTGATracker doesn't have to store data (no capacity / cost issues)
  • Supports 2(+!) machines
  • Inspector can pivot to becoming a "team" tool, rather than just an individual tool


  • Requires significant user setup outside of MTGATracker / requires users to potentially install additional software
  • Likely involves significant rewrite / modification to support multi-user (is this flexibility actually a pro?)
  • Can no longer manage updates across privately-managed inspector stacks (issues like security bulletins may go unaddressed by 3rd party deploys)
  • Allows users to use MTGATracker to send their data to MTGATracker competitors :( (this is actually a pro and I am being silly and petty)

This comment has been minimized.

Copy link

mikeisgo commented Dec 4, 2018

From what I can tell in looking at your code, am I right to think that all of the tracker data is in NeDB files, and that is the files that you're syncing back and forth using google drive?

Would a hybrid of Option A and Option B, be adding support for something like a MongoDB backend, and allowing the user to configure their own database connection string, either local, or in somewhere like MongoDB's atlas free-tier? From what I understand NeDB's api is a subset of the Mongo api, or at least it started that way, so the transition might not be difficult.

Could this avoid having people run the whole stack, since it'd be far simpler to just spin up a blank db, than an app server plus a db as well.


This comment has been minimized.

Copy link

simu commented Dec 7, 2018

I was just thinking about this and I think there's also an option C: allow users to specify an alternate location for the database files which they sync between their devices, e.g. Dropbox or GDrive.


  • MTGATracker just needs a modification to make database storage location configurable
  • Leverages existing sync setups that most users with multiple devices probably have in place
  • Easy to expose to users, as it just needs a single configuration value for the storage location
  • All the pros from proposal A


  • Hooking in new devices can be awkward, if selecting a storage path is not incorporated into the installer
  • Handling conflicts can get messy if both machines are online at the same time
  • Users with multiple devices, but no sync solution setup need to install some form of data sync between their devices (same as proposal A).

This comment has been minimized.

Copy link
Member Author

shawkinsl commented Dec 13, 2018

@mikeisgo I hadn't thought of letting users plug in a mongodb connection string. That would be pretty clever, and maybe something I'll look into! In theory, NeDB code should be pretty portable (especially for inserts), but I don't want to promise it will be straightforward... nothing ever is ;)

@simu I guess the only concern there is if the database is being used by multiple users at the same time. I haven't used any file-sharing solution (other than git ;) ) in a long time, so I don't know if any of them would be intelligent enough to be able to merge files without losing data if two sources attempted a write close enough to each other. (Dropbox used to be terrible for sharing active documents for this reason, but then, my context there is based in like 2009, so.)

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