What is the current best guess on releasing an update to Xano plugin so we have sockets?
Will this be released this month??? Just trying to shift some development resources around …
What is the current best guess on releasing an update to Xano plugin so we have sockets?
Will this be released this month??? Just trying to shift some development resources around …
We’re aiming for the end of June / beginning of July but can’t commit to the timing yet because there are a 2-3 big updates gearing up in parallel. I’ll know more towards the end of next week
Okay - this is very helpful.
What would be your other updates?
The 2-3 big updates I was referring to are:
an under-the-hood change to how authentication and private pages work. This should have a very positive impact on page load speed across the world and also make self-hosting super easy to setup.
the release of the marketplace with 10-15 new templates and the ability to submit your own templates and UI kits to make them available to other users.
the revamp of the add panel, which was necessary to keep things clean and readable when working with templates and libraries from the marketplace.
this is very helpful, thank you Joyce!
I’m about to set up a new sign-up for subscription workflow with Stripe. Is there anything in the upcoming release, particularly with #1, that might impact the way I build it?
Hi @kyanaloe
I don’t think so. Some bugs may creep in as with any release that size but the update is meant to have no breaking changes
thanks @raydeck will be sure to check out. nice of you to prepare this.
Hi @raydeck this is so useful. Followed your instructions and have it working.
I do have one related question, I’d like to setup another button to then close or kill the socket. The bit I can’t work out is, how to refer to the socket instance that was created in your JS from a new/separate script that I add to the close button. It doesn’t recognize any of the variables that were created in the first JS. It must be somewhere, but can’t work out how to refer to it in the new script. Any ideas?
@raydeck Thank You. I have one more question like when we do some changes in database can we trigger the event from xano ?
Sure, you can just attach your client to a weweb variable or to the window for the purpose of referencing it later. Like adding after line 26, try adding on its own line:
wwLib.getFrontWindow().xanoChannelObject = channelObj;
Then, in your later code, you can destroy this connection:
wwLib.getFrontWindow().xanoChannelObject.destroy();
wwLib.getFrontWindow().xanoChannelObject = undefined;
Sure, you can trigger a realtime event whenever you want in Xano. Xano has largely five kinds of events on which you can trigger function stacks (including the realtime push function):
Hey Ray, thanks so much, I have it working as well.
I am seeing the updated message in WeWeb when initiat from Xano, but how would I post messages to a sub-channel when initiated from weweb?
Most of the time I would send data up using https and down using wss. That’s playing on easy.
But you can send messages up to Xano using their library. And then Xano will receive those messages in a “realtime” trigger. And you can have code that responds to those messages. The capability is all there, but it’s messy.
Thanks, it’s tips like this which are really useful - I wasn’t sure how to use getFrontWindow().
Hi @raydeck i would like to setup the subchannels dynamically like when i click on a product i can send product id to the channel and will i be able to get the real time updates for that particular product?
Yes, you can dial it in more precisely. I would probably set up a dynamic nested “subchannel” to whihc Xano sends those updates, and to which your Weweb can subscribe. You name it like base/documentID, and assemble that string on-demand when you run the realtime push command.
I use that with Statechange ScriptTag subscribing to dynamically changing documents.
@raydeck Thanks for putting this tutorial together. So for collections that I need to be updated in realtime, should I instead just do it this way and store the data in a js object and reference it that way instead of using a database collection?
I’m guessing the database collections are probably just variables in essence anyways right? Or would it be better to add in a “fetch collection” step in my workflow instead?
You can always tell weweb to “fetch collection” in thenworkfloe triggered by the incoming websockets method. That lets the rest of your app remain “normal” without refectory g but getting the profit of this tech.