No error returned by CreateOrUpdateInstallationAsync when registering installation manually removed in Visual Studio but it doesn't register RRS feed

  • Question

  • Hi there,

    I'm doing registration of client device app via an api call to my .Net backend server which is then using CreateOrUpdateInstallationAsync to add/update an installation(s) for iOS, Android and Windows and all works well. But I noticed that if I use the Server Explorer in Visual Studio to view registrations and manually delete one, this installation is unable to be re-registered again (which might be as intended?) but .. when a re-registration is attempted by a later call to CreateOrUpdateInstalltionAsync no error or exception is returned, instead it returns with success but the registration is not actioned - i.e. it does not re-show in Server Explorer and no pushes are sent. Any ideas why either it doesn't re-register but more importantly why it returns with success if one is attempted?



    Monday, June 13, 2016 7:38 PM


  • Hi,

    For compatibility reasons as of right now Installations are stored as Registrations internally. It is why Visual Studio still shows registrations. But we highly don't recommend to anyhow change/create/delete any registrations which represent Installations, because it may brake consistency of Installation objects resulting our system is not able to apply CRUD operations on those broken objects anymore.

    Consistency can be easily broken if templates are used. For installation containing templates, notification hub internally stores number_of_templates + 1 registrations. So if you removed one of those registrations, then consistency is broken. From other hand Installation API is eventually consistent. When it gets CreateOrUpdateInstalltion call from customer it validates one, sets into the system queue, and returns success to customer. Because validation has passed successfully and operation is durable persisted in the queue, we guarantee that it will be applied (we do retry if storage is temporarily down etc.). But unfortunately, if Installation object was manually broken, then our worker just gives up :(

    We are slowly moving to Installation API giving our customers an opportunity to migrate without rush an provide use with as much feedback as possible. At some point all new hubs will be only able to use Installation API. Then we will store installations naively providing much better  experience.



    Monday, June 13, 2016 9:41 PM