Sponsored Content
The Lounge What is on Your Mind? PubNub Live Chat Beta Testing Post 303034869 by pubnubcraig on Wednesday 8th of May 2019 11:32:29 AM
Old 05-08-2019
Neo -

I just ran the chat app (should have done that first) and I see what is causing the every 10s transaction. Your Presence add-on has a Presence Interval of 10s (that is the default) and you set your Announce Max property to 1, that's 1 channel occupant (20 is the default). So PubNub is sending an update every 10s.

Announce Max
Once the number of occupants reaches this number, join, leave and timeout events are no longer sent as realtime presence events to those listening (subscribed withPresence:true). Instead, PubNub Network will send an occupancy count every 10s (or whatever the value is for the Interval property). If you want to know who join, leave, timeout since the last interval update, you need to enable Presence Deltas.

My recommendation: set Announce Max back to 20. A different number may be better, but that should suffice for now. Rarely is this value ever changed for most apps. I took the liberty of updating this property to 20 to prevent your account from accumulating needless transactions. They were not benefitting your app in the slightest anyways. You would need to enable Presence Deltas for that Announce Max = 1 setting to be useful and then you would have to handle the presence delta event payload in your client app, which I don't think you are doing at the moment. You can set this back to 1 if you feel that is what you need.

Let's schedule time for a PubNub overview session and I can give you all the ins and outs, gotchas, best practices and how it works under the covers so you can make the best informed decisions with your implementation. I know I can save you hours of frustration and you'll appreciate how this all works much more.

Cheers
Craig

--- Post updated at 03:32 PM ---

Tim - I understand our APIs quite well. Your app, not so much, admittedly. Not a Vue expert. See my last post.
This User Gave Thanks to pubnubcraig For This Post:
 

4 More Discussions You Might Find Interesting

1. Solaris

Live Chat For Solaris?

Does anyone know of any online live chat discussion groups for Solaris? If so, please let me know... Thanks! Rob Sandifer (3 Replies)
Discussion started by: RobSand
3 Replies

2. What is on Your Mind?

A Quick Video Overview of PubNub Live Chat @UNIX.com (version 0.7614)

A number of people have asked me to make some videos, so I just got my first condenser microphone and so I can make some amateurish screen casts. I will try to do better in the future. A quick overview of PubNub Live Chat @unix.com The video is best is you set the Quality to HD 1080. The... (0 Replies)
Discussion started by: Neo
0 Replies

3. What is on Your Mind?

Live Chat (Alpha) in UserCP SF 0.7517

Interesting.... I am still working on the kinks for Live Chat here at unix.com using a publish-subscribe API from PubNub. Two days ago while working on it, a new user joined the live chat and asked about how to post a new thread in the forum. Then today, one of the members of the PubNub team... (23 Replies)
Discussion started by: Neo
23 Replies

4. What is on Your Mind?

Update: UserCP Screeching Frog 0.7641 - Changed Live Chat to Live Updates

Update: UserCP Screeching Frog 0.7641 - Changed Live Chat to Live Updates In this version of the UserCP, I have changed "Live Chat" to "Live Updates" by disabling the ability to post in the "live chat" area and changed the name to "Live Updates" The reason for this change is that experienced... (6 Replies)
Discussion started by: Neo
6 Replies
pmqtest(8)																pmqtest(8)

NAME
pmqtest - Start pairs of threads and measure the latency of interprocess communication with POSIX messages queues SYNTAX
pmqtest [-a|-a PROC] [-b USEC] [-d DIST] [-i INTV] [-l loops] [-p PRIO] [-S] [-t|-t NUM] [-T TO] DESCRIPTION
The program pmqtest starts pairs of threads that are synchronized via mq_send/mw_receive() and measures the latency between sending and receiving the message. OPTIONS
-a, --affinity[=PROC] Run on procesor number PROC. If PROC is not specified, run on current processor. -b, --breaktrace=USEC Send break trace command when latency > USEC. This is a debugging option to control the latency tracer in the realtime preemption patch. It is useful to track down unexpected large latencies of a system. -d, --distance=DIST Set the distance of thread intervals in microseconds (default is 500 us). When pmqtest is called with the -t option and more than one thread is created, then this distance value is added to the interval of the threads: Interval(thread N) = Interval(thread N-1) + DIST -f, --forcetimeout=TO Set an artificial delay of the send function to force timeout of the receiver, requires the -T option -i, --interval=INTV Set the base interval of the thread(s) in microseconds (default is 1000 us). This sets the interval of the first thread. See also -d. -l, --loops=LOOPS Set the number of loops. The default is 0 (endless). This option is useful for automated tests with a given number of test cycles. pmqtest is stopped once the number of timer intervals has been reached. -p, --prio=PRIO Set the priority of the process. -S, --smp Test mode for symmetric multi-processing, implies -a and -t and uses the same priority on all threads. -t, --threads[=NUM] Set the number of test threads (default is 1, if this option is not given). If NUM is specified, create NUM test threads. If NUM is not specifed, NUM is set to the number of available CPUs. -T, --timeout=TO Use mq_timedreceive() instead of mq_receive() and specify timeout TO in seconds. EXAMPLES
The following example was running on an 8-way processor: # pmqtest -Sp99 -i100 -d0 #0: ID10047, P99, CPU0, I100; #1: ID10048, P99, CPU0, Cycles 153695 #2: ID10049, P99, CPU1, I100; #3: ID10050, P99, CPU1, Cycles 154211 #4: ID10051, P99, CPU2, I100; #5: ID10052, P99, CPU2, Cycles 156823 #6: ID10053, P99, CPU3, I100; #7: ID10054, P99, CPU3, Cycles 158202 #8: ID10055, P99, CPU4, I100; #9: ID10056, P99, CPU4, Cycles 153399 #10: ID10057, P99, CPU5, I100; #11: ID10058, P99, CPU5, Cycles 153992 #12: ID10059, P99, CPU6, I100; #13: ID10060, P99, CPU6, Cycles 156576 #14: ID10061, P99, CPU7, I100; #15: ID10062, P99, CPU7, Cycles 157957 #1 -> #0, Min 1, Cur 8, Avg 5, Max 18 #3 -> #2, Min 1, Cur 4, Avg 5, Max 18 #5 -> #4, Min 1, Cur 5, Avg 5, Max 19 #7 -> #6, Min 1, Cur 4, Avg 4, Max 17 #9 -> #8, Min 1, Cur 9, Avg 5, Max 18 #11 -> #10, Min 1, Cur 8, Avg 5, Max 18 #13 -> #12, Min 1, Cur 4, Avg 5, Max 29 #15 -> #14, Min 1, Cur 8, Avg 4, Max 17 AUTHORS
Carsten Emde <C.Emde@osadl.org> SEE ALSO
mq_send(3p), mq_receive(3p) 0.1 pmqtest(8)
All times are GMT -4. The time now is 04:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy