Template-based approach to structuring distributed algorithms using a network of workstations