Sponsored Content
The Lounge What is on Your Mind? PubNub Live Chat Beta Testing Post 303034868 by Neo on Wednesday 8th of May 2019 11:12:18 AM
Old 05-08-2019
No Craig,

We are not calling hereNow every 300 ms.

LOL The function in updated() does not even fire, as I described. I don't think you fully understand how Vue.js lifecycle hooks or the JavaScript debounce() function works.

The updated() lifecycle hook in Vue.js only fires when there is a Vue.js event. In this code, that means it on fires on the events I described above.

Even when update() fires, the debounce() function does not fire because it fires only on the trailing edge of 300 ms and that function does not exist (the instance) because the update() lifecycle hook has already exited.

As I said above, that line of code does NOTHING. And in the current version running, it is commented out, since it does nothing.

Regarding PUBNUB.

Frankly, I feel in your replies that you may not fully understand your own API. Perhaps you have not actually every analyzed the XHR calls in DevTools looking at the code under various conditions? It seems you are advsing me from theory (from reading the API docs), not practice (coding and doing the analysis of the XHR calls).

Your API polls presence interval is based on subscribe() (presence set to TRUE). That is not the same as from the pubnub listener. It does not set the presence polling interval.

Yes, the listener listens but the polling is fired every second based in the client when presence is set to TRUE in subscribe.

I have already analyzed these API calls in Chrome Dev tools and it's easy to see what is going on,

You seem to not understand that your API polls presence every second (when it is set in subscribe to TRUE) and there is no way to set that interval in your API.

This generates 100s of thousands of useless transactions because every subscriber is polling the pubnub network every second or so when the subscribe presence TRUE.

I have been over this very carefully in Chome DevTools watching how each flag effects the XHR calls.

Then, again, I could be wrong, LOL... but I have been over this very carefully in Chrome DevTools many times for hours.
 

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
chatwidget(n)					      Composite widget for chat applications					     chatwidget(n)

__________________________________________________________________________________________________________________________________________________

NAME
chatwidget - Provides a multi-paned view suitable for display of chat room or irc channel information SYNOPSIS
package require Tk 8.5 package require chatwidget ?1.0.0? ::chatwidget::chatwidget path ?options? $widget topic command args $widget name nick args $widget message text args $widget hook command args $widget names args $widget entry args $widget chat args _________________________________________________________________ DESCRIPTION
This is a composite widget designed to simplify the construction of chat applications. The widget contains display areas for chat messages, user names and topic and an entry area. It automatically handles colourization of messages per nick and manages nick completion. A system of hooks permit the application author to adjust display features. The main chat display area may be split for use displaying history or for searching. The widget is made up of a number of text widget and panedwindow widgets so that the size of each part of the display may be adjusted by the user. All the text widgets may be accessed via widget passthrough commands if fine adjustment is required. The topic and names sections can also be hidden if desired. COMMANDS
::chatwidget::chatwidget path ?options? Create a new chatwidget using the Tk window id path. Any options provided are currently passed directly to the main chat text wid- get. WIDGET COMMANDS
$widget topic command args The chat widget can display a topic string, for instance the topic or name given to a multi-user chatroom or irc channel. show Enable display of the topic. hide Disable display of the topic set topic Set the topic text to topic. $widget name nick args Control the names and tags associated with names. list ?-full? Returns a list of all the user names from the names view. If ?-full? is given then the list returned is a list of lists where each sublist is made up of the nick followed by any options that have been set on this nick entry. This may be used to exam- ine any application specific options that may be applied to a nick when using the add command. add nick ?options? delete nick $widget message text args Add messages to the display. options are -nick, -time, -type, -mark -tags $widget hook command args Manage hooks. add (message, post names_group, names_nick, chatstate), remove, run $widget names args Passthrough to the name display text widget. See the text widget manual for all available commands. The chatwidget provides two additional commands show and hide which are used to control the display of this element in the widget. $widget entry args Passthrough to the entry text widget. See the text widget manual for all available commands. $widget chat args Passthrough to the chat text widget. See the text widget manual for all available commands. EXAMPLE
chatwidget::chatwidget .chat proc speak {w msg} {$w message $msg -nick user} pack .chat -side top -fill both -expand 1 A more extensive example is available by examining the code for the picoirc program in the tclapps repository which ties the tcllib picoirc package to this chatwidget package to create a simple irc client. SEE ALSO
text(n) KEYWORDS
chat, chatwidget, composite widget, irc, mega-widget, widget chatwidget 1.0.0 chatwidget(n)
All times are GMT -4. The time now is 06:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy