implemented add_provider; handle read/write requests in worker thread