Disadvantages of a local web server on an embedded Android tablet?

I have two web applications, one is using java / tomcat / postgresql, the other is php / mysql. I need to run them offline on a tablet. Thus, I have to make a decision to rewrite them into ordinary Android apps or use them as is

.

So, do you see big flaws compared to a regular android app when installing oracle jvm, php, mysql, postgresql pre-built for shell in android root? Please note that this web app will only have one user / client.

For example, power usage or CPU usage?

As I understand it, due to the use of the loopback device, there is no power loss for 3G / LTE / Wifi. Due to php / tomcat running only during HTTP request, not much power or cpu usage?

And how to understand open sockets on a loopback device so as not to interfere with going into low power mode.

The only difference compared to a regular Android application, as I understand it, will be more significant memory usage?

+3


source to share


2 answers


Um ...

I have two web applications, one is using java / tomcat / postgresql, the other is php / mysql. I need to run them offline on a tablet. Thus, I have to make the decision to rewrite them into ordinary Android apps or use them as they are.

If you want to run something locally on your Android device, you need to make them run as an Android app. Or as part of one.

So, do you see any big drawbacks compared to a regular Android app when installing oracle jvm, php, mysql, postgresql pre-built for the shell in rooted android? Please note that this web app will only have one user / client.

If whoever is going to use this doesn't mind the huge overhead (compared to the usual capabilities of portable devices), then that's okay. However, I don't see that.



Look, I don't mean to sound rude, but who gave you such a stupid idea? (too hard not to say anything else here). The programs you mentioned are clearly not designed to run inside such a device. Some of them may need a complete overhaul to even start.

Going into details, some of these disadvantages are:

  • Increased consumption of CPU and RAM , especially RAM. And you need power to store data in RAM, so ...
  • The increase in battery consumption , due to the former. And the fact that you are actually running multiple applications instead of one.
  • One of the required technologies may (or won't) work . Android does not bring your regular Oracle Java SE VM with JIT Compillation and, like 3 garbage collectors to choose from, uses either the Dalvik VM or a new one whose name I don't remember. The default public libraries and APIs are different. Even the back-end OS doesn't bring all the binaries of the standard Linux distribution, and you need an application like BusyBox to install them.
  • You will definitely need root . Users are often discouraged from rooting their devices because they tend to end up in one way or another since they lack any active warranty. Good luck convincing them to do this, not to mention the phrase "free gems for Clash Royale" at least once.
  • These technologies are designed to be used by multiple users . What's the point of going full client / server if only one user will be using the server?

Plus, you have Java, C and SQLite at your disposal, all out of the box and properly optimized for use on mobile devices. Why not use this in a mobile app?

Finally, I'm not saying that what you mean is impossible, because technically it should be possible, but is it worth the effort?

+2


source


Honestly, for the effort you will need to use to root the device, install the required services / software and then maintain it, it would be much better to rewrite it as an Android app, or perhaps use something like cordova. This has the added benefit of making it easier to deploy multiple devices when needed.



+2


source







All Articles