0
votes

I have been considering the best process to store user data online.

An example of the usage I need:

Think of it as a collaborative story-writing app. One user writes, say, a paragraph of the story. They "submit" this paragraph and all the other uses of the app who have subscribed to this user will be near-immediately notified and will be able to check their app for the update. The subscribed users can then write their own paragraph, and submit it, which alerts the original poster and all other users.

I mostly just need the database functionality. It would be fantastic if I could make use of Facebook's friends functionality, but I guess I could use both of the below approaches...

The approaches I have considered:

Using Unity's Facebook.API

When I was originally conceiving my concept a friend suggested using the Unity FB.API as a way to store the information online. However from what I understand FB can't really be used as database, which is what question one involves.

Hosting my own Server

I am familiar with Node.js, and have used it to create and manage small servers, just for University assignments. So I understand the basics of whats involved, and the way I see it I have two options here: paying for a server or hosting one on my home PC (just for early development).

If I do it this way, I could save the data in JSON for example and read it to the user as required.

{
   "story": {
      "name": "Nice Story",
      "paragraph1": {
         "userID": 2366,
         "text": "One day I wrote a nice story"
      },
      "paragraph2": {
         ...
      },
      ...
   }
}

But probably with the paragraphs in an array! Similarly I could also store stories/users/paragraphs in Mongo etc.

So, to get to the Question

Simply put, there are three parts:

  1. Can Unity's FB.API (or any Facebook thing) be used to store information like I require?
  2. Would using a Node.js server be a more effective way to achieve my functionality?
  3. Is there another way?

Thanks in advance for your time!

2

2 Answers

0
votes
  1. No, the Facebook API is not a custom database where you can store your own stuff.
  2. A Node.js server would be "one" way to store data. For example, in a .json file, or in a MongoDB database, or whatever. That´s pretty opinionated though. You can use any server/technology you want.
  3. There are hundreds of other ways, a simple one would be Firebase.
0
votes

If you can pay around 5-10 bucks a month for a hosting site, most have an integrated database that you can use to store data.