How to learn more about how RStudio works

Are you trying to achieve something specific? Or are you just curious about how things work?

We should really have some better docs on the repo's wiki page showing what the major portions are and how they fit together. Here's a quick overview to help you start exploring:

  • RStudio is basically a client/server app.
  • The client is a Web app written using GWT. You'll see lots of Java in the repo; it's all transpiled to JavaScript.
  • The server is all C++, and makes heavy use of asynchronous and functional utilities supplied by Boost.
  • All of the communication between the client and server occurs via JSON-RPC. If you go to Help | Diagnostics | Request Log you'll see a neat visualization of the chatter between the client and server. Reading this will help you understand how the two pieces work together.
  • The piece that's the most interesting for you (probably) and offers the most opportunities for experimentation and extension is the R Session module, which binds to R itself by loading it as a shared library and wiring up callbacks. This module is called rsession and can be found in src/cpp/session.

Happy spelunking! We welcome PRs, questions, and the like. :slight_smile:

7 Likes