Multiple RESTful Web Service Calls vs. MySQL JOINs

I am currently constructing a RESTful web service using node.js for one of my current iPhone applications. At the moment, the system works as follows:

  • client makes requests to node.js server, server does appropriate computations and MySQL lookups, and returns data
  • client's reactor handles the response and updates the UI

One thing that I've been thinking about is the differences (in terms of performance and best practice) of making multiple API calls to my server vs one call which executes multiple join statements in the MySQL database and then returns a constructed object.

For example: Lets say I am loading a user profile to display in the UI. A user has a profile picture, basic info, and news feed items. Using option one I would do as follows:

  • Make a getUser request to the server, which would do a query in the DB like this:
    Select * from user join user_info on user.user_id=user_info.user_id left join user_profile_picture on user_profile_picture.user_id=user.user_id.
    The server would then return a constructed user object containing the info from each table
  • Client waits for a response for the server and updates everything at once

Option 2 would be:

  • Make 3 asynchronous requests to the server:
    • getUser
    • getUserInfo
    • getUserProfile
  • Whenever any of the requests are received, the UI is updated

So given these 2 options, I am wondering which would offer better scalability.

At the moment, I am thinking of going with option 2 for these reasons:

  1. Each of the async requests will be faster than the query in option a, therefore displaying something to the user faster
  2. I am also integrating Memecache and I feel that the 3 separate calls will be easier for caching specific results (e.g not caching a user profile, but caching user, user_info and user_profile_picture).

Any thoughts or experiences?