choose default middleware implementation from available ones