5

I'm trying to create a back-end in which I can have many users communicate with each other amongst an iPhone app I'm creating. I've tried working with Core Data, Google App Engine, Google Cloud Storage, and Amazon Web Services (RDS & Elastic Beanstalk). Unfortunately, after weeks of trying to get any of this working, none of it will!

I've been trying to get in touch with someone who would know how startups (when they were little) like Instagram, Path, and Pinterest have managed to do this. But everyone out there seems to despise this stuff as much as I'm growing to...

I would love for someone to simply map out EXACTLY how I need to create a back-end database that I can save and query data to and from that many users can see. That means that just SQLite, Core Data, or Parse by itself isn't going to work here!

A tutorial of some kind would be incredible.

bryanmac
  • 38,941
  • 11
  • 91
  • 99
jakenberg
  • 2,125
  • 20
  • 38

1 Answers1

7

First off, technologies like CoreData and sqlite are typically local device storage. Local device storage is not going to get you shared cloud storage.

Parse.com is a fast way for devices to access cloud storage and get going fast. Especially useful for games and other mobile apps to access cloud data via an app id and app key. It's simple storage to avoid creating your own backend if it fills all your needs and requirements.

When you get to a multi-tenant cloud backend where you roll your own services and multiple devices accessing your cloud application you need to look into exposing your web API. Exposing RESTful API over http is great for devices and web clients. Exposing the data as JSON is especially conventient for the web and easily consumed by devices.

Those web service end points in the cloud access some sort of backend storage which is optimized for concurrent access by mutliple clients. This is typically a SQL backend like MySQL, SQLServer etc... or a NoSQL solution like mongodb, couchDB, etc...

Some front end web api technologies to look into:

Some back end storage technologies to look into:

If the data is used by many many multi-tenant clients, the backends can scaled up (larger and larger) or get sharded. Sharding is where the data for multiple users is split into many databases or datastores with some sort of lookup algorithm for requests to find where that users data is stored. The front end web api servers abstract the backend storage.

Finally, you'll end up needing some sort of caching/fast lookup technology (if you're successful :):

  • Redis: fast in memory storage over sockets
  • memcached: facebook uses - simple key value in memory caching across many front end servers.

Your question is an open ended up broad question so start by googling many of these terms and technologies.

Each of these links will have resources and tutorials. Get a cloud VM, play with each and decide which fits your needs best. There is no one size fits all solution.

bryanmac
  • 38,941
  • 11
  • 91
  • 99
  • 1
    You make this sound like it's going to take a team of 10 engineers to pull it off :D – jakenberg Jan 17 '13 at 04:09
  • I'm listing all the technololgies to look into. If you have a simple app, then one engineer can pull it off with your technologies of choice. If you have complex requirements and high scale, then, yes, a complex backend can take many engineers to pull off and maintain. It's a function of your requirments and scale, not your tech choice necessarily. – bryanmac Jan 17 '13 at 04:13
  • Of course. I understand what you've said, but it just doesn't seem like it needs to require so many technologies at once just to get a simple query from iPhone to database. What I'm trying to do is the equivalent of an early-stage Twitter iOS app. – jakenberg Jan 17 '13 at 04:15
  • It doesn't require all the techs. If you roll your own, pick a front end and back end tech. For example, you mentioned twitter, I think they started with Rails and MySql, then I think casandra, then Java for backend storage etc... – bryanmac Jan 17 '13 at 04:19
  • If you pick a combo like asp.net, SQL and azure, you can get off the ground quickly. Or combos like Node.js and mongodb - off the ground quickly. You don't need all these techs. Search for tutorials on these backend techs. – bryanmac Jan 17 '13 at 04:20
  • I know it doesn't require all. From what you've just said, I'm probably going to go look at Node.js and mongoDB because I've heard that they go well together. What I'm saying is that it seems crazy to have to learn two more technologies other than iOS in general just to do something that doesn't seem like it should require so much more learning just to do. What did Instagram start with? AWS? – jakenberg Jan 17 '13 at 04:22
  • OK - good combo. In that case, ensure you look into express. here's a relevant tutorial for that combi: http://howtonode.org/express-mongodb – bryanmac Jan 17 '13 at 04:26
  • other node pointers: forever, node-validator, supervisor on dev box to restart on edit. Look @ npmjs.org for others. – bryanmac Jan 17 '13 at 04:39
  • @jsksma2 - look at the update at the bottom of this post. It's a full sample using node.js using parse.com as a backend. http://stackoverflow.com/questions/9577611/http-get-request-in-node-js-express/9577651#9577651 – bryanmac Jan 17 '13 at 13:48
  • I know you wrote this a while ago. But I seriously cannot thank you enough. MongoDB & node.js together kick ass! – jakenberg Jan 29 '13 at 04:32