<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/4.6.4">
</HEAD>
<BODY>
On Fri, 2013-09-27 at 09:49 +0200, Sebastien Blanc wrote:
<BLOCKQUOTE TYPE=CITE>
    On Fri, Sep 27, 2013 at 9:12 AM, Apostolos Emmanouilidis &lt;<A HREF="mailto:aemmanou@redhat.com">aemmanou@redhat.com</A>&gt; wrote:<BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        I received some feedback for the aerogear-unifiedpush-server. <BR>
        <BR>
        The case is:<BR>
        <BR>
        Company X would like to create a personalized push notifications campaign for Y hundred thousands customers/clients. Personalized means that each client/device should receive a unique message. The messages are automatically produced from rules defined in a CRM system, but this is something which doesn't affect our implementation.<BR>
        <BR>
        Currently, our selective send method is able to send one message to a selected list of clients. In cases like the above one, this translates into Y hundred thousands calls of the aerogear-unifiedpush-server selective send method. The question is whether we could change the signature of the selective send method and allow to pass an array of messages or not. <BR>
        <BR>
        In my understanding, the advantages/disadvantages of a such change are similar to the advantages/disadvantages of a service according its level of granularity.<BR>
        <BR>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    This is indeed an interesting use case ! And as you said we should really consider the impact of sending an huge message ( + UPS refactoring) Vs Sending hundred thousands messages.&nbsp;
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    But considering &quot;the big send&quot; option and thinking aloud, even if it the messages are&nbsp;personalized, probably most of the message will be identical with just some&nbsp;variables&nbsp;changing. We could have a message template, and the map of clients (alias in UPS terminology) would contain values for variables, pseudo code :&nbsp;
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    {&quot;message&quot;:&quot;You won &lt;amount&gt; with this &lt;stock&gt;&quot;,&quot;alias&quot;:{[&quot;bob&quot;:{&quot;amount&quot;=50,&quot;stock&quot;=&quot;Shell&quot;} ,&nbsp;&quot;john&quot;:{&quot;amount&quot;=120,&quot;stock&quot;=&quot;Esso&quot;}]}
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    This will limit the size of the &quot;big send&quot; but implies some logic processing on the UPS side which is maybe not the best idea (even if this templating is generic and not related to any business logic).&nbsp;
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        <BR>
        <B>Fine Grained</B><BR>
        + simplicity and less business logic on server side<BR>
        + less amount of data exchanged between client/server<BR>
        - a lot of interactions between client/server<BR>
        - more interactions = more network overhead<BR>
        - complex client side
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    Why ?&nbsp; <BR>
</BLOCKQUOTE>
If the question goes to the &quot;complex client side&quot; point, I guess that a more sophisticated solution is required on the client side than creating a loop and &quot;firing&quot; the ag-ups :)<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        <BR>
        <B>Coarse Grained</B><BR>
        + less interactions between client/server <BR>
        + less network overhead &amp; possibility of re-using the same network connection to send messages to the Push Networks (at least for APN)<BR>
        + simple client side<BR>
        - much data exchanged in each interaction between client/server<BR>
        - complex server side
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BLOCKQUOTE>
        <BR>
        _______________________________________________<BR>
        aerogear-dev mailing list<BR>
        <A HREF="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</A><BR>
        <A HREF="https://lists.jboss.org/mailman/listinfo/aerogear-dev">https://lists.jboss.org/mailman/listinfo/aerogear-dev</A>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
    <BR>
    <BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<PRE>
_______________________________________________
aerogear-dev mailing list
<A HREF="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</A>
<A HREF="https://lists.jboss.org/mailman/listinfo/aerogear-dev">https://lists.jboss.org/mailman/listinfo/aerogear-dev</A>
</PRE>
</BLOCKQUOTE>
<BR>
</BODY>
</HTML>