Live Chat (Alpha) in UserCP SF 0.7517


Trivia Category: Science: Computers
Difficulty: Medium
It's not possible to format a write-protected DVD-R Hard Disk.
True or False?
Login or Register for Dates, Times and to Reply

 
Thread Tools Search this Thread
# 1  
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 found our Live Chat link (a surprise to me) and updated the status of a support ticket we have open with them:

Image

The system is starting to work; however, there are things to do:
  • Debug why the live chat page often needs a reload to render in the browser.
  • Debug why the vue.js PubNub API is buggy and presence works but intermediately.
  • Add "who is in live chat" and other features as I debug.


Basically, it works but not as it should to be very usable.

I think the way ahead is to comment out the vue-pubnub API and use the standard PubNub SDK. The only way I was able to get chat history to work was to bypass the PubNub vue.js API and use the plain Javascript SDK API.

Thanks to PubNub for their support. Working with their tech support team has been helpful, for sure. Also, their team has been following up and has taken a interest in our project, which is nice of them.
These 2 Users Gave Thanks to Neo For This Post:
# 2  
Update: SF version: 0.7519
  • Solved the presence bug which gives a total number of people in the chat. Solved this by moving off the vue-pubnub wrapper and moved to the core PubNub Javascript SDK.
  • Created a "Joined Chat" message when users join chats and created a status message for when a user times out or leaves cleanly, but since no one cleans cleanly (when I debug) I need to find a way to trap all the "unclean exits".
  • Fixed some bug in setting chat users names for guests, but then created another bug for members with user names Smilie
These 2 Users Gave Thanks to Neo For This Post:
# 3  
Thanks for your feedback Neo

Neo - thanks for working with us at PubNub Support. We are actively working on updating the Vue SDK Docs with at least an "OUTDATED" message in the short term and long term, a new Vue SDK that lives up to the JavaScript SDK. Not sure how that Vue SDK got released in that condition but again, thanks for vetting it and reporting back to us.

We'll (SDK engineer manager and I) be in touch with more very soon.
Cheers
Craig

--- Post updated at 09:59 PM ---

Neo - just a heads up on a cool, new feature: Message Counts. This is a form of the history call that let's you get the total number of messages since a given timetoken on multiple channels. In short, it gets you message counts per channel instead of the message payloads (a bit of an overhead savings, when needed).

Cheers
Craig
This User Gave Thanks to pubnubcraig For This Post:
# 4  
Hi Craig,

Thanks for checking in and keeping up up to date on PubNub.

No worries at all on the Vue.js SDK.shortcomings.

I have been able to get things rolling with the PubNub Javascript libs sans the Vue.js wrapper in a Vue.js app easily enough.

Never been a big fan of wrappers anyway and in this case PubNub works better without one! Smilie

Making progress.... step-by-step.

I may shift dev to the PHP side so we can easily pass messages back and forth between Vue.js and PHP.

Or I may stick to JS for a few more days.
This User Gave Thanks to Neo For This Post:
# 5  
Progress > Wheels Spinning

Neo - great to hear you are having success with JS SDK. That is the typical DX for customers on our more popular SDKs, but no excuse for the other SDKs (wrapper or not) should not be feature complete. Thanks for lighting the fire under our butts on this one. Sometimes the edges get forgotten when you are blazing ahead with innovative features.

When you shift gears to PHP, be sure to reach out with any questions. There are some best practices when it comes to server side realtime. For example, if you are tempted to subscribe from the server side, think about using PubNub Functions and xhr'ing to your server (as needed) or using Presence Webhooks if there is a need to monitor channel activity on a global scope.

Whole lots of gotchas that we can steer you around if you don't already know about them.

Cheers
Craig
This User Gave Thanks to pubnubcraig For This Post:
# 6  
Thanks Craig!

If you have a link to your most up-to-date server side PHP best practices, that would be great to share with us.

I am also interested in using PubNub for command and control (C2) messages between subscribers (perhaps more so than live chat).
This User Gave Thanks to Neo For This Post:
# 7  
Update SF version: 0.7528
  • Removed annoying "join and leave" messages from chat window. I added this yesterday and it's simply too annoying. My bad.

Next, I think I need to spend time on the initial Vue.js bug which is causing the initial page render to be blank (requiring a reload) based on some incomplete PubNub AJAX calls (race conditions). This results in "undefined" Javascript errors I need to trap and deal with. These async AJAX timing and race conditions can be tricky to deal with (trap all possible errors) in all of these types of apps which make asynchronous REST calls to a remote API. I'm having some issues on initial page load where the REST'ful AJAX calls to the PubNub API are not returning fast enough and this is causing errors on initial page load and this is the reason why a page reload works (and is often required) after the initial loading.

This issue is really is nagging me and it impacts every possible variation of this publish-subscribe Javascript project moving forward. This is a Vue.js lifecycle problem and not a PubNum API problem. However, I have not completely switched out all the "OUTDATED" Vue.js wrapper code, so maybe if I get rid of it and just use the "unwrapped" SDK, I will get better results? Actually, I kinda doubt it because I have seen these kinds of AJAX race conditions many times over the years. This is the bane of using async remote calls. It's also an issue I have seen in game engine (the game loop) programming.
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

5 More Discussions You Might Find Interesting

1. 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... (1 Reply)
Discussion started by: Neo
1 Replies

2. What is on Your Mind?

PubNub Live Chat Beta Testing

Dear All, We are now beta testing our future "Live Chat" area using PubNub technology. https://www.unix.com/usercp/#/livechat This purpose of this testing is to test the core system, in general, and to see how many, if any, bugs crawl out of the woodwork. This "Live Chat" is not the... (48 Replies)
Discussion started by: Neo
48 Replies

3. 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

4. What is on Your Mind?

New UserCP Update Profile Image Page (UserCP Screeching Frog 0.7485)

Update! UserCP Screeching Frog 0.7485 Created a new page for uploaded a profile picture (profile pictures are different than avatar pictures). https://www.unix.com/usercp/#/settings/other https://www.unix.com/members/1-albums225-picture1158.png ... (0 Replies)
Discussion started by: Neo
0 Replies

5. 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

Featured Tech Videos