I'm strategizing the design of a kind of client/server "learning management system" to support a computational physics course. I want the student side to be entirely implemented in Mathematica, through a combination of custom notebook-based interfaces and package code I write. As students complete assignments (in custom notebooks) and submit them (by having the notebooks send appropriate data to the server), the back-end will verify and track their progress and send new assignments (new notebooks) as appropriate.
I'm wondering what the best back-end system would be. It'll need some kind of persistent database to track student progress; authentication of user identity; and logic to validate student activity and make decisions about what to send next. I would absolutely love to implement all that in Mathematica, so that the entire system would be Mathematica front-to-back, and the front-end bits could just call remote Mathematica functions on the server.
I'm imagining that perhaps the front-end bits can invoke remote Mathematica functions on a server (or in the Wolfram Cloud?), and perhaps those back-end bits can talk to a database (for user state tracking) and file store (to call up new files to send to the user). In other words, Mathematica would be playing the role of a web server, just like (say) Apache-plus-PHP or Rails or etc. Is this a reasonable, wise thing to do? Is Wolfram's new cloud stuff meant to support that kind of interaction?
It seems like the Wolfram Cloud might be promising, but I haven't been able to get my head around it successfully. The examples I've seen don't really speak to my kind of use case...
Thanks for any wisdom!
Update: To be more concrete, let's consider the following situation. The user (student) has downloaded a notebook I created that contains instructions (programming challenges) and cells in which to enter his/her responses (solutions to those challenges). It also has a big red "Test it!" button, and a docked status bar at the top. An initialization cell in the notebook loads an accompanying package (via URL from my server) providing code that runs a battery of unit-test-like checks on the user's responses when he/she clicks the "Test it!" button and provides diagnostic feedback, or hearty congratulations if everything passes all tests. It also updates the status bar with the current state of the notebook (incomplete, errors, all correct), and with the student's current status in the overall course (e.g., number of assignments completed and current point total) which is obtained via some kind of query to my server.
When the student runs the tests and everything passes, I'd like the notebook (via code contained in the initialization package it's loaded) to send that fact to my server, along with the student's authenticated identity and a serialization of the entire notebook for verification purposes. My server will note that this particular student passed this particular assignment, so that future status-bar queries report accordingly. Also, it will make the next assignment notebook available to be downloaded and attempted.
In addition, I need administrative tools (ideally in my own Mathematica notebooks, or alternatively via web browser) to monitor student progress.
I've already figured out how to do the local part: How to create notebooks and accompanying packages that automatically test student-entered code and provide diagnostic feedback, and set a fail/win flag in a docked status bar. What I don't know how to do is to have the notebook reliably report student progress information to a back-end server, how to safely store that information, and how to use it to make decisions about how to respond to future queries from the same user (via the same or another notebook).
Wolfram Cloud objects and data drops seem tempting, but I don't see any tools for organizing suites of them into larger systems, and I'm afraid that trying to develop and maintain a growing system of interacting Cloud functions, data drops, static files, etc. will be a nightmare. I guess I'm hoping there's a way to do something like Ruby on Rails, but with Mathematica…