webhook and websocket

Solved
Highlighted
Tourist
9 0 3

 

Hello, I am developing an embedded Shopify application.
Let's say the application will display all images of each product, then the merchant can click on an image, so he can apply a filter to the image or resize it or whatever..

let's say that the merchant go to his admin page and add new images of his product.
My question is how the app should be notified of new images were added.
I was thinking about webhook, but if I am not wrong webook will notify only my server, so I was thinking to create a webocket between the server side and the client side, so when my server is notified , it's will notify the view of the client side.

tell me please if it's the goog approch or if there is a better one,

i am new in developping applications. 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1040 139 163

This is an accepted solution.

Hey @sefiani,

 

That scenario sounds unlikely, but possible. The webhook + websocket solution sounds like it could work (keep it mind it will be slightly delayed). Alternatively your app could reload product images if it detects a user has left and returned. Or introduce some kind of timeout where the user is automatically logged out when they're inactive for a certain period of time.

 

 

0 Likes