Creating a plugin with autoupdate features.

I was wondering if anyone knew how to make a custom plugin to check for updates and how that it is done. also to point to a zip file that has the update and for it to go through the install process. This will start out as a private plugin so I will not be using

Thank you.