Android Question Replacing PC-based http server with multiple servers on android 'terminals'

mc73

Well-Known Member
Licensed User
Longtime User
Hello everyone,

I had an idea concerning a project which contains a pc-based server and some android clients. What i want to try to do is to remove competely the server and get all individual clients to act as servers.
All of these clients are sharing the same database, so the idea is to send to other devices data updated on inserted in any one of them, probably in a cyclical manner.
Now, since these devices will most probably run for at least 16 hours a day, and there will be more than thousand db processes in each one of them having to send them to all other devices, I am wondering whether this would have a large impact on their battery consumption. If, for example, the overhead is less than 20%, it should be acceptable, but if more, I will most probably have to abandon the idea.
Anyone tried something similiar and is willing to provide a report on this subject?
 

mc73

Well-Known Member
Licensed User
Longtime User
Yes, it is important that no data will be missed. by saying 'server', you mean the pc-based one, or multiple android servers which is my intention?
 
Upvote 0

KMatle

Expert
Licensed User
Longtime User
What is your main intention on this?

My opinion: ONE server is the best solution. Get a cheap online hoster. If you want to get experiences with "no single server" (like a living cloud) why not. Problem may be to synch ALL the devices (e.g. one gets broken, others don't have a connection, etc).

You're talking about huge data traffic. What kind of data is it?
 
Upvote 0

mc73

Well-Known Member
Licensed User
Longtime User

I already have the pc-based (both with httpserver of b4j and apache), android-based and cloud based.
The thing is, I want to offer the option of no server at all, because some sellers asked me, in order to minimize costs, even if the cost of a pc server for example is small indeed.
Now, I've already prepared (in my mind) ways to solve issues like the ones you correctly describe. But before getting into coding, if for example, you tell me, "no! Jetty on your android will drain battery too fast", I will most probably stop
 
Upvote 0

KMatle

Expert
Licensed User
Longtime User
The biggest issue is to know the ip address of the other devices. And even if you know them: via www they are not addressable (the main reason for a server) via 3/4G. In a local WiFi environment maybe (opening ports) but you don't know the ip address, too. You could then think about using email to exchange the data but this is slow and not meant for huge traffic.

So you need a server. If the main reason is NOT "cost" but - let's say - privacy: think about encryption (RSA + AES).
 
Upvote 0

mc73

Well-Known Member
Licensed User
Longtime User
We are in a local network and the (static) addresses are known. In fact, I already have a routine to send data to all of them from other devices, no issue here. The thing is, I use this process only once per day, so I don't run the android servers all the time. This is why I'm having concerns about battery.
As about cost, setting up a pc server, will double the cost of this particular app for the client in many occassions. So it is something
Anyway, I'll have to get it to work and experiment on battery usage, thank you all for your time and help.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…