Overwatch-Item-Tracker
Overwatch-Item-Tracker copied to clipboard
Use non-local storage
Not sure what the best implementation would be, but it would be great to have a way to access the same checklist data on multiple devices, and for them to have the same data. Perhaps using some sort of passport service that allows you to store data?
Any other way would require the use of a server which I am not willing to setup. I'm sorry.
Do you want a database run? I would offer up my resources and syseng experience if you need resources to get static data enabled.
Just adding to this. It would be neat if people could use Reddit OAuth as a way to login and view their persistent checklists.
Oh reddit oAuth is a good idea, the main problems I have with this is it needs a server and a way to manage accounts, I kind of like the simplicity of it at the moment, I mean realistically its for people playing Overwatch and marking items as they unbox, the need to view on multiple devices just seems like a costly investment for little gain, having to rely on having a reddit account (or some other account system) and guaranteeing uptime of the server, having to constantly sync data and having a server to maintain, I can run a server but i'm no systems engineer and I'd hate for something to happen that costs users their data or relying on a third party.
perhaps something like the following?
- [ ] allow the user to authenticate themselves using a 3rd party service
- [ ] add a button that will replace local storage data with remote data (download)
- [ ] add a button that will replace remote data with local storage data (upload)
the one thing is that some way of storing data remotely would need to be setup, perhaps the offer made by @crazy54 could be used? With what I am proposing you wouldn't need to do anything fancy to auto-sync data, and if the remote storage service failed, the user still has the local as a backup.
When providing a remote persitend storage, please let the user choose whether s|he want to use localStorage or remote storage
Even something like import/export a text string would be really helpful. I first found this tool on my laptop, filled everything I had in, and then cried a little when I realized I couldn't copy/paste it over to my desktop.
You still can using dev tools if you wish. localStorage.getItem('data')
localStorage.setItem('data', JSON.stringify(string goes here))
@ThatGuy435
Chrome:
- press F12 in browser
- Go to Application
- Local Storage
- copy your JSON from 'data'
Well, how about that. Thanks guys. It may still be worth putting an import/export string directly in the UI, as opposed to database servers and third party authentication, as using the dev console is not super straightforward for most users.
Maybe I'll put some effort into the import / export from a string in the next few days, but I can not promise anything.
If you want to give it a shot, I will be adding one if you want to leave it with me though.
This is just me thinking out loud, even though I have no experience with backend stuff. What if you were to utilize either Microsoft OneDrive or Google Drive? Both have some sort of API involved, along with OAuth, and a user would simply have to create a dedicated folder for you to securely read/write in without having access to anything else.
So we've been doing a lot of refactoring in the new-thing branch that lists all items in the game along with events and has previews for every item in the game. I know it would be nice to be able to use non-local storage but i'm not sure how it would work with how the site currently works.
The site is hosted on Github at the moment because;
- It's free
- Generous disk space (this repo is probably close to 1GB large)
- No bandwidth limits (so to speak, Github isn't the fastest host)
If I were to support like a Login with Battle.net i'm not sure how well it would work with the site being on Github, the site would probably need an actual server host which is where the other problems come in. There is a lot of media getting shown which uses a lot of bandwidth, and while I don't expect the site to be that popular, constantly syncing user selections would probably put some strain on a server as well, especially a cheap one.
So hosting the site on it's own is out of the question. I'm not sure on how to integrate a store on Google Drive or One Drive type of thing or if it would even work with the site hosted on Github without external services.
I know GitHub Pages doesn't allow for much in the way of dynamic content, so not sure where limitations would be run into, however I think the following would be helpful:
- [ ] A base64 string that represents what items are selected/unselected
- [ ] A way to export that string to the user
- [ ] A way to import that string to change what is selected
From here, external storage can be thought about. I know there are API's for Google Drive and Dropbox to allow storage, but I don't know if you can store the user credentials long enough with GitHub Pages for the use of them to be possible.
Use firebase https://firebase.google.com/docs/
Firebase would a good choice. No need to set up a sever or anything. Simple login system and then a few lines of code to sync the local storage.
Heck i'll fork the code and do code changes.
Hmm, I had a quick look and it seems alright. What kind of auth will it be using? Like a sign in with google or something? I kinda wanted a Sign in with Blizzard but I guess it doesn't matter.
Ok so I got Google Signin working which was pretty simple to add. Just gotta figure out how to do this Realtime DB stuff.
@Js41637 Realtime DB is one of the easiest forms of database that I've worked with. Just send the data as JSON and it will store it for you. If you need help, tell me and I'll be more than happy to help.
Ok so does anyone know a solution to the concurrency issue?
Could have it so that the sync only happens through explicit action, to minimize the number of concurrent users.
On Jun 7, 2017, at 12:11 AM, Js41637 ftw [email protected] wrote:
Ok so does anyone know a solution to the concurrency issue?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
I think this would be better. I think a live database update is a bit overkill, I figure most people would want it so they could easily view their stuff on another browser/phone/computer and be able to save if they want to change something. It might be a bit annoying to have to manually hit a save button but oh well.
I'm working on a sync to Google Drive. Took me hours trying to figure out Google Drives fucking shit api but I managed to get logging in/out and saving/fetching data from drive in 2235c6530d102a01842bf7d4d0979c87993ad5a9
I will probably make it sync like once a day (if you were to open it multiple times a day). The data won't be stored on your actually Google Drive. It is registered as an application so it uses it's own app data. This lets me only have access to the app on your drive. I don't want to be requesting users full drive permissions to save a file. Also I think it's better that it can't be edited manually or seen so I don't have to deal with possible issues or syncing from drive and dealing with potential merges.
Experimental Google Drive support/sync is now in the site. You can now upload and download data from your Google Drive, there is also a sync option but i'm not really an expert when it comes to syncing so there may be some issues but the manual upload and download work nicely.