An initial thought on this:
You could wrap insert / update / delete operations to a specific collection(s) in an API of your own. Instead of using the regular HTTP POST, PUT/PATCH, DELETE routes that ArangoDB provides for documents, you can write your own routes inside ArangoDB. ArangoDB has a framework, Foxx, to do this.
For example, you may create your own insert route. Inside the route, you can execute any sort of JavaScript code. For example, here is a simple insert wrapper that justs inserts data into a collection mydata:
controller.post('/my-insert', function (req, res) {
var document = req.body();
try {
var result = db.mydata.save(doc);
// TODO: send off data to external server etc.
res.json(result); // send back result to original client
}
catch (err) {
// TODO: handle and report error
}
});
In the above example, data is stored in a local collection and the response is sent back to the client. However, you may execute extra JavaScript code after the save operation. So you may actually send data to another server from there.
You may do the same for the update and delete routes. This solution requires that all your operations use the custom routes, and you don't modify data using the regular document APIs. Using the regular APIs would still work of course, but won't fire off the custom actions.
The interesting questions are if you can accept the thread blocking on the "send to another server call" and what you would do if sending data to another server fails for whatever reason.