My application receives HTTP POST requests with XML data.
Currently, my controller reads these requests and stores the raw XML in a table in the database (to be sure), but they also need to be parsed.
Since I don't want to keep the sender's computer waiting for too long, I want to send a response and then parse the file.
I see two options:
- Do the parsing in a separate console script, which I invoke using exec()
- Use the afterAction event in my controller.
afterAction seems cleaner to me, but I have no idea how/where to implement it. Any suggestions?