We’re happy to announce the release of the new Realtime Module for Corvid.
Using the Realtime API you can create channels and channel resources where messages can be published. Site visitors who subscribe to a channel receive the messages published to that channel.
Typical uses of the Realtime API include implementing a messaging system or as an alternative to using a polling mechanism.
Read more at https://www.wix.com/corvid/reference/wix-realtime.html
How do users get notified? Is there a way to show a channel in a repeater?
I just don’t understand how this works to be honest
You subscribe to notifications in your code using wixRealtime.subscribe() and then you can put it wherever you like (including repeaters). Channels are not opinionated regarding how you decide to display the notification, it is totally up to your code implementation.
Do subscribers get notifications of some kind?
This is big. I just don’t think we realize how big yet.
This is massive, it will be even bigger once we can also do a face to face web meeting. are their any examples other than those in the API reference that show how to best utilise the wix-realtime API for a messaging system?
We have two full use-case examples that are in the works.
I have no clue what all of this says but I looked at what you are doing with the real estate subscription page and data import ai need something like that done.
Amazing, any idea when they’ll be available? also will this allow face to face meetings via camera?
Can’t wait to see these full case uses, as I also think this will be a seriously cool addition
well done Wix
@sam-wix Following up with this Sam
So the first one is the real estate example from above that has recently been added to the examples site: https://www.wix.com/corvid/example/real-time-notifications-for-new-real-estate .
And the second one, we’re going to take a different direction because it is a bit complex. It will probably not be on the Corvid site with the other examples. Instead, we will be writing a tutorial based on the example and you will be able to get that example from the tutorial. This make take a bit of time. Could be that I can get you a link to the example before the tutorial is written if that will help.
that would be amazing, if I can help at all I am happy to do so also.
Alright, here it is. As I said we’re not completely done with this so it is subject to change.
A little explanation: It is a news site where we’ve implemented a breaking news feature using the Realtime API. Members of the news site can subscribe to categories of breaking news they’d like to be alerted to. The categories and member subscriptions are stored in two database collections. There are three areas with code. First is the home page, which is where alerts are received. Second is a lightbox opened from the settings icon on the home page, where members can manage their subscriptions. Third is an admin page, where the admin sends messages to subscribers of various categories. To see all this in action, you’ll need to have the site open twice - one acting as a member and one acting as the admin. There’s a bit I left out here, but I leave that up to you to discover.
Here is the template so you can try it out yourself. Let me know how it goes.
@sam-wix Thank you for this, I now see where or how to utilise publish, I did not think about placing it within a JSW and this will make what I am trying to achieve a lot easier, I can understand what it is your achieving with the template and it is very cool, I am trying to build a messaging system so individuals can share, data by way of messages and also files encrypted at both ends. It will take me sometime to complete the messaging feature but will be amazing if all works. It would be great to also get webcam access so that this can be delivered via the realtime API also. Many have suggested the wix chatbox feature but it has limitations to what I need, what you are demonstrating in this will help many massively.
@simonadams Yes, right now all message publishing must be routed through the backend. There are plans for a client-side publish function as well.
It’s ok to have it go through the backend I thought it would but just wasn’t sure how to achieve it. do you believe one day that it would be achievable to have webcam access and do face to face messaging via the real-time api?
@sam-wix Hi Sam hope you are well. I have tried to test this capability out BUT the subscribe never seems to complete. If I use await the call hangs forever and doesn’t even seem to time out. If I use promise then() the then is never called.
This means that when I place a backend call into publish() it always returns a 400 error. Presumably because I am not subscribed and so the publish doesn’t know who it is targetting?
It seems to me that something is missing in the configuration of the realtime capability. Shouldn’t there be a back end configuration that is used to set up and define which channels are configured to allow subscription to? Could that be why the subscribe never completes? Or is the subscribe() never completing simply down to a backend Wix bug?