views:

85

answers:

1
+1  Q: 

I-Jetty or Jetty

I have a web application to be hosted on android device. I am currently using the emulator available with android sdk. My application will serve both static as well as dynamic data. I am currently using jetty version 6.1.22. I wanted to ask what will be a better option to be used. 1. Jetty webserver with stripped off code. 2. I-Jetty.

My application uses following features-

  • ResourceHandler to serve static resources.
  • A Generic servlet to serve synchronous data requests.
  • An extension to CometServlet to serve asynchronous data requests.

I am looking forward to following criteria for comparison.

  • Application size. Size of apk which will contain the code.
  • Memory and CPU usage under a maximum load of 30 requests/sec. These are short bursts which occur very few times in app-life cycle. The average load would be approximately 5 requests/sec.
  • Ease of maintenance. Including important upgrades of Jetty in application.
  • Any other side-effects which I probably am missing out at.
+1  A: 

I have a web application to be hosted on android device.

Why? It won't be usable, except maybe on a WiFi LAN. It won't be able to run terribly long, because services cannot run forever. Etc.

Whatever technical problem you think you're solving by using a Web server on Android can be better solved by other means.

I wanted to ask what will be a better option to be used. 1. Jetty webserver with stripped off code. 2. I-Jetty.

Arguably "neither", not only due to the technical issues, but that Greg Wilkins (creator of Jetty) does not like Android much. Of the two, though, i-jetty is at least regularly tested on Android.

Memory and CPU usage under a maximum load of 30 requests/sec. These are short bursts which occur very few times in app-life cycle. The average load would be approximately 5 requests/sec.

While running, battery life will suck, because you are going to keep the CPU and WiFi running all of the time to support the Web server, let alone the load.

CommonsWare
"Whatever technical problem you think you're solving by using a Web server on Android can be better solved by other means." Can you help me point to few of these.Keeping battery life out of discussion, can you throw some light on other aspects. This basically is a device which runs on continuous power supply.
Tushar Tarkas
@Tushar Tarkas: "Can you help me point to few of these." No, because I don't know what the technical problem is you think you're solving by using a Web server on Android.
CommonsWare