sujay
sujay

Reputation: 1845

Writing to remote database without using web service

i am working on a ipad app, i need to write some data to a remote online database , can i do this with out using web service,,, i need some advice,,, thanx in advance

Upvotes: 1

Views: 714

Answers (2)

Mark
Mark

Reputation: 2726

I recommend using the service Parse. Their service is built specifically to solve the iOS/Android backend problem. I just wrote a blog post about them: Parse, The Best Backend for iPhone SDK.

Upvotes: 0

djna
djna

Reputation: 55897

Technically this is possible, there are remote database drivers for the iPhone platform, for example Flipper.

However, I'd strongly recommend use some kind of "Service" to do your database access. This could be a full SOAP/HTTP WebService, a RESTful Service, or even just a little bit of php that you invoke over http or https. Don't be concerned that developing this "Service" will be lots of work, it need take no more than an hour or two. In fact with a product such as Worklight it took me literally 15 minutes using the Worklight SQL adapter. (Disclaimer I work for IBM, we recently acquired Worklight.)

There are several reasons to prefer using an intermediary service rather than direct access to the DB from the client. Here's a couple:

  1. Scalability. Each user's connection to the DB consumes server side resources, if your app is widely used then you could end up with many tens of thousands of simultaneous connections. The service approach uses Web-facing connections to the phone, using (for example) web containers designed for high numbers of concurrent sessions, and then funnels down to a few database connections. Even very busy web sites tend to use (and reuse) only a small number (a few 10s) of database connections.
  2. Security. It is strongly recommended to avoid making databases directly accessible to the internet. It's a big topic, but if the database contains any kind of valuable data then a pattern of fronting the database by a service greatly reduces vulnerability.

Upvotes: 5

Related Questions