I am developping a offline web app with NodeJS. I managed to store the data I wanted to a IndexedDB database with Service Workers. But I can't synchronize them with my MySQL remote server. I was wondering what was the most feasible solution ?
I tried implement this solution of a tutorial in my app but without success. This is the link of the tutorial:https://codeforgeek.com/sync-app-mysql-indexeddb/
Related
Is possible to Offline sqlLite saved data send or sync with live MySQL database in server side ?
I found my own solution to this scenario.
I try to build up React Native mobile app working with Laravel backend(PHP) and my app working online and offline both. So my mobile app using Realm (of MongoDB) to app db and MySQL in severe side (Laravel). I create the flag field in both dbs to know that row is sync or not and i develop the function to check that flag field and sync to both db and update flag field as my wish. You can try this with SQLite or any other mobile db.
Realm:https://docs.mongodb.com/realm/
The most easy way to do so is to use WatermelonDB.
See: https://github.com/Nozbe/WatermelonDB
It provides a syncing option from which you can automatically sync your database with the backend. It uses SQlite on it back. For synchronisation see:
https://nozbe.github.io/WatermelonDB/Advanced/Sync.html
I'm fairly new at building Electron apps and I've seen a lot of examples where Electron app connects directly to a remote database (MySQL in my case) so I started wondering what the problems might be with doing it that way. My first thought was to have a remote API (built on top of Express) which would communicate with the database and Electron app (React) would just utilize that API.
Any advice? Thoughts?
Thanks.
A problem with directly connecting to the database is you have to embed the database credentials in the electron app which makes them available to anyone who wants to snoop through the code. In addition, once the credentials are exposed, you lose control over what anyone can do to your database.
This is why you would usually give the user their own credentials, have the user authenticate to a web server and then have the web server be the only one who can directly talk to the remote database. You can then completely control what happens to the database since your web server is the intermediary and the only one that actually talks to the database.
This doesn't mean that there aren't some circumstances where you might want the client to talk directly to the database as it really depends upon what you're doing, what the data is and what the risk exposure is for allowing untrusted code to directly manipulate the data in the database.
Remember, you cannot protect credentials embedded in a client. They can be discovered by the client and used for other things.
I made a Web Program which runs perfect on my localhost.
Now I want to bring it in the App Store and Google Playstore.
I hope someone of you can give me a tip which Plattform I should use as a Server.
T thought about azure or firebase.
But by firebase i have to Change my whole code because of tht nosql and it is not really possbile to make dynmaic pages.
on azure I only can bring it on the Marketplace.
does anyone know other pltfforms?
Ionic / Cordova / Phongap / Appcelerator are all names to look up for building a hybrid app and distributing to app stores.
Amazon EC2 or RDS can host a database for you which the app can connect to, I'm sure there are many others.
I need to develop an application that is hosted in Google App Engine and access mysql database that is hosted in separate server which is not enable RMI or tomcat installed. Data(music files) stored in same server and for music files paths are stored in mysql database. Users can select music category and play them.
Just like - http://www.the-music-collective.com/listen/MP3Player.html
![alt text][1]
My questions are,
What technology I can use to access the mysql database?
Can I upload music files to the server via client interface?
The site you mentioned is using this javascript library:
http://www.schillmania.com/projects/soundmanager2/
and it's wrapped with GWT by JSNI or by library mentioned by stan229: http://code.google.com/p/gwt-sound
You can read more about this here:
http://googlewebtoolkit.blogspot.com/2009/03/giving-your-gwt-application-voice.html
Add 1) According to this two questions:
Can I use a MySQL database with an App Engine applicationand this:
App Engine and MySQL
you can't connect to a mysql database directly, but you can expose web service that will connect you with db.
Add 2) Yes you can upload any files through client. You can use this widget:
com.google.gwt.user.client.ui.FileUpload or this library: http://code.google.com/p/gwt-upload/
Well, you need something server-side. Why not PHP? Will they let you have PHP on that server? You could then write a simple script to give you feeds of data you need. Just be careful and secure it.
Regarding uploading music, you can handle this with PHP as well.
For the Client you will need something like GWT-Sound http://code.google.com/p/gwt-sound/
For the URL you would need to call some kind of server that returns the stream of data from mysql on a GET
how to load the mysql server in android emulator
i.e
Class.forName("com.mysql.jdbc.Driver")
i got the exception java.land.ClassNotFoundException in com.mysql.jdbc.Drive
please reply me.
This assumes MySQL is publicly available from internet, but it is never good idea .
Setup public WebService and connect to it from mobile application.
You won't be able to run MySQL server on an Android device.
What you're doing, however, is trying to load the MySQL client library. That isn't included as part of Android so you cannot load it. You'd need to include the relevant JARs in your project, if you really do want to connect to a remote MySQL database from an Android app.
If you do want to store and access data on your Android device, the awesome SQLite database is included by default, including all the APIs you need to create, upgrade and otherwise interact with SQLite databases.
When I did this I created PHP files for the database operations. I sent data in XML and received data in XML all using PHP scripts. I found this to be the easiest way for me...but you need to know PHP of course.