In Android push notification is handled by Google c2dm servers and same for iphone(Apple Servers) and Windows(MPNS). You have to register your app to all three services separately to enable push notification in your app. So while registering user you should send the the information which phone user is currently using to your server and save it in user table and then you have to call remote methods to appropriate servers for sending push notification to particular user.
Unwired Nation and RhoMobile also have solutions if your product is more B2B focused. RhoMobile has a Ruby SDK and Unwired offers an XML API with basic user registration. Unwired Nation's package also includes a basic 2way messaging UI for iOS, Android, and Windows Phone.
@Raspu BTW, thanks for pointing out pushd, looks cool!
- Disclaimer: I built the Push-Composer equivalent for the Unwired Nation solution.