I will make a website where users log in to see the site's info organized in a way which is specific to each user, depending on the settings which they can set/save while logged in. But they won't be adding content or uploading anything. So I guess, it won't be a lot of data - just a couple lines of text for each user.
So, to start out, I'd like to use something free to store that user data. Dropbox or Google docs, my own compter.... I dont know.
And then later, when I get enough users to make the investment worthwhile, pay for a more legitimate solution.
My question is, in the meantime, what is the best way to store that user data? Should I use javascript and Google docs API to read/write to a spreadsheet?
What is going to be most convenient when my user base has grown enough and it comes time to move all that over to a larger system?
And are there any other concerns I should be thinking about?
Look into using a lightweight DBMS like MySQL. If you want, you can serve it locally using your computer, but don't expect it to handle a lot of traffic. It'd be better to find an old computer and use that as a server.
What is your hosting solution? Many include free mySQL databases which should be enough.
I would suggest using sqlite3 or something for a database setup. They can be very small files and easily manageable. In the long-run sqlite3 isn't a great choice. You would want to move to a heftier database assuming you rake in a lot of users.
Related
I'm developing a websocket real time browser game ( socketio nodejs) and wanted to start implementing my database and would like to know which type of database (nosql, sql .. ) would fit my situation best.
A small description of how i intend to use it :
I want to have game rooms with all their options stored ( which can be changed frequently)
a list of the connected users and their linked accounts( if a user is a guest he won't have a linked account, however if he does it would be linked with another table containing some extra data like lvl or something like that)
a list of user thema they like ( so for example when a game starts, it will take the themas in common for all users to use the game) all typical themas are stored in another big table that has a lot of data that won't be updated in a while.
So basically I have some tables that need a lot of quick and concurrent access which get updated and deleted frequently and some that don't need it and have a lot of permanent data.
I was thinking about using mongodb but honestly don't want to commit on something i don't have experience with ( i do have sql knowledge). I need suggestions thanks
TD;LR: I would personally go with PostgreSQL.
Recently, I had the same question as you, but with the only difference, I was not looking to build game rooms. After some research, I was convinced that PostgreSQL is awesome and suitable for every project. Well, tech giants use it too, including Facebook, Uber, Netflix... (https://stackshare.io/postgresql). It is scalable, easy to set one DB up, great community with lots of tutorials (both videos and articles) and it is also extensible, as it supports JSON, which is great!
You can use a great ORM for Node.js, such as TypeORM or Sequelize. Furthermore, I suggest you take a look at GraphQL, an API that has subscriptions (real-time operations). As I guess it will be a web application, I highly recommend you to go with React.js for the front-end functionalities, which interact great with GraphQL & Node.js. Last but not least, lots of developers and companies use both MongoDB and PostgreSQL for different functionalities and purposes for each. For user's tables use PostgreSQL, for multiple "big" JSON objects use MongoDB.
I hope that helps and lets you understand what you want in a more clear way. Good luck with your project!
On my website, users enter some personal information, including ZIP code. This information will be passed to a function that will determine the display of the next page.
The problem is that the function utilizes an underlying statistical model, for which zip codes have too many possible values (~43,000) to be useful. I want to map zip codes to something broader, like designated market area (DMA has around 200 possible values).
But using Google Analytics and BigQuery, I already have the user's DMA before they even enter their ZIP code. Is there a way to access that information while they are still on the page so I can input it to the function?
In case you are wondering if you can use Google Analytics Information in realtime (not quite clear from the question), that will not work - GA does not work in realtime; data processing time is announced as 4 hours for the "premium" version to 24 hours to the standard version, and even if it's often faster you probably do not want to build you business on an undocumented feature that might or might not work as expected.
Also API limits make realtime data retrieval unfeasible even for smaller sites.
If however you have a stash of precomputed data that can be linked to the current user via an identifier (clientId or similar) it would probably be best to export this to external storage as suggested by Willian Fuks.
Since you mentioned personal data, keep in mind that this must not be stored within Google Analytics as per Google's TOS.
(not quite an answer, more like some thoughts of mine)
I don't think that running queries in BQ for each user you find in production is a good approach.
Costs will increase considerably, performance will not be satisfactory by any means in this scenario and you might start hitting quotas limits for jobs against a single table.
One possibility that might work is having your back-end use some google analytics client for retrieving data from G.A. Still, you should check if the quotas are appropriate for you.
Another possibility (I suspect this might be the best option) that you may consider for your scenario is using Google Datastore. It might suit your needs quite well; you could have some table from BigQuery being exported to Datastore and have your back-end system query it directly for the user DMA.
I want to store some application data on the google drive, for example to remember settings the user have made. Normally I will use cookies for this or the localStorage of the browser but this is browser depended and limited (storage size).
I google for some information about this functionality but didn't found something useful except the example of google itself. In this example (found here: https://developers.google.com/drive/appdata) they explain how to store some information. To me it looks more like sending an e-mail and they didn't explain how to replace some data. Quite complicated if you ask me.
I wonder why it must be that difficult to store a simple boolean, integer or string like you can do with cookies or the localStorage object. I doesn't have to know where it is located, just simple, you alter an identifier and a value, that must be it.
Does have somebody an example that makes this function easier to use? I mean is this the only way to do it? Does somebody has some experience with saving appdata?
Or does anybody knows a class that can simplify those things (like the PHP version)?
If you wish to store data in the users Google Drive, yes, it is that complicated. You are going to have to go through the OAuth2 process or one of the other handshake methods Google allows. However, if you wish to store that data into your own Google drive, which doesn't sound smart but I cannot tell from your question, you could make the process a lot easier because you could hard code your username and password into the header of the api calls you make. Again, that is not smart or recommended but because OAuth2 requires HTTPS its not suicide.
I'm sorry but it is not clear what you are asking. Please more specifically state your problem, otherwise this is the best answer anyone could give.
Me and my startup app company is working on a turn based multiplayer iPhone application. Let it be said that neither one of us have any database, or server, knowledge whatsoever. Though, we are willing to learn.
The flow of the game will be similar to such games as: WordFeud, WordsWithFriends, Rumble etc.
Let me start of by where a lot of searching on the web has gotten us:
We have decided to use CouchDB as a tool for storing information about users, game sessions and other stuff. CouchDB is an open source noSQL database system. The reason is that we have been taught, that it should support a lot off concurring users. Besides, that it scales - we are hoping to go big, of course.
Our CouchDB, is hosted on IrisCouch. IrisCouch is an "in cloud" hosting service designed for running CouchDb.
So, we've got a CouchDB server up and running, and we know the basics on how to query data from the server.
Our biggest confusion right now, is how we should set up the system to work according to best practices. Right now we are at the point where we are able to receive and submit data to the server.
Our game is supposed to have Facebook integration, so that the users can register via our app or through Facebook. After that they can play with random matched opponents, or play with friends. After a match is started, one player will get a set of question to be asked, after he has answered, the other player should be notified, through push notification, that it's their turn. After a few rounds the game is finished.
At this point, we think this might be the best solution for the flow of the application:
A user connects to another user -> a game session is opened as a
document in a database called "games".
The newly created document contains both player names, question,
answers etc
A field named "whos_turn" decides which of the two players turn it is.
After the game has ended, the session is erased.
Again, and as you may see, we are in the dark as of how to really do it, but this is the general idea.
So, my questions goes as following:
Is it best to query the data directly from the iPhone application, or through a web service?
What is the best way to set up the database, to best manage the flow of the application?
Any information, that could lead us closer will be gladly appreciated :)
In advance, thank you!
Olav Gundersen
EDIT#1 : Our Objective-C programmer managed to connect two iPhone devices using CouchDb. The iPhone application consists of a table view, that has a concurrent connection with the database, so that when someone POST to the database, it shows up on the tableview of all the other connected phones. Behold: a severely ineffective chat system.
If is a multiplayer you would need to have the app to communicate to the remote iriscouch.db but I am concerned by the point where you state that neither you or your friends have any database experience. You are willing to learn so I think the best place to start is:
http://guide.couchdb.org/editions/1/en/index.html
There are several issue you might find with scalability if you plan to erase documents continuously. DB Size can be considerable on couchdb and you will need to compact &cleanup the db regularly. But I don't think is a major issue for now as this is at a start up level.
The question "best way to setup the database and best manage the flow of the application" should be addressed by your team. If you do not have someone with any database experience you should try to find someone willing to help you. It should be someone with extensive experience in databases. You might find some fairly reasonable professionals at http://www.odesk.com
In total honestly I don't think you will be successful if you don't have such a figure - either as a freelancer or contributor - to help you having a solid database logic in the game that will ensure a great user experience.
For example: have you considered the latency-delay issue by using a db based in the USA (Iriscouch) vs. where your users are located?
For this reason you might want to do as much as possible client side (embedded database like sqlite or touchDB that is essentially couchDB for iPhone)
For an iPhone application you might want to try TouchDB that is made exactly for that
https://github.com/couchbaselabs/TouchDB-iOS (caveat: being that you need connectivity to check turns etc this might not be the ideal solution but it could work to store some information locally).
To lay this out you would need someone with experience with couchdb to set up a proper, usable application. There is nothing wrong in being enthusiast about your idea but to make it a success you need a technical mind in the database side. Of course you might be well capable to learn this yourself. After reading the CouchDB book you should be in position to create a basic flow to fit your needs.
Of course other more experienced users might come with a more comprehensive answer or a sample layout but I don't think would be the best approach. Even if someone posts a full layout of the doc structure and how to query it how are you going to service the app if something goes awry e.g. sessions don't get deleted, conflicts etc. ? hence my sincere advice to get some ad-hoc expertise for your case.
This might also result in analyzing suitable alternatives. I don't think you should buy into the idea that CouchDB can scale and hence is the best/only option for you (of course this might well be the case and if you feel that is a good option..go for it). For example twitter, google adwords and many other online apps are using mysql to store their data so for sure CouchDB is not the only database that can scale!
I think this demo app could be a good example to follow: iOS Couchbase Demo
I am a volunteer coordinator for a not-for-profit with some basic experience using Python. I'm willing to put in <8 hours of learning for my current project (otherwise, I'll do it manually). I'm running OSX 10.6. I might be able to get help from one of my volunteers :)
I have an excel spreadsheet of information about my volunteers, and I'm trying to automate the task of updating specific fields in my web-based volunteer management software from the data in entries from my spreadsheet.
I've read responses to related questions, but none seem to include the external excel database. Also, I understand that I may be able to bypass the user-interface (by building my own html connection to the software's website).
Please suggest the simplest, and alternatively, the most flexible tool I might use for this task. What information would I need about the remote software? Is there a better format than excel for my database? Any clarifying questions?
Well, PHP is probably the most common way people do this but considering your 8 hour limit and affinity for spreadsheets, you can check out http://code.google.com/apis/spreadsheets/
for a way to make use of an online spreadsheet.
Try online form/survey services. Jotforms have a good free plan that might fit your needs.