Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Backend Integration for Android Apps

Backend Integration for Android Apps

I spent a summer teaching Palestinian and Israeli kids Android programming. This was a lecture I gave on backend integration using Parse. http://meet.mit.edu/

Reynold Xin

July 01, 2012
Tweet

More Decks by Reynold Xin

Other Decks in Programming

Transcript

  1. “The Parse platform provides a complete backend solution for your

    mobile application. Our goal is to totally eliminate the need for writing server code or maintaining servers.”
  2. ParseObject (Java class) • Key concept in Parse • A

    “row” in the Parse backend database. • It is a Java class, and you can add fields to it. • To save it in the Parse backend, call “save”.
  3. public long createNote(String title, String body) { ContentValues initialValues =

    new ContentValues(); initialValues.put(KEY_TITLE, title); initialValues.put(KEY_BODY, body); return mDb.insert(DB_TABLE, null, initialValues); } public String createNote(String title, String body) { ParseObject note = new ParseObject("Note"); note.put(KEY_TITLE, title); note.put(KEY_BODY, body); note.save(); }
  4. How do you evaluate a technology? • Fit: Does it

    fit our business model and support our use case? • Skill: Are there developers already proficient in the new technology? Will there need to be training? Can it be easily picked up? • Cost: Is the technology worth the price?
  5. Cost Estimation • We will focus on Cost in this

    exercise. • Step 1: Estimate the demand on technology. • Step 2: Calculate the cost of the technology based on the demand.
  6. Estimate Demand • How many active users will we have?

    • What is the usage pattern? E.g. using it once a day for 5 mins. • How many requests do the app make every minute? • Example: For the notepad app, if we assume an average user uses the app twice a day (by showing the list, viewing 3 notes, and creating a new note), ~ 10 requests a day. For 1000 active users, that’s 10000 requests a day.
  7. Estimate Cost • Estimate the cost of Parse. • Estimate

    the cost of building our own backend.
  8. operations hardware software operations engineer: $100k/yr each engineer can support

    10 machines $5k/machine; each machine supports 50 requests/sec software engineer: $100k/yr