mkowoods / FeedMyFriends

7 stars 2 forks source link

TODO: Back-end Implementation #1

Open DevMoore94 opened 9 years ago

DevMoore94 commented 9 years ago

What kind of back-end we're you thinking of using? I know Heroku has quite a few options available. NOSQL could also be a route to take. I enjoyed using Redis for TextThem as the whole key,value system was very easy to implement.

mkowoods commented 9 years ago

I was still trying to decide on that I built a custom back end using google app engine you can check it out, but i might go on to develop it more so it's probably not considered stable.

Command to create a record: http://mw-key-val-dev.appspot.com/api?action=create&db=dev&rec_class=demo&store_key=[enter_some_random_key]&store_val=arandomstring

Command to read a record http://mw-key-val-dev.appspot.com/api?action=read&db=dev&rec_class=demo&store_key=[enter_some_random_key]

I need to set up the app on Heroku and then connect the Redis DB.

I think that's good idea and i have some experience working on it with your project ;)

I'll set it up later today and update the Repo.

DevMoore94 commented 9 years ago

Sounds good :) I am creating a python script that acts as an interface for redis. Allowing you to easily add entries and delete them and retrieve them. I will create a repo for it here in a couple mins. You could use that to add entries if interested :)

mkowoods commented 9 years ago

Random question... Are you aware of any good database designs/schemas for social applications?

DevMoore94 commented 9 years ago

Not off the top of my head no. Database design was never my strong point.

DevMoore94 commented 9 years ago

I have committed my Redis Interface tool https://github.com/DevMoore94/Redis_Interface

mkowoods commented 9 years ago

i went ahead and put the app on heroku and setup redis.

DevMoore94 commented 9 years ago

No problems deploying it ? :)

mkowoods commented 9 years ago

It was my first time so there was the usual pain points of picking up a new tech, but I was able to get it up and running pretty easily. Going to spend some time finishing the application this weekend. I had been focusing on my other project, which I got in a really good place. I need to redeploy to Github.

I'm thinking of calling it CouchGAE... What do you think?

DevMoore94 commented 9 years ago

Sounds good to me! :) and Yeah heroku is picky about how the files are stored and the links to them and making sure you have the right requirements and procfile.

syntonym commented 9 years ago

Is redis realy a good choice for this? Although I never used redis I always thought of it of a 'simple' key-content database, "just like storing JSON", without any prebuild relationship modelling. It looks for me that we have quite some relationships here for example user:password, user:groups, user:links, and some of these are probably many:many relationships. I would prefer a SQL database for that. What do you think/what were your reasons to choose redis?

mkowoods commented 9 years ago

I'm using Redis just to prototype I wasnt going to setup users initially, but just have a stream of content. I was planning on storing each link with a "linkid" and then mange relationships with keys that store lists of data about relationships. Here are some interesting ideas for redis with relationships

http://blog.pivotal.io/pivotal/case-studies-2/using-redis-at-pinterest-for-billions-of-relationships

http://stackoverflow.com/questions/10907942/how-to-have-relations-many-to-many-in-redis