What database-as-a-service providers (ideally either Mongo or MySQL data sources) offer a REST API for retrieving data as JSON? - mysql

We would like to hook up an iPhone app directly to a database in the cloud. From the iPhone app, we would like to use some REST API to retrieve data from the cloud database. We prefer using MySQL or Mongo as the data store.
We prefer not setting up our database system on AWS or another hosted provider. We would like a cloud service that offers the database layer out of the box.
What database-as-a-service companies support this, and what are the pros/cons of each?

We looked around, and it seems like MongoLab is the only service offering a REST API.

Mongo is a great database for API interaction as the query language uses javascript expressions. Here are the open source API libraries that are implemented in Python
Sleepy Mongoose
Eve
Primary advantage
JavaScript can handle the querying part of data retrieval
Primary disadvantage
The API libraries above have difficulty capturing complex queries

Related

Flutter connecting to a database in server

I'm new to flutter and i really want to know, is there a way to connect to a database server (for instance mysql) in flutter rather using firebase. I'm working on a smart parking system project where i need to insert the latitude and longitude of the parking area which is free into the database which is created in server and retrieve it whenever user requests for it. It would be great if anyone gives solution for above mentioned problem (Flutter with database).
Since Flutter is just a UI Framework, topics such as persistence and databases may be out of scope or may depend on the use case.
Flutter UI's can persist data (application state) for short periods of time in a manner that is really only useful for the purposes of creating a good User Experience (is this button click? is it green? etc.)
For persisting more useful data outside of the application and on the actual device, you may want to consider the Shared Preferences Plugin for Flutter.
Wraps NSUserDefaults (on iOS) and SharedPreferences (on Android),
providing a persistent store for simple data. Data is persisted to
disk automatically and asynchronously.
Now, if you require persisting data in any centralized manner (e.g. RDMS, Firebase, or any data persistence service) your options are:
Persistence options that have a Flutter plugin (e.g. Firestore, Firebase)
Build your own service layer using HTTP, gRPC that talks to some backend service that provides access to a data store. You can do this with Express, Rails, CloudFunctions, etc.
As for connecting directly to a database such as MySQL, I don't see why you couldn't do that (maybe there is some technical limitation), but this would be a very bad idea in any practical situations as (unlike Firebase/Firestore) you won't be able to protect your data store once any client application has write access.
It sounds like you need a central read/write data store, so your best bet may be to host a server that provides access to a database while exposing an API to Flutter for which you can use dart:io to make requests.
Try using sqflite. It's a package you can include in your Flutter app that allows you to persist data to the local device. You will need to use the path_provider as well. Here is the link to the repository on Github https://github.com/tekartik/sqflite

Google Analytics to Tableau - options for middleware DBMS

I work on an advanced web app that stores user activity in Google Analytics. In the current design, the information is transferred from GA to Tableau. But we need to do more filtering and data management than can be done easily with Tableau.
The obvious solution is Google Analytics BigQuery, but we are not going that route for now.
I'm considering another solution: download the results (using the GA API via Python or PHP) into a database which can then be used as a data source for Tableau. So there would be a middle DBMS in between GA and Tableau to manage the data easily.
Has anybody done this successfully? A relational database (e.g. MySQL) is simple enough, but would a NoSQL DBMS (e.g. MongoDB) be a better fit here to avoid any schema changes in the future?

Bulk loading data into MarkLogic via external RESTful services

I have series of documents that I need to migrate into MarkLogic. The documents are available to me via RESTful services in JSON. What I want to know is there anyway, such as through the MLCP or Query Console to call those RESTful services and pull in the data, otherwise I have to create a small Java app and dump the files to a share then pick them up from MarkLogic.
mlcp is designed to source data from the file system or a MarkLogic database. Take a look at the Java Client API to perform ingestion from other sources. For example, you can fire up your favorite HTTP client in Java and add the results to a DocumentWriteSet. The write set acts like a buffer, allowing you to batch requests to MarkLogic for efficiency. You can then send that DocumentWriteSet to MarkLogic with one of the DocumentManager.write() methods. Take a look at the documentation for many more details or the "Bulk Writes" section of the getting started cookbook.

Architecture tips for multi-platform software / API

I'm creating a multi-platform app, mostly for web interface, mobile and a windows application. The app will manage user task lists and sync them to the server, but also store them locally for processing data faster.
My idea of architecture until now is:
Keeping most of the processing on client side, eventually syncing with the server.
Developing an API to provide and receive data that will be saved on the server (basically just a json wrapper web service)
The data flow:
user Authenticates -> Requests updated Json objects to the server -> populate client-side objects -> work with client-side objects -> send a json object back to the server -> server updates data.
Is this a good approach? I've never done this, can you guys give me some tips?
I think you are on the right track. The idea is to decouple the front-end from the back-end. The backend shall expose a set of CRUD (Create, Read, Update, Delete) functions as RESTful JSON web services. All your different flavours of UI (mobile, web, windows) can consume the same API.
I would recommend for the web front-end to take a look at AngularJS together with bootstrap.
Regarding the backend, you could implement it as a simple Java web application with Jersey/JAX-RS or alternatively, you could check Node.js + Express.

Develop an iOS App that gets contents from a remote DB

I am developing an education app for Kids.
The application is going to contain pictures, stories and video as well.
Including all above contents in the app will surely bloat it and hence i would like store all data on a server that will be accessed by my app.
I haven't used any remote databases (like MySQL or Oracle) with any other iOS app. In fact i am a newbie in developing such kind of apps. Can any one point me to a sample
Connecting to a remote mysql is really not recommended.
The security here is critical.
You should create a webservice and my advice to you is to make sure that the access to the webservice is restricted
The webservice can be your own "protocol" or any other well known protocol like SOAP
By your own I mean, json, csv .... or whatever.
Edit 1
The technology of your webservice should be dependent on many things.
If the system is small, and the code needs to be update very often, I would suggest to do it with PHP and some small(!) MVC framework like CI.
But if its a large system with needs of ACL (access control list) I will probably choose java with spring...
I suggest that : Do not connect to / use database directly from user application. It may causes serious security problems and your app should have native SQL drivers to connect db.
So, create a web service that receive queries from the application and response in XML, JSON or some other strings that easy to parse. This will be much easier than embed native APIs into your apps.