Optimimal resources utilization for indexing within a distributed multimedia retrieval system: an implementation for a video surveillance use case