Square-Connect Real Time Inventory Updates - square-connect

I am researching the square-connect api, and am able to send out curl calls and receive responses without issue. My question is, can a sale on the iOS APP send a call to my MySQL database to keep the inventory up-to-date on both my iPad and my database or do I need to run a cron every 5min or so to pull data?

The Square Connect API does not currently provide notifications for events such as changes in inventory counts. I've passed this use case along to the Connect API engineering team.
Your suggested solution of periodically pulling inventory information is the recommended method at this time.

Related

Android Managment API Command Timeout Problem

When the "Duration" in https://developers.google.com/android/management/reference/rest/v1/enterprises.devices/issueCommand expires, no Time Out information comes from Pub/Sub. At the same time, when we query the command, there is no information that the command will no longer go. Can we perceive this?
Best regards.
This is not supported yet. Currently, Pub/Sub can display commands that are successfully submitted and commands that return errors.
There is an existing feature request for this but there is no guarantee when this will be worked on. To stay up to date with the latest updates for Android enterprise, we suggest that you join the Android Management API mailing list to receive monthly updates and service advisories directly to your inbox.

ElasticSearch/ElasticCloud Alert Creation

I am a newbie in Elastic in general and currently I am trying to manage our alerts for CPU/Disk/Memory in Elastic Cloud. I can create the alerts manually just fine, but that takes a huge amount of time and if we migrate I want to be able to create the alerts in some automated way. In the past I have worked with Azure and created alerts with Az PowerShell and etc, so I am searching how to automate the alert creation for our infrastructure in Elastic Cloud. I went through the documentation for Alerts Link. But, im not sure I understand how to use the API to actually do this.
Is there a way to automate lets say creation of CPU alerts for 10 different hosts that we monitor with Elastic ? Is using the API the only way and are there any materials other than the official documentation that can help me achieve this? And am I even on the correct path? Thank you in advance.
Let me share knowledge of using Azure Monitor where you can connects the resources to Azure Monitor and manage the Alerts. Alerts can send you an email or call a web hook when some metric (for example database size or CPU usage) reaches the threshold. There are several ways to create Alerts- using Azure Portal, Command Line Interface, Powershell and Azure Monitor Rest API. Hope it will help you.
Even you can automate alerts using Azure Automation runbook with Mertic Alerts. where can automate the alerts according to the customized dimensional values and once the Alert criteria met it can even send an mail.

AWS AppSync how can I tell if there are outstanding mutations when I'm offline?

I'm using AWS AppSync, Apollo and React Native. One of the great advantages of using these together is that I get good offline behaviour. In my app, I can make changes while offline and they all get queued up and executed when I get back on line.
However, I'd like to be able to show the user if there are mutations which haven't been sent to the server yet. Just some little icon or something which goes away when everything is up-to-date.
Can anyone point me in the right direction? I've looked at the offline configuration for AWSAppSyncClient, and can see there's a callback I can hook into, but it doesn't give me enough information as far as I can tell.
Thanks!
Have you looked into using the amplify library - https://aws-amplify.github.io/docs/android/start?
When you make a mutation while the device is offline - it gets added to a local queue (persisted by sqlite). It is from this queue that they are read and sent to server serially once back online.
Now while offline - your appcode would be able to query the local datastore to determine the mutations still 'offline'
Read more here:
https://aws-amplify.github.io/docs/android/api#client-architecture
https://aws-amplify.github.io/docs/android/api#offline-mutations

Migrating from parse.com

Say I have 10K users for my app and I want to switch to my own custom server for backend. I have seen the Parse export functionality but I don't get how it can help me in this situation.
I mean even if I export all data and make updates to app so that it makes calls to my new custom server, still, it will take months for all my users to use updated version of app(many users don't update immediately, my last update on fb was year ago).
Also, during this transition half of my users would be having their
data on my custom server and other half(those who haven't updated)
would be using parse server, so for queries that require all data in one place this becomes an issue (I could solve this via replication but imagine how slow it would be in realtime to push the data to both - my server and parse.com).
Has anyone thought about this ?
What you could do is when you release a new version of your app, when a user logs in and they are on parse, migrate their data at that point to the new server and from that point on that user uses the custom server. That way users move to the new server as they upgrade, I always have a flag that is fetched from my server to force the user to upgrade if is needed. Hope that helps.
Copying data over to your new backend periodically until you have finalize your mobile client code and then allow the user to update their app on the App Store or Google Play Store would provide the switch over. Doing that elegantly would be dependent on the type of app and user base you have for the app. I wrote up a part 1 of a blog on these considerations for migrating over from Parse to Couchbase Mobile stack and the reasons why to consider the stack.
If you can already attach a new system in place to have new data in two places (Parse and customer backend) then the copy and merge in the future might be easier to handle but this is case by case. Then when on mobile app update, you can depreciate the server. Or push data to have local store for those users who will be on older versions since Parse will eventually stop working. Any new experiences will require update to the new App version.

How to send batches of million push notifications using Amazon Simple Notification Service (SNS)

Like many companies, the one I work for isn't comfortable in using Apple's APNS: No official library, stream that get cut-off randomly, etc... The same goes for Android's push system: Limited to small batches, completely different to Apple's APNS... That's why we are looking for an alternative and when Amazon claimed to be able to send millions of push notifications almost for free, we thought that SNS would be the perfect solution.
The issue is that we frequently have more than one million devices to address, and obviously our push campaigns rarely target the same devices.
As far as we dug, the only solution is to use the AWS API that only provides a method to create the endpoints one at a time! That is a big deal for us because after some testing, we figured that in order to create 1 000 000 endpoints, it would take approximately 15h (~17 calls/sec).
Even after all the endpoints are created, in order to send all the pushes at once, the endpoints need to be added to a topic, and again, this has to be done one endpoint at a time (so 15 more hours).
Event if we multithreaded our calls to let's say 30 threads, it would still take an hour!
So, could anyone tell us if there is anything that we missed? Is Amazon really expecting us to flood their webservices during 30 hours in order to create one push campaign? How can they pretend to send a million pushes in a second if it takes hours to prepare it? Are they working on a batch API for SNS? Is it possible to plug an Amazon DB containing the tokens to feed an SNS topic?
It looks like Amazon provides a few methods of adding endpoints/tokens, including a CSV importer (but limited to 2MB csv files at a time). They also provide an API and sample java application for bulk uploading tokens (link).
The topic subscription point is addressed by an Amazon SNS employee here, essentially explaining that there is no batch API available for this unfortunately.
There are a few other 3rd party push notification providers that may better meet your needs when it comes to frequently creating custom segments/topics:
OneSignal (Disclosure: I run this company)
MixPanel
Parse

Resources