Rather than providing too much details, I'd just like to ask if anyone has run into this issue.
I am using react-apollo. (React Native) Generally, it works well. I was able to subscribe to mutations and let my code trigger.
However, in the scenario like this, it seems not working or at least I feel it's inconsistent.
Leave your mobile application running in the foreground.
Go offline using the airplane mode.
Do some mutations on the server / other devices.
Turn on the network.
*During the whole process, I'd left my app in the foreground.
Subscription event doesn't trigger. What I had been expecting was that it should receive all the pending publications since then, without any user interactions.
Thank you in advance.
Related
I need to write a C++ application that should read firewall status of Windows, and then need to keep an eye continuously if admin/someuser
changes the firewall status (lets say when my program was started firewall was disabled and after sometime Admin enabled it).
To implement this, I have created a thread that periodically(10 seconds) poll the code that checks Windows firewall status, but this doesn't look an efficient solution to me as continuous polling is required.
Is there a way to get event automatically in my program if firewall status changes (for example, FindFirstChangeNotification, using this I can get notification if any change in directory)? This will avoid continuous polling and will make program more efficient I think.
Any help is appreciated.
I know there is Windows ETW which anti-viruses use and which has all the info you need. It is a big system log where you subscribe to log/event providers. Pretty much everything that happens in system gets reported there via event which you can listen/wait for. I don't know the links to more useful pages with a list of loggers connected to ETW so here is the more general page: https://learn.microsoft.com/en-us/windows-hardware/drivers/devtest/event-tracing-for-windows--etw-. You need to find out how to use C++ ETW API and the name/ID of the firewall events provider with a list of event types, then using API subscribe to this provider and setup a callback for when an event that interests you (here change of firewall status) occurs and that is it.
I am writing a (Django-based) website which is working just fine. It displays a list of sensors and their status. If a new sensor is attached, the user needs to wait for a certain amount of time until it is warmed up and ready to use. Also, when the sensors are updated (which the user can trigger, but can also be done automatically by the system) - the user needs to wait.
On the server side I have all signals/Status updates/whatsoever available. Now I want to create an overlay for the current webpage where the statuschange is displayed for x seconds and userinput is disabled.
I have no clue what technology to use. I could frequently ask for updates client -> server but that doesn't feel like the correct way. Any suggestions on what to search for?
No code here because the answer is probably independed of my website code
Standard solution is to use Ajax (JavaScript) or similar to get state from your backend on specific intervals, that is the approach you're mentioning.
You can also "push" changes from your backend to frontend using WebSockets but that is a bit more complex. A popular framework is socket.io, I recommend you take a look at it.
I'm developing a game using AWS Amplify. The game state will be stored in DynamoDB tables and will be queried and modified with GraphQL. There isn't a pressing need for realtime or low-latency communication; However, I need to detect when a player joins or disconnects from a game. What's the best mechanism for implementing this?
What I had in mind was an event that fires when a WebSocket connection is established or broken. The best I could glean from the Amplify docs was using PubSub with AWS IoT, but I don't know if this will work. If possible, I would like to avoid incurring additional API costs.
I already implemented a version of this where the client updates a lastSeen field in the database every 30 seconds or so but it felt pretty janky.
I think you need to distinguish between a disconnect and inactivity. Somebody may simply be inactive and in that case you would disconnect them yourself after they did nothing for x amount of time.
A disconnect on the other hand should notify your server that is indeed what the user intended to do.
I think DataStore Events will do what you want. They have a specific network status event you can use to trigger state changes.
I am looking for a resilient way to publish changes on Dynamics 365. I have done a POC using the below methods.
Use logic apps to connect to Dynamics 365 instance using Common Data Services connector which gets triggered upon any changes on connected entity. I have tried disabling the logic app to simulate the scenario in case the logic app fails for some reason. I found out the logic app does not trigger for the updates done while the logic app was disabled when enabled back. Is that expected behavior? I am thinking from resiliency perspective.
Registered a service end point to publish the changes to service bus. I found the messages published were verbose and its tedious to work out the changes by dissecting the message.
What is the recommended way to publish the changes on the D365 entity?
I would go with option 1 and yes logic app will not get triggered when it is in disabled state.
Use logic apps to connect to Dynamics 365 instance using Common Data Services connector which gets triggered upon any changes on connected entity. I have tried disabling the logic app to simulate the scenario in case the logic app fails for some reason. I found out the logic app does not trigger for the updates done while the logic app was disabled when enabled back. Is that expected behavior? I am thinking from resiliency perspective.
Another advantage is that you can prepare json object in a way you want to send the message to logic app. Registering service endpoint would post entire remote context data to the service bus which is a bit difficult to parse.
Please mark my answer verified if i were helpful
I am a bit Confused in Push Notification concept,
I mean can I send notification to all registered users from firebase console after my application is live.
If yes then What is the role of server (like MS Azure or AWS etc) if we can directly send notifications from firebase console ?
If No then why and what is the best way to use this service?
I really need logical explanation.
please answer me. Thanks
"if we can directly send notifications from firebase console"
You can't directly send the notification. It will have first go through APNS.
APNS is there to:
Avoid spamming. If you're sending it every 3 seconds, APNS will restrict you.
Help preserve battery. This becomes more important for silent notifications. Imagine an app sending a silent notification every 30 seconds. This would affect the battery—without the user knowing about it. He's like I'm not opening any apps, yet my battery is dying faster than normal. This would allow Apple to batch notifications from different apps. Imagine if you had 20 apps each trying to send their silent notification at a specific time, so you would be on for 20 different moments. Now imagine if your device told APNS: "Hey there, I have good battery and a good connection, send me what you got!"