Numerical Analysis in PHP on a Web Server

matteo diana's picture

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.

That said, my algorithm involves interpolations, integrations and Kalman filters in order to return some results. I am developing the server side software in PHP and now I really need a way to perform mathematical computations in a less time consuming and more efficient way (maybe Scilab?), than building each single math function I need on my own in PHP.

The question is, what Open Source software for mathematical analysis would you recommend me to use in order to link it to PHP ?

Hope I've been clear enough about something that indeed I am still a bit confused of.

Gabor Paller's picture

I would try to use Sage ( Sage is built around a simple idea: it integrates a set of popular mathematical libraries (e.g. numpy, scipy) under a Python runtime. I have never tried it on the server side. You can surely integrate Sage with your PHP script but I am not sure about the scalability (i.e. how many parallel requests you can serve with this solution).