Git Product home page Git Product logo

Comments (5)

monnand avatar monnand commented on May 24, 2024

@patrickdappollonio Thank you so much for your report! I'm so glad to see more users of uniqush! Even though I don't know the name of your app, I wish you the best of luck and every success in your business.

Right now, uniqush only uses multicast mechanism when you explicitly specifies multiple receivers. When you specify receivers, you can separate them with comma, or you can use wild card to send to all users whose name with certain pattern. I think this might be something like what you are talking about.

Here is an example of sending notifications to user1 and user2:

curl http://127.0.0.1:9898/push -d service=myservice -d subscriber="user1,user2" -d msg="Hello World"

Or, another way of doing it is to use wild card. The following command will send message to all subscribers whose name starts with usr:

curl http://127.0.0.1:9898/push -d service=myservice -d subscriber=usr* -d msg="Hello World"

I think this will work with GCM without too much problem. However, for APNS, it might be tricky because APNS does not support multicast natively. According to #40, uniqush may use large amount of memory (>3.75G) when you try to send messages to more than 500K iOS users concurrently.

I will try to fix the OOM error in #40 so that both of you will benefit from the fix.

There might be some advanced technique to be used here to use multicast more aggressively: for each request that uniqush receives, it will wait for a short period of time in hopes of receiving another request with same content but different subscriber (and send theses two messages using GCM's multicast.) This is basically the same idea of Nagle's algorithm. However, I may not add this feature in the recent release.

Again, thanks for using uniqush! Please let me know if you have any questions!

from uniqush-push.

patrickdappollonio avatar patrickdappollonio commented on May 24, 2024

Thank you for your reply!

Currently, we're pushing notifications almost each day to more than 6 million active users. We're using the * wildcard to send those notifications and I thought that uniqush wasn't using the GCM option to pass 1000 suscribers each time and instead sending all notifications one-by-one (I thought that because the log that appears when you submit the notification goes one by one, silly me!)

So, I wasn't talking about the usage between my API and Uniqush local server, I was talking what happens under the hood when you send a notification to all users, if uniqush was smart enough to send those notifications from uniqush local server to GCM in batches of 1000 registration IDs.

Regarding memory consumption, when we send a notification to all our Android devices, uniqush uses around 2.3G of memory (my current RAM config is 2x RAM 8192 MB DDR3) and I never encountered any troubles like app being force-closed or memory issues even in large-scale.

from uniqush-push.

monnand avatar monnand commented on May 24, 2024

@patrickdappollonio I just briefly reviewed the code. Both of us are correct: Uniqush is using GCM's multicast when you use wild card; and it is producing one log entry per device.

Since each device may fail independently, a result of a multicast operation may contains both success and bad pushes. I chose an easy (and sort of consistent) way to produce the push result: One device will produce one log entry unless uniqush wants to resend the message (When the push service provider has a temporal error.)

(I didn't run the program to check if it actually used the multicast. But according to the code, it should --- unless some buggy code there. I will confirm this tomorrow by actually running the program.)

from uniqush-push.

patrickdappollonio avatar patrickdappollonio commented on May 24, 2024

Great! Thank you so much. Such a great piece of software. If you need beta testing, just tell me :D

from uniqush-push.

monnand avatar monnand commented on May 24, 2024

@patrickdappollonio You're welcome! I'm so glad to see that uniqush is used in such a large scale system.

from uniqush-push.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.