real-time stream processing and operations on files in distributed stored procedures

These two days are dealing with files, very interesting, every step will not be satisfactory, but each step of the solution has benefits, first.