I'm trying to receive realtime communication from my backend, which is rail, and use AWS SNS service to send message to frontent which is react. I can't find a way to subscribe and receive message via http from react.
Is this possible? If it is, how can i implement it? Do I need any extra library to do this?
Related
We have a reactjs based frontend application and we want our reactjs application to read dynamic data published from aws sns message (after every interval of 30 mins) and show it on the frontend.
Thoughts:
Fan out the sns message to http/https endpoint
Subscribe reactjs application to that aws sns topic
read data as it gets published on to that https endpoint
Question:
Will axios be the best library to read messages from https/http location?
Any other thoughts/suggestions on how to code it?
I am developing my first React Native app and are struggling with the proper implementation of push notifications and real time chat. The attached image shows the current layout without chat/notifications.
The client application uses Firebase only for social network authentication (login) and image storage.
Everything else is kept back-end using PHP/MySQL which also communicates with Firebase for session token validation and email authentication (login).
Now i want to implement a real-time chat function and push notifications but are struggling with the proper way of doing it. If i have understood correctly one way could be: Socket.io (for real-time chat using mysql for archive storage) and Onesignal (for push notifications)
Or is there a better way of doing this when using a PHP/MySQL as back-end?
Any ideas or input is greatly appriciated.
I have a backend microservice that is using MassTransit and RabbitMQ to publish some messages. I am interested in implement a solution to relay those messages to my app's front end which is written in ReactJS.
I have researched online on various tutorials, most of them show me how to use a JavaScript rabbitMQ client to subscribe/connect to the service bus. But since it is wrapped in MassTransit, and the URL is in the format of "rabbitmq://...", how do I subscribe to this messaging host using Javascript? Ideally I would like to use a WebSocket connection, research tells me that I should consider either STOMP or MQTT, is that something I need to configure in my backend MassTransit/rabbitmq service?
My backend service also have some http endpoints that I can reach using a plain http/https URL, such as https://localhost:7179/api/doSomeJob. Will this help with my intention of using a WebSocket connection to subscribe to the MassTransit service bus?
How can I subscribe a redis channel inside a React Component when it is mounted (i.e, inside the componentDidMount() ) ?
In the internet almost everywhere I see the redis implementation with nodejs but can't find any
sufficient hints how to use this in React App.
Actually I want to update my ecommerce dashboard (react app) data without refreshing the page. In the backend I used djangorest framework. When any API is fired to change any data the python code doing its work and also publishes a message in a specific Redis channel.
I want to subscribe that channel from the client (react app) so that it can consume this message and update it's content real time.
A react component (client technology) should not be able to access redis (server technology) for obvious security matters.
If you use react at server side to generate responses with react using node, that's node that should make this access.
If you want to access redis from a web front end (with a web browser), you must establish the following architecture:
React accesses a server using websocket and listens for messages.
The server in node js (using socket.io), in aspnet core (using signalR) access redis and communicate changes to the client thank to websocket technology.
If you want more details about how to do, you should describe that technology stack you use at client side.
But to make it short, for client side, the best is to use the redux observable stack. In this case, that would be an epic that would update the redux state whenever the server notifies something. If you are not comfortable with rxjs (this is very understandable!), then the easiest would be to use mobX (https://mobx.js.org/README.html)
I have an AngularJS app with no server code. I created a form in which I'd like to be able to type a message and send as a push notification to all Firebase users using our mobile app. I've looked at Firebase Cloud Messaging and services such as OneSignal, however, both strongly advise against sending push notifications via client for security reasons.
Has anyone been able do something like this? Any suggestions are appreciated. I'm not attached to any method besides the ones that work well and securely.
Thank you.