How can I estimate server costs for creating an app? - android

Im writing up a business plan and im having some trouble with the finance part. I put an estimate on the cost of developers, web designers and everything but server costs. Im not a programmer so I dont know all the details. But how much would you think servers are going to cost for a complex app. I cant get into too many details but it keeps track of user preferences, stores data about the user and there is quite alot of back-end to it.

As i said in my response to your comment to #mark; this is a tough question as we don't know enough to make good predictions. To help you make your own predictions
As its only a business plan (i.e. not set in stone) think of a number of users that you want to run on a given piece of hardware - for the data / web servers.
Be aggressive but in the real world as the developers will have to code to make this target and make that part of the spec for the software - 200 concurrent users on a web server for example and that 10 web servers needs a dual core xeon database server or whatever the app needs.
Then you can plot a graph of expansion as it goes; they tend not to be linear so have a lying weasel factor to handle that that rolls the graph off as you go.
Then don't forget about backup, load balancers, firewalls, content managers, caching proxies and all the other network kit you will need.
You will also need to budget for someone to run it all... If its a web app probably 3 to handle it in shifts. Either that or make sure your IT people are the most dedicated so that the servers get restarted in the night when it all goes wrong.
Finally ... Does the system need DR? if so that will need to be included.

It really depends upon the complexity of the app, how much traffic you expect and what platform you need. The real cost is in the time managing the thing.
I would consider amazon aws (http://aws.amazon.com/ec2/pricing/). There's even a free level to get started.
They have system images prebuilt, free and purchasable, that might have the configuration you'll need. You can use one to build an image of your own and deploy it to many servers quite easily if your app takes off.

This heavily depends on the numbers of users that concurrently use your service and of course how much traffic you will have. Without more details it is not possible to estimate any costs.
Edit:
Possibly it is the best if you sit down with a developer, explain her/him what you want to do. There is a good calculation program from amazon webservices (cloud).
You can find it here: http://calculator.s3.amazonaws.com/calc5.html
For example if you would need 5 Linux CPU medium instances for one year + Load Balancers (they will spread the load to the instances) + Traffic (50000GB out + 500GB in) (per user out 1GB/month + in 100MB/month)
This would be all together a One-Time payment $2275 and monthly $7101
http://calculator.s3.amazonaws.com/calc5.html?key=calc-DE0DC116-63C1-440E-BE15-213263DC4E2B
But this is a too complex question to rely only on guesses. The advantage of Amazon AWS is, that you can grow with the application. Perhaps it would be the best to start small and see what you will need.

Take a look at the Dell, IBM or HP sites, say, and see if they quote rough figures. Compare with the cost for services like Amazon's EC2, or Microsoft's Azure. It's impossible to tell you what you need, without knowing what you're actually doing.

Related

Android multithreading logic behing a speed test

I'm currently designing a speed test app that obviously includes Ping, Download & Upload tests among others.
I already developed the logic behind the multithreaded tests so I can define create as many threads as I need for each test, being able to set multiple connections to avoid throttling for high speeds or unstable networks and having more precise results.
I'm not currently asking for code but I'm asking for the logic behind of the number of threads to use for each test for every network type and available bandwidth.
As a piece of additional information, my download test uses https connections and the upload test uses socket connections. Any required additional information, please let me know.
I've tried research about that but the only thing I could find is that Ookla Speedtest (browser version) uses 4 threads if the speed is at least 4Mbps and 2 threads on lower but browser multithreading limitations are different than the ones we have in Android apps. -> Link
I don't expect that someone gives me the exact logic behind this but it would be really useful if I could be pointed in the right direction. Any article, post, book, resource about the topic would be much appreciated.

What are the best practices for consuming several API's in Android

I was hoping someone could help me with a question I have.
If I want to consume data from several API's in android (they are checked once a day for changes) and then I combine all of the data and do something with it, what would be the best way to do this from a resource and memory point of view ?
An example would be getting bus timetables from several bus companies operating in a city and then showing what busses are leaving in the next hour for example, that is relative to your location.
I do know how to consume Rest API's in Android, I am just wondering if there is a better way than calling say 20 API's once a day and storing the data ?
If I have not explained the question well enough please feel free to ask me anything and I will try and explain it better.
Thanks in advance.
I think you should make a few question about your solution.
Does your solution require the access to 20 different api's and the mobile app will be distributed in more than one user? If the answer is YES then you need a backend. The backend will execute a batch process to access the data from the 20 sources, consolidate the information and will be available for as many client devices require that information.
If the information will be not updated, you can make one call per day to the backend and keep it cached on the device.
If your app get more complex, could even receive notifications about changes on the data so it could update it.
Hope it helps.

Android application backend

I want to make an android application which will display an external message (For example: some quotes, proverbs etc) daily.
The message should be retrieved from some place other than the client device and I would like to configure the messages from back end
These messages should also change everyday.
How should the back end be and how can the android application retrieve the configured message ?
Do I need a server at the back end for the same or can avail some cloud services for the same ?
What is the best approach to do?
If you want to avoid having to set up and manage a server on the backend yourself you can take a look at a 'backend as a service' offering.
Two example candidates are:
https://parse.com
http://aws.amazon.com/lambda/
Both Parse and Amazon provide SDK's to allow you interact with the backend from your Android app.
You will likely want to study this a little to decide if you want this type of solution or to build your own server as Brian suggests - I think there are pros and cons to each approach and you'll have to choose which is best for your case.
Yes, you will need a server. You can start building the server software on the same machine as your Android emulator and create them in parallel. You'll need to choose a language and most likely a web server framework that suits your thought process and style.
If you want to use REST, for instance, google some for "best REST server framework". You will get hundreds of answers that don't mean much, but look at the communities that surround the frameworks that come back. Look at the user lists and how many questions about it exist on this site. That will give you a better idea of whether you can ask questions and get answers when they arise. You are making an investment by learning a framework, spend a little time deciding which one you are going to use, possibly by trying a few of them for a very simple site that returns the kind of data you are looking for.
Other than that, you really need to ask specific questions once you've chosen a language and a framework. Hope that helps.

How much effort do I put in my security for Android In App Billing?

I implemented In app Billing in my Android application. I pretty much followed the sample (Dungeon) application to get it working. It seems to be functioning fine as of now. I now need to decide how much effort I should put into the Security portion.
I do have a server that I could use to implement the Security.java stuff. I also am currently using the standard PurchaseDatabase implementation.
As of right now I am thinking of just encrypting the .db file with a device specific key, and leaving Security.java alone.
My thinking is that my app is a pretty niche app, and I am not expecting a lot of hacking on it. If there are some people that put in the effort to save a couple bucks (each item to be purchased will only be $1), so be it.
I guess I am looking for opinions on what other people think about this...it seems there is no 100% secure implementation...just implementations that make the hacking not worth the effort. Have other people seen a lot of hacking of In App Purchases?
You got it right: you don't need to implement very complex protection features, you need to implement protection features that take too much time to be found and removed Here's a video from Google I/O 2011 about techniques to reduce "leechers": http://www.youtube.com/watch?v=TnSNCXR9fbY, I thoroughly recommend it. Some techniques you may want to try are:
use LVL;
obfuscate code;
call LVL at random times from a background thread;
insert license checks mixed with normal code;;
CRC code files;
be industrious: use reflection in JNI to check signatures;
encrypt core libraries/resources and load them on the fly.
Some of these techniques are very simple, other require a non negligible effort. The best recommendation is to be creative, hide checks where crackers do not expect them.
Another important point is to make your application degrade gracefully if you suspect piracy. For example, don't throw an "invalid license" because your license check needs network access on application start; instead, store somewhere a "valid for two months" token and randomly update it. Check it after a random number of days (say, a random integer in the 30-60 days range). Customers won't notice this check and it is hard to crack because it will not be apparent after a lot of time, much more time than crackers are willing to spend on a single application.

Android platform, can I meet those requirements?

Folks, I'm trying to see if my plan realistic at all. I'm ne to
Android platform but not new to software development. This is my first
post here as well :)
We want (in our company) to create Android software to compliment our
truck management software. Basically, it will do couple very specific
tasks.
a. Send GPS updates to server.
b. Receive trip information.
c. Send pickup/delivery confirmation to server.
After evaluationg i. platform and Windows phone 7 platform we came to
conclusion that only Android has multitasking that works for us. So,
Android it is but I have some specific questions.
Data plan we want to use will be very limited. Probably 5M/mo and
no voice/text. I figured 5x1024x1024 = 5242280 bytes will give me 1k
per transmission every 15 minutes (3000 transmissions per mo). It will
leave 2M for other stuff that will happens every couple of days. Does
my math look OK or there is lot of "waste" traffic? Our server going
to be XML SOAP and messages sent will be just Lon/Lat in XML package.
1K will be OK? If I just calculate bytes it will be even less but I
wonder if there is "minimum" packet size, etc. Any insight on this
data limitation appreciated.
Because of #1 we need to "lock" device somehow so there is no other
software that uses network. Possible? If so, what do I need to look
for? I found already created app - firewall and it says phone has to
be rooted for that.
Receiving trip information. What's the best way to accomplish that
given my situation? Should I run some kind of listener? Will my phone
have IP address or something? Or should I get small text plan and use
that for this specific functionality? Can I receive text message in my
own application?
So, as you see we trying to shrink $80/mo service to $15/mo service
that will do big savings to our company but not sure if it's all
possible with constraints we have. Also, we may just give discounts to
drivers who have Android phone and will install our app but we don't
count on that.
Thank you in advance for any help on this subject.
UPDATE:
Now that I think about it - limited data plan present challenges initially but actually helps us do it "right" to make sure we don't overload server with constant polls. What I really like to see is some real-worls experience with data usage. Problem is, to us to even come up with test app - will require considerable effort. Would be much better to rule this out right now if it won't work. For example, if I knew that message size 2k no matter how big of a message itslef - then I would know immediately that it won't work for us..
If you have a very limited kind of data that you are transferring, the overhead of xml might be unnecessary. Instead, pass .csv data to different endpoints dependent upon the data that your are transfering (one endpoint for lat/lon, another for pickup/delivery confirmation)
You do have an ip address on each device, but you're not necessarily going to know that information - it's not constant, or consistent (it can change as the phone moves around). Instead, do a timed polling of the server (that would make your 3rd endpoint) See other mentioned solution of triggering on SMS.
As far as locking the device, I'm not sure about this, but it certainly seems feasible (though it's not consistent with your 'discounts to drivers who have Android phone'. I understand why, but if the phone has no voice/text capability, it's not likely that the phone will be used by the drivers for much besides it's expected purpose.
You are not going to achieve this with a default Android ROM in other words you have to create your own customized ROM from scratch and deactivate quite some stuff in order to get your devices not to use up the 5M/Month.
You can checkout the developers site on the Android source code to check out if that would be an option for you. Giving discounts to drivers owning an Android phone sounds nice and all but I'm quite certain that this is not going to get the desired results which I guess are that you equip all your trucks with such a device and track all of them.
In my opinion it is not going to work with a data plan of 5M/Month but on the other hand I don't know the data consumption numbers without testing.
UPDATE: Also I would not go with XML but with JSON due to overhead.
When you upload a GPS update, have the server reply with any of the trip data you need to push down to the phone at that time.
I think that for the data traffic (the other topics that you asked about are already solved in the other answers) using a bitmask-like solution will be the best option, first bits are for lat, the next for lon, and then some bitmask for the flags, and sending text data only if it is necessary.

Categories

Resources