Should OCR be processed on client or on server side? - android

I am trying build an Android app which should be able to take a picture of a figure. The figure in this picture should be extracted with OCR and stored on a web service. Would it be better to do the OCR-processing on the client or on the server side?
In my opinion the advantages for the client OCR-processing outweigh the advantages of the server side processing.
Advantages of client-side OCR:
Minimum data traffic
Works offline
Faster
Can you give me any suggestions on whether the client or server-side processing is better or any points I am missing?

Have a look at this:
https://github.com/rmtheis/android-ocr
Some pros and cons when using local and remote image elaboration. I suggest to give a try to this project and find out performance. Obviously, web-server is fast and powerfull but forces users to be always on line when using your app, but as I understand your app works on-line, so is it a real problem?
A lot of Google apps, use server power to make computation of picture and voice recordings.
Moving the computation to server also allow you to make improvements to the OCR, so no need to update the app.
Good luck!

Related

How to make the server backend of a mobile app?

I am an Android developer and I want to make an app which shows users on a map and performs tasks based on their location.
The whole model of the app has to run in the server. I need an API which:
Receives user location
Performs calculations based on the location of the users
Sends response to specific users with the results
The problem is that I have 0 experience in doing server side programming.
Can you please suggest me a way of making the server?
I checked the Google Colud Platform and this video. The video addresses the connection between the app and the server, but what I really need is coding the model and deploying it on the cloud.
What is the way for me to build the API for such an app, as a developer with no server side programming experience?
Can you suggest me a tutorial which goes trough the process of building a cloud backend for a mobile app?
This is a very complex question. I don't recommend using a "ready-made" solution like FireBase because it's even harder to transform it into a "proper" API later on when you need it. If you know Android then you know Java, you'll have no problem learning working with a framework like Spring Framework which I recommend. Java on the backend needs a Java Servlet container, like Tomcat. First you should set up a development environment on your machine for this. I recommend searching for Spring Framework tutorials for this i.e. Spring Framework REST tutorials.
Secondly you'll need a database like MySql or MongoDB to store data. Spring comes with ready made connections to most of the most common databases, so its pretty easy to work with them.
When you're ready to deploy your service I recommend using a PAAS like Heroku.com where you can run your service for free first. In this way you get to control everything yourself and you also learn a useful skill.
Since you are coming from the JAVA background you just need some basic building blocks and you shall be good to go.
Use PASS: They will take any devops from your side which will be a big relief considering you are not familiar with anything on server side. I recommend using Heroku or App Engine. Here's guide to App Engine with JAVA on top. https://cloud.google.com/appengine/docs/java/
Database: Not sure how you are storing and managing your user data as of now, but if you need database, there are various of those available now. The reason Firebase is top suggestion, cause it leverages realtime and gives you control on your side without spending a lot of time on your side.
APIs: You will be taking user's geo-location and sending it to server. On server you will need to process that into a real world location and any other logic. You will need to use Google's GeoLocation and reverse geocoding APIs for that. Find apis here : https://console.cloud.google.com/apis/
Also if it's any help, App Engine and Heroku both offer free limits and should be pretty sufficient for your use case.
Since you have limited experience on server side development I'd suggest using a backend-as-a-service platform. This approach has the benefits of allowing you to focus your time coding the client where your competitive differentiators are, and lets you leverage years of experience in server-side development without having to ramp up on the technology. It also means you can iterate quickly and test features ideas with less risk.
There are several options out there, but in your case, you'll need something that provides enough flexibility to implement custom logic and a custom data model. Some platforms allow you to create a full backend application with REST api endpoints, and automatically take care of deployment, security and management. Some examples of backend service providers can be found here https://en.wikipedia.org/wiki/Mobile_backend_as_a_service.
Some of the platforms actually allow you to build a full custom app without actually writing any code, and some of them provide ready-made components (like chat, leaderboards etc) but are less flexible.
Here's a list of Backend-as-a-service providers:
https://quickblox.com/
https://www.appcelerator.com/
http://www.configure.it/
https://cloudboost.io/
http://api.shephertz.com/
https://backendless.com/
http://pipegears.com (No coding required)
You didn't provide specific details about the tasks you want to implement on the backend, but it's likely that you could satisfy your requirements with a straightforward REST api that accepts your location data, runs business logic, reads or writes from your data model and returns whatever data your client needs. (Sorry I can't get more specific without details on your requirements). If you're dealing in sensitive information like location data, I'd strongly recommend securing the api with TLS/SSL (i.e. https), or make sure the platform you use provides this.

Android service connection via JSON to MS SQL backend

I and a colleague of mine are making an Android app for a bachelor project, and are not aware of what we should use in order to connect an Android device to an MS SQL database. The possible options we have considered so far are either using MVC4, WCF or Web API. We are trying to send just a bunch of strings from the database to the Android device, but we do not have extensive knowledge about either of the fore-mentioned technologies and we are wondering what is the best way and how to go about it all. We are also not aiming at creating a webpage for the project, and thus we think that MVC might be an overkill.
Thank you and we are looking towards your thoughts about this!

Better solution to my real-time online Android game

I developed a trivia game a while back for Android that allows you to compete head-to-head against anybody in the world that is available, in real-time. This is in real time because you can see what the other player is selecting. Since I was familiar with PHP and MySQL, that is what I chose to use on the server side to handle everything. I know this can't be very efficient since the game is constantly sending/receiving information to/from the database throughout the whole round as fast as it can. This has been working pretty good for over a year now, but I really haven't had a ton of players on at the same time, and I know there has to be a better, faster, and more reliable way. I'm planning on making this a 4 player game and I know the database will be getting hammered and will be harder to keep all of the players in sync.
What would be an appropriate way to do this? Is this something for sockets? Is the method I'm using now ok for real-time play and I just need to concentrate on improving what I have?
Raw sockets need you to handle a lot of issues. Mobile networks can disconnect easily. What you are looking to develop is similar to a chat application where you send data between users. Php by default is not best suited for this.
You could build this around an XMPP server. The key is being able to send asynchronous responses to the clients. If you need more control, you could build this on frameworks like socket.io or SignalR.

system for bidirectional realtime communication between tablets and server

We are going to build a multiplayer game.
The idea is that every player has a tablet and is connected to a server.
The server should control the game logic, while the clients (the tablets) will only serve as a frontend to the game.
We need to make a decision about the frameworks/programming language we are going to use.
A crossplatform frontend would be cool, but is not mandatory. It has to run on Android devices at least.
The communication between the server and the client must be bidirectional and realtime.
We don't care about a small amount of delay.
Currently we consider an HTML5 client in combination with a javascript server (running upon nodejs) to be the best option.
The communication would be managed by the javascript library socket.io.
The HTML5 frontend can be run either in-browser or as an app (built with PhoneGap).
However we did not decide yet since we want to be sure to make the right choice.
There might be frameworks that can do a better job.
Does anyone know a better solution?
Play 2 is great for this well, but node/socket are great choices too. I would use backbone.js for the front end as it gives you a lot of flexibility and it's easy to keep the views in sync. (there is an example of such an app on my github if you're interested)

android multiplayer gam

I am trying to develop multiplayer turn based android game which will be coordinated using a remote server. I want to use couchbase nosql server with java sdk. I do not understand how data will be moved from mobile to database and back. Could you please help me ? Do I need to use jetty or tomcat ? Is there any other way ? Mostly I have worked on client side only so I am not able to figure this out.
You need to get started with socket programmming in java , the most primary thing you should know when developing a network app.
You should consider a REST-ful interface between the client and server instead of sockets, especially if it's a slow paced game (like Words with Friends or Draw Something)
The basic idea is that the mobile devices post data on various pages you have set up using a server:
http://mygame.com/mobile/api/submitMove?id=123&player=1&move=KnightA4
the server will then read the arguments, figure out if it's valid using a database, and respond back accordingly.
If you want to learn about servers and develop the server from scratch, I can relate to that BUT as a client developer it may take you a lot of time to configure, develop, test, run, host, maintain, scale the server side (and ofcourse it may cost you a great deal of money). If you are looking to release your game as quickly as possible I would propose another solution. I am from Skiller and we have SDK that should shorten the time it will take you to get your game on the market. You can use built in turn based simple API to create or join existing game, challenge players, send messages and much more...
Check our wiki pages or our Skiller website for more info.
Will be glad to get your input.

Categories

Resources