Imagine an architecture like this: a Smartphone sends a single data set to a Database, which will be connected to a Web Server. My algorithm is on the Web Server processing all the data sets available in the Database, one at a time, in an offline fashion (no real-time performance needed). The algorithm is written in PHP. Once the algorithm on the Web Server has done all the processing, it returns the results to the former Smartphone/Database.