First I recommend you to check the MRAA documentation and the C/C++ API where you will find a description of the functions for SPI:
You won't be able to send an acknowledgement in parallel because SPI is a serial protocol. This means that you will have to send the acknowledgment once the Master has received the data from the Slave. It would interrupt the data transmission just for a moment while the acknowledgment is received by the Slave.
The process of sending data should be something like the following:
- Master requests data from Slave.
- Slave receives the request.
- Slave starts sending data.
- Master receives the data from Slave.
- Master sends an acknowledgment after checking the data received.
- Slave receives the acknowledgment.
- Slave starts sending data again and the process is repeated.
You will find in the links above all the information required to write the script. Basically you have to use the transfer method to transfer data between Master and Slave.