detect if an installation exists for a specified alias

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

detect if an installation exists for a specified alias

tomf67
Greetings,

i have for my work the following need : i want to send a push notification to one user specified by its alias, but i need to know before or while sending if the alias is registered in aerogear (as i might then decide to use another channel of communication)

I didn't find an adequate way to do this, the only way seems to use the API
<a href="https://SERVER:PORT/CONTEXT/rest/applications/variantID/installations/">https://SERVER:PORT/CONTEXT/rest/applications/variantID/installations/ and specifiy the search parameter, but as the implementation uses many "like" it seems not performant enough to be done systematically.

Is this doable in Aerogear ?

Regards,

Tom
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] detect if an installation exists for a specified alias

Summers Pittman


On Wed, Feb 1, 2017 at 3:49 PM, tomf67 <[hidden email]> wrote:
Greetings,

i have for my work the following need : i want to send a push notification
to one user specified by its alias, but i need to know before or while
sending if the alias is registered in aerogear (as i might then decide to
use another channel of communication)

I didn't find an adequate way to do this, the only way seems to use the API
https://SERVER:PORT/CONTEXT/rest/applications/variantID/installations/ and
specifiy the search parameter, but as the implementation uses many "like" it
seems not performant enough to be done systematically.

Is this doable in Aerogear ?


There isn't a specific API for searching for installations by variant and alias.  (Matzew can double check me on this if I am wrong).  

Your options are 
   1) Give it a shot and see if it is too slow.  If you can live with the performance then there really isn't any need to do anything.
   2) Implement the exact query you want in an external application and work with that.  I'm not sure what the caching situation in UPS is so that may make this not ideal.  
   3) Fork UPS and Implement the query inside of UPS.  Bonus points, send us a PR back.
   4) File a JIRA and we'll work on it.

How many variants are you expecting to have and how often will you run this query?  

Also, I'm curious, why do you want to know is an alias is registered?  There may be another/better workaround for your use case I haven't thought of.

 
Regards,

Tom



--
View this message in context: http://aerogear-users.1116366.n5.nabble.com/detect-if-an-installation-exists-for-a-specified-alias-tp1053.html
Sent from the aerogear-users mailing list archive at Nabble.com.
_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users


_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] detect if an installation exists for a specified alias

tomf67
Hi,

thanks for the quick reply. To explain more clearly my use case : my company has an existing system emitting email or SMS to customers triggered by some server side events. Now the idea is to add push notifications to this system through rest api calls, and make it the preferred channel of communication. Of course, as not all the customers have a smartphone, the system must decide for each customer if it must send a push, or go with the other channels.

Ideally i don't want to keep the knowledge of the customer having a mobile app in my system, and i'd rather:
- ask aerogear before calling the api to send a push
- or let aerogear tell me when i send a push if there are receivers or not

Now it's the ideas that crossed my minds, but perhaps i have it wrong ...

regards,
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] detect if an installation exists for a specified alias

Matthias Wessendorf
nah, that's not possible w/ the UPS.

that has to be implemented by your own system ;-)

On Wed, Feb 1, 2017 at 11:00 PM, tomf67 <[hidden email]> wrote:
Hi,

thanks for the quick reply. To explain more clearly my use case : my company
has an existing system emitting email or SMS to customers triggered by some
server side events. Now the idea is to add push notifications to this system
through rest api calls, and make it the preferred channel of communication.
Of course, as not all the customers have a smartphone, the system must
decide for each customer if it must send a push, or go with the other
channels.

Ideally i don't want to keep the knowledge of the customer having a mobile
app in my system, and i'd rather:
- ask aerogear before calling the api to send a push
- or let aerogear tell me when i send a push if there are receivers or not

Now it's the ideas that crossed my minds, but perhaps i have it wrong ...

regards,



--
View this message in context: http://aerogear-users.1116366.n5.nabble.com/detect-if-an-installation-exists-for-a-specified-alias-tp1053p1055.html
Sent from the aerogear-users mailing list archive at Nabble.com.
_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users



--

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Loading...