Working on an ecommerce project whereby a PHP application (back-end & non-customer facing) is currently responsible for processing an order from checkout stage through to generating profit/loss reports, processing the order and also performing various algorithms on behalf of a data science team.
The algorithmic components will be extracted out to a separate application (python). PHP will be sending a json payload via curl through to a python application end-point / passing the payload over to a beanstalk queue or similar. However there is mixed opinion relating to which application is responsible for what.
The python developer wishes for the PHP dev to prepare and send over a large payload (qty, order value, user demographics etc.). Basically everything that the python developer requires in order to perform their algorithms.
The Php developer believes that all the python service requires is the order_id and from this, it can mine all the information it needs to run whatever algorithms it requires from the database. The php developer further argues, that if it is doing all the preparation of the data, then it may as well run the algorithms too as the passing responsibility to the service becomes redundant as much of the work has already been done.
Is there a right or wrong choice? could somebody provide any decent arguments for both sides to consider? Could anybody recommend any resources to assist in understanding of "internal" service oriented architecture?