distributed
distributed copied to clipboard
Other Storage Options
It would be great if we could configure this to use a different storage mechanism that I can run within the network, rather than a cloud hosted one. Many organizations have policies against "unapproved" cloud solutions.
This would be nice but right now the app is totally reliable on firebase. In order to accomplish other storage options we would have to basically rewrite the whole app from scratch. We would have to implement also real time behaviour using socket.io or something similar because firebase gives you that for free.
One option would be start a fork that implements another storage like http://feathersjs.com/, http://gun.js.org/ or http://parse.com (that now it's open source).
It would be helpful to abstract all database calls so that we could add our own custom data stores for implementations. Personally, I would probably go the DynamoDB route for what I am working on: http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB.html
nice articles https://blog.feathersjs.com/using-feathersjs-as-an-open-source-alternative-to-firebase-b5d93c200cee#.ibcmaz1pi https://medium.com/front-end-hacking/react-webpack-and-horizon-quick-start-b9335c1ece53#.bumdyorla
FeathersJS sounds promising. Have you tried plugging it in yet?
@chapmanjw I didn't try to change the storage yet. And I am not sure I will have time for that in the near future. But if anyone else wants to try it I would really appreciate it.
@glauberramos what Firebase alternative do you think would be the easiest to integrate into Fun Retro right now? Would the whole app actually need to be rewritten? I only see Firebase references here - https://github.com/funretro/distributed/blob/master/js/services/firebaseService.js .
I think a lot of code would have to be changed in order to support a new integration. Do you have anything in mind @obv-mikhail ? Maybe not a lot, but's it's not very easy task.
@glauberramos I started some work on a Gun port. There would be a need for a custom authorization solution though as Gun doesn't have ACLs like Firebase. Right now, I am thinking of using Gun as a centralized database - not as a p2p database. I haven't decided on anything in terms of authentication yet (idk if Saml or OAuth would work in this context).
All code specific to db interactions could be abstracted into a new service module so that Firebase specific types aren't used in all source files. Same thing could be done with authentication.
I will report back if I get anywhere.
I think it's fine if it's centralised, it would be nice to have an option where people can install the database locally instead of using on the cloud like firebase.
@obv-mikhail check out my fork https://github.com/waninlezu/distributed https://github.com/waninlezu/funretro-feathers-nedb http://waninlezu.github.io/distributed
@waninlezu nice! I was able to port funretro to use Gun like I mentioned in the previous comment, and got authentication working through GitHub. The problem I faced with Gun was with setting up ACLs of any kind. ACLs should probably be simpler with feathers.