Android app backend design - android

I have experience handling with database and web services such an API.
Now, my idea is to have some images stored on the server and in-app the user can list/view all of them and then choose one to customize.
After some research on the subject I found that one of the best approach is to have the files itself served as static content using an HTTP server and an API to serve all the remaining information including the static URL to the image.
I'm thinking of using Node.js for the backend and a database such mongoDB.
As this solution may seem good in a web-only environment and I'm not sure if it is on a mobile one.
So my question is: is this a good approach for a mobile + backend solution or there is something else I could try related to the protocol + architecture design for the communications between the client and server.

For my app I'm using Node.js for the backend as well since it's
fast
ideal for data-heavy websites and apps
useful to build APIs
You are on the right way, but if you just want to serve images or data you can also check Firebase which is provided by Google. There are much more you can do with it.
Check this https://firebase.google.com/
It's free. So you don't need to pay for a virtual server, but it's limited.
See also this https://firebase.google.com/pricing/

Related

How does a geolocator work?

I need to develop an Android app which is basically a geolocator, allowing people to reach each other via Google maps. All being said, I don't know how do I accomplish such thing since I don't know how it does work and if I need a server or database on the way. I'd be grateful if anyone could shed some light on this topic.
As you said you will need Android application and Server through which Android clients will communicate.
Android Application
will be getting data of other Android devices from server and then showing those data on the screen
will be periodically sending own location to the server
Server
is responsible for storing geolocation of Android clients, data can be stored in some database or memory of the server, depends on the use case, how long you need to have those data, how important they are, etc.
is responsible for sending stored geolocation data to Android clients
you have various options, you can write your own server in whatever technology you wish - it can be PHP server, NodeJS server, Java server... or you will use some serverless solution. Check for example
https://firebase.google.com
has to be hosted somewhere, you have many options:
there are "traditional" hosting providers, where you are usually limited by technologies you can use, for example you can just use PHP or you will use products from Heroku or Amazon AWS.. there is more, Microsoft has Microsoft Azure or Redhat has Openshift.. There are differences in prices, services, etc., it is up to you to look and decide what is the best for you.
I for sure missed lot of things. It is not in my power to describe every possible corner case because the question is too broad but rather provide you with higher overview of the problem and possibly point you where to go next. I suggest to you to read more about problematic and then get back with more specific issues to solve.

How to set up a server for android app?

I am trying to create an android application in which an user will pretty save some data in database-like user data, photos and also be able to retrieve.
But I am clueless how to set up a server, connect to some database etc.
Can somebody help me point to right resources for end-to-end installation of server, database, and its interaction with the android application
Just set up a basic server that works over HTTP, and use HTTP libraries for android to make requests and handle results in the device. There are plenty of technologies with which you could make the server, just google building REST API with PHP/.net/java (whichever language you are comfortable with).
If you are mobile app developer and want to create server-client app then better use any back-end service rather than implementing new by own. Some most advanced and simple to use services are Parse and Firebase , BaasBox also there are many more.
And the plus point is this services free of cost until you have very large users.

Can I create an Android app similar to a dynamic client server web application?

I am new to Android and taking the risk of doing a final year project of building an Android app. I would like to know whether I can create Client-server architecture application in Android. I'd like the front end to be the mobile app. Also, where do you store data (I don't know where to store data exactly) at back end.
Use Restful web Services with json(Ex: WCF in the backend with Sql Server)
For Mobile App, These are useful tutorials http://developer.android.com/training/index.html,
http://www.vogella.com/tutorials/android.html.
Very many, if not most, existing Android apps retrieve data over the Internet and display it (e.g. the StackExchange, Yelp, or Facebook apps). They are clients requesting data from servers and therefore fit into the definition of being “client/server”. I'm hard-pressed to think of an app on my phone that isn't a client to some kind of web service.
If, as your question suggests, you are using HTTP for client/server communication, there is no reason why the client platform (Android) should have any impact whatsoever on the server-side implementation. In the wild, Android clients are served by servers implemented with every conceivable combination of OS, language, and database. Therefore “where do you store data?” is an unanswerable question, as the answer depends entirely on implementation choices that you make on the server side.

Easiest secure Android server backend

I have an Android game and I want it to store data - say a high score for example - against each user on a server backend.
Here's a list of outrageously demanding requirements! It's unlikely any solution can meet all these demands, so I've changed/prioritised them:
Minimum/very easy server and client code
Free/cheap
Automatically scalable and no/little server maintenance
As secure as possible with minimum code
Seamless - no user action required to authorise/choose anything
I know about Parse, and that seems the easiest option but I'm concerned about the future cost and would prefer more control so I'd like some alternatives.
AWS seems a lot of effort, although it handles secure anonymous authentication fairly easily and well.
App Engine would be great if there was an easy way to secure requests without requiring the user to login or authorise app engine.
So... I want the seamlessness of Parse, the security of AWS, and the auto-scaling of App Engine. Also the ease of use/coding of Parse. Fingers Crossed. :)
Thanks
My advice: use Parse, but create enough abstraction/encapsulation in your models so that swapping Parse out for another service won't be so painful. But seriously, I don't think Parse will get expensive (or even not-free) until your app is seeing very high demand. Furthermore, the Parse guys seems pretty committed to openness: you can export your data as a CSV and they have a REST API so any type of program you write can access the data.
If you're determined to roll your own, I'd recommend creating a Rails back-end with Heroku. Piggyback SSL is free, HTTP Basic Auth is really easy in Rails, and the entire stack will play nicely with whatever db you'd want to use (I'm assuming NoSQL since you want flexibility).
Any PaaS that supports SSL and a dataabse will probably do. Estimate your traffic, data storage and processing needs and pick one that is cheap enough to get started. App Engine is going out of beta soon, and the pricing model will be changed, so if you want autoscaling you'll have to pay for it.
What exactly is 'secure anonymous authentication' and how does AWS support it?

Server for mobile and web applications

I'm planning on constructing a large application. It will have a browser based interface along with a mobile application interface (iOS, Android, blackberry).
I would like to be able to push data from the server onto these interfaces, and there will be a lot of data being sent from the mobile apps back to the server. So my question is what kind of server am I looking to build.
I'm a PHP developer mainly, though I can write in Java and have dabbled in others. I'm fine with learning a new language. My thoughts as a PHP developer is that I could just build a PHP application and use it's API to power the other interfaces.
However there will be a lot of data moving around and I don't feel like PHP would be the best base for this really. So I'm exploring alternatives. Any thoughts on where to start with this?
you can use a framework like Rhomobile's Rhodes that generates your browser based clients and they also offer a server component: http://rhomobile.com/products/rhosync/
Common practice would be to separate out the backend functionality between different servers.
Server 1: serve up your static content
Server 2: serve up your dynamically generated content (things based on queries that require IO such as DB interaction
Server 3: dedicated realtime infrastructure for the realtime push functionality
Server 1 & 2 could probably be the same server for now but I'd recommend having a dedicated realtime server. Communication between servers is normally done with some sort of message queue although web service calls are also an option.
My area of interest is realtime push so here's a bit more information on that. If you want to stick with PHP there's the phpwebsocket project. If you want to look at Java then there's [WaterSpout}(http://www.spoutserver.com/), jwebsocket and Jetty which has been around for a while and is (or was the last time I checked) used by the Twitter Streaming API.
There are more options for the realtime component of your solution on this Realtime technologies guide which I'm maintaining.

Categories

Resources