Can any one help me how to do “Realtime Data Update using WebSocket for 2 wappler projects (Admin and Client) with same DB” ?
I have gone through the below document, here websocket is used in same project. But i have client side project and admin proect. If we inserted from client side its live transaction should be
shown in admin side automatically.
Yes it will as long as you “action” the correct websocket after your update / insert action.
In serverside(Client Side) included socket >refresh with action is populating with query, but my case is different, i have query in another project(Admin Side). What should i do in this case?
Ohhh if its in another project…(* complete different Node project ) then i dont think its possible … as it needs to be in the same project (app) as far as im aware… your admin and client side need to reside in the same “project” for this to happen.
yes that i know, but my case is when a client is doing any transaction live report should be available at the Admin end. @George
You might need to implement a custom websocket solution if you wish to communicate between two different server & client sides.
Alternatively, you can implement a webhook setup.
- Create a Server Action on admin app.
- On change of anything on client app, call admin app SA with some data.
- In server app SA, process the data and fire the admin app websocket which would update admin app UI.
Thank you all, i have done it on that day by calling the Admin API in Client portal just after the data insertion query.
So, when ever a new data is inserted in client portal it automatically refreshes the admin api in admin portal.
I think its the best solution.