Firebase Notification. Let's say on the server there is either a running application or a web site that creates the new data. Let's assume that we're talking about a website written in ASP.NET. User clicks on a button on the webpage and a new record has been created.I have a database on a hosting server.
How do I make every time new data is inputted into the database, I get an automatic notification ?
Is it possible to check new data from b4a app?Firebase Notification. Let's say on the server there is either a running application or a web site that creates the new data. Let's assume that we're talking about a website written in ASP.NET. User clicks on a button on the webpage and a new record has been created.
Now on record created event we can run a code on this web page that will send a notification to the B4A app.
Implement jRDC2 on your Server and use B4A JRDC2 Client to fetch Data from the jRDC2 on your Server.Is it possible to check new data from b4a app?
The problem is I'm still using shared hosting ...Implement jRDC2 on your Server and use B4A JRDC2 Client to fetch Data from the jRDC2 on your Server.
My point exactly, and that is not a problem...The problem is I'm still using shared hosting ...
yes using MySql,If you are using a general shared server solution like around 99% of businesses/people do, then jRDC2 is definitely not the solution for you. In the last I've just set a 60 - 300 seconds ping to check for new data, It's as simple as that.
Most simple website services give you free hosting databases (but no desktop access), so you should define if you have access to the actual desktop. A simple pinging the database every x seconds should suffice.
I can think of lots of solutions, this is just one of many simple solutions that popped into my head. Firebase Notifications is another solutions, but you will have to do a lot of work to get everything working smoothly.
I take it that you're using either MS SQL or MySQL???
To me you've not really described anything, do you need instant notification, or can it be delayed 5 minutes (maybe not)...
will it not burden / disrupt the server ?Just use B4XPages with a timer, then just use your usual connect to database routine to check for new data. There are other things that you'll need to do to keep the app running in the background, but this is a good start for you...
need to do to keep the app running in the background,Just use B4XPages with a timer, then just use your usual connect to database routine to check for new data. There are other things that you'll need to do to keep the app running in the background, but this is a good start for you...
You don't need to download/read all the data every time. Just implement a single-record table on the server with a LastUpdateDateTime or SequentialCounter. Update that whenever an add/change/delete is made to the main data. The remote App can just periodically read & compare that with it's currently stored value and do whatever when it changes.will it not burden / disrupt the server ?
You don't need to download/read all the data every time. Just implement a single-record table on the server with a LastUpdateDateTime or SequentialCounter. Update that whenever an add/change/delete is made to the main data. The remote App can just periodically read & compare that with it's currently stored value and do whatever when it changes.
WHERE DID I SAY DOWNLOAD AND READ ALL THE DATA???You don't need to download/read all the data every time. Just implement a single-record table on the server with a LastUpdateDateTime or SequentialCounter. Update that whenever an add/change/delete is made to the main data. The remote App can just periodically read & compare that with it's currently stored value and do whatever when it changes.
That's not what he wants - instead of fetching data he wants the new record to be pushed into his app.Implement jRDC2 on your Server and use B4A JRDC2 Client to fetch Data from the jRDC2 on your Server.
using MySql
thanks for the information, it helpsCreate a trigger in a table, and in this trigger may call a MySQL-procedure that creates a new record in a table that should be polled by a periodical script.
Or collect some new records and use https://stackoverflow.com/questions/13474012/invoke-pusher-when-mysql-has-changed.
Or need to study https://github.com/Cyclonecode/mysql-notification