I am trying to make a Data Monitoring with Mobile App.
I have a mysql database and i am planning use Node.js server.
My project:
Node.js server connect to mysql db.
Mobile apps connect to node.js server and when the new data add to mysql, node.js server send to data mobile apps using restful service.
Is it possible to communicate between node.js server and firemonkey mobile client apps? (I' ll build mobile apps via firemonkey - Delphi)
The reason to use push notifications, is so that your Mobile app does not waste resources to maintain constant connection to the server awaiting for new data, whether it is a web socket or a check for new data.
Keep in mind that Push notifications code might be different for Android and iOS platforms.
Related
I am using phonegap to make iphone and android apps. I need to be able to store data on a mysql database on my server as well as use my websocket server.
How can I go about doing this as the app will be running on local html and javascript files which cant run ajax/websocket requests on external servers?
So let me convert my comments into an answer.
You need a client-server architecture, where the clients will be all your end devices. The server in this case needs to be a globally reachable host somewhere (Amazon cloud, perhaps?).
Your device will send updates to the backend server that has a connection to your database, using ajax calls. These updates will be stored on the server.
All your other clients need to periodically poll the same backend server using ajax, and will get the updates sent from your primary device.
I would like to create a desktop application that should work with data on a mySql server running on a remote machine.
So each user has a copy of the desktop app and edits data on the remote mySql server.
Now my problem is that the mySql server will not allow connections from other hosts.
Question, is this just the wrong way of creating the app. If not how do I give any host access to the MYsql server.
(I know I can open up for a specific IP but that won't work as the app could be running anywhere)
You should front your database on the server with a thin service layer, where you could do some validation / processing on the data, perform authentication, etc. Your client apps would then expose those methods in your service layer as web services, to which your client apps would communicate using either SOAP/XML, REST/JSON, etc. In general, it is a bad idea to expose your database directly if your application is within a LAN, and a terrible one to expose it on the internet.
I have to connect to my database from android appication. My doubt is how to connect to remote mysql via android application ( jQuery mobile and HTML5 )
Thanks
The way this is done is by creating an API that will feed JSON, XML or a markup language of your choice to your app using AJAX requests. Connecting to the MySQL server through the app is an absolutely terrible idea for 20 different reasons.
I'm attempting to write a Windows Phone 7 application which needs to connect to a remote data source, in this case it's a MySQL database on a Linux server. I'm not able to move this over to MSSQL, nor to build any kind of windows-based solution (like a WCF web service on the server).
Is there a way for me to use my MySQL database from my Windows Phone 7 application? The MySQL assemblies don't seem to work on the phone. If not, what would the best solution for me to use this database from the phone?
You could build your self a service which would send you json or xml. this can easily be built using mono, python, Ruby, php or any technology that you are comfortable with.
You can build it in a restful manner where all you have to do is call urls in a HTTP GET to retreive data which you handle with the services.
and use the HTTP POST to submit changes to your service.
you can then from WP7 make calls to this service and consume the data.
WP7 does not support sockets at the moment. So your best bet is transfering your payloads over HTTP.
As I mentioned before, if you have access to the machines configuration. You could run Mono which isn't too far off of .Net in terms of language and functionality.
further more, from the phone you can use the Rx library to make these calls Async and keep your application responsive.
I do a mobile application which the user can use it get the required place’s number. The user must select the appropriate city and category to get the place’s information. All the information stored in the database.
What I want to know that ..
1) What is the benefit from the web service?
2) How to connect the web service and MySQl database?
3) How to connect the web service and mobile application to get the information from the database?
1) Benefits. You didn't mentioned other options, but if you are talking about some custom server-side implementation, the benefits are numerous:
It's easy to connect to web service from J2ME.
Multiple connection sessions at one time.
You can use web service from different applications and different technologies.
No issues with authentication and authorization.
You just call method from ws and in response you get easy-to-parse XML.
2) Web service - MySQL:
You have to create a Tomcat or IIS web service.
From web service code connect to MySQL, call a query and return the result.
For Tomcat and Java web service:
Getting started with Web Services Using Apache Axis
Developing and Deploying Java Web Services with MySQL on Apache Tomcat and Axis on Windows
JDBC for MySQL
For IIS and C#/.NET web service:
CodeProject:Your first C# Web Service by Chris Maunder
How to connect to MySQL 5.0. via C# .NET and the MySQL Connector/Net
3) J2ME - web service (with JAX-RPC)
1. generate stub from web service WDDL using J2ME Wireless Toolkit
2. add stub to your project, import stub namespace, set connection properties and call stub methods
How to build and run a J2ME Web service application?
Web Services APIs for J2ME, Part 1: Remote service invocation API