Linking Events of deployed smart contract to a webhook - webhooks

I am trying to listen to events that come from the smart contract(solidity-ethereum), by using webhooks.
Can anyone guide me on this?

The easiest solution would be to use QuikNode webhook APIs:
https://blog.quiknode.io/introducing-webhooks-for-ethereum/

Related

How to create a server socket in Ethereum?

I need my Ethereum app to receive messages coming from outside through an SSL socket. I have no idea how realize it. Have you got any suggestion? I was thinking of creating a socket inside the app.js, but how? Can anyone help me, by giving me some code examples?
Thank you.
Ethereum smart contracts are not able to invoke off-chain services for security reasons.
So, creating a socket client inside your app is not possible.
In Ethereum world, Oracles are used to provide off-chain data to smart contracts.
Take a look at this documentation for some details.

How to I manage messages of chat application when the application is offline

We are developing application for chatting.But when I am sending messages and if internet connectivity is gone how will I be able to send the messages like what's app do?
You have to use a message broker software like RabbitMQ (https://www.rabbitmq.com) to handle these kind of situations.
Off course, you can't really send messages offline, so what applications do is:
buffering/storing "sent" messages if there is no network available
check/await for network connection to be reestablished
Actually send messages when application reconnects
For achieving this, if you're looking mainly on chat, you can use some library/package/software (as for example RabbitMQ mentioned on #Badis Merabet answer).
If there is no prebuilt solution available for your use case or you want to develop you own solution, you may use PWAs. Here are some links:
General information on PWAs
Angular PWA docs
You may also check this answer for more information. The last link have a cookbook on an approach to implement it.

Why one need to implement web-hooks if pusher are working well?

Why one need to implement webhooks if pusher are working well?
Are web-hooks and pusher are interchangeable or web-hooks better than pusher
Are web-hooks and pusher are interchangeable
No, they are different technologies and have different use cases
or web-hooks better than pusher
They are not interchangeable and cannot be compared in this fashion.
Web Hooks are a standardised way for a service to send a message to another service/api using regular HTTPS calls and have to be registered on the sender's side.
Looking at Pusher, though seems to be an service providing the ability to provide push notifications to web browsers and apps.
UPDATE Just noticed that Pusher does appear to offer web hook integration as well for Pusher related events.

Database changes notifications (Angular4 client, NodeJS server)

I'm developing an Angular 4 app that connects to a REST API developed in NodeJS/Express/MySQL. I'm looking for a way to notify any connected clients when there is a change in the database, so they reload their datasets. I've done some searches on Google but I don't know the technical term of what I'm looking for, so I didn't find anything useful.
Can someone point me some resource on this subject? Thanks!
You have two options avaliable
1)HTML5 serversent events
A server-sent event is when a web page automatically gets updates from
a server.
https://www.w3schools.com/html/html5_serversentevents.asp
2)Socket.io
https://socket.io/
Based on my experience for simple realtime updates HTML5 server sent is enough
If you want to visualize changes "live", you should try websockets.
With websockets you could notify any client about any upcoming changes in data, think of it as some kind of chat between server and clients.
There's socket.io for Node.js developers and plenty of tutorials about how to set it up and get it running.
Thanks!
Time to learn some new things... I think I'll start with HTML5 Server Send Events, I think it'll be more than enough for what I need.
Cheers,

Using Node.js to send and receive messages to/from SonicMQ (progress)

Does anyone know if it's possible, or have an example of using Node.js to connect to a SonicMQ broker? I have not been able to find any information or examples online.
I would suggest to use either a Sonic Connect exposing a rest service(need ESB) or defining an http Acceptor to communicate with the queue(Direct connection to broker).
Regards

Resources