Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Why Use Tomcat on Linux to "Talk" to Androids ?  RSS feed

 
AhFai Chan
Ranch Hand
Posts: 81
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. I don't know whether this is the right forum for it.

I am thinking of setting up a Linux or a Linux/tomcat environment to upload or download some data to Androids (API 21 and above)

The Lunux servers will be using mySQL and the Androids will be using SQLite. The volum of data is relatively small, order of magnitude in KBtyes rather than MBytes.

I was wondering why use a servet-container like Tomcat?

What advantages do I get out of the additional complexity of using Tomcat on Linux?
 
Junilu Lacar
Sheriff
Posts: 11494
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't quite understand the point of your post. It's kind of like me saying to you:

I want to communicate with my neighbors using bongo drums. My neighbors will use spoons and pots/pans. What are the advantages of me and my neighbors communicating this way?

If that seems silly to you, tell me how it's so different from what you asked.

Maybe you can clarify what you really want to do and avoid describing how (by using Tomcat) you want to do it.
 
Tim Moores
Saloon Keeper
Posts: 4035
94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need some kind of HTTP-speaking process to act as intermediary between the app and MySQL. While that doesn't have to be a servlet container (could be PHP running on top of Apache httpd), a servlet container had the advantage of being programmable in Java, so an Android developer would have the language skills to write the appropriate web services herself.
 
AhFai Chan
Ranch Hand
Posts: 81
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Moores wrote:You need some kind of HTTP-speaking process to act as intermediary between the app and MySQL. While that doesn't have to be a servlet container (could be PHP running on top of Apache httpd), a servlet container had the advantage of being programmable in Java, so an Android developer would have the language skills to write the appropriate web services herself.


Thanks.

So we can use Tomcat to talk through the HTTPS layer between a web-based application using either WiFi or a 4GL and the database server??

As I recall, and this is several years back, I implemented a servlet container that accessed three database engines, but it was very slow... Tomcat was between the applets ( talking with HTML and Javascript to the browsers ) and the database engines. Is this still a current architecture?

Thank for sharing
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66307
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Applets are obsolete.

There is no reason that server-side applications talking to databases are inherently slow.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!