I read using threads causes overhead, performance and scalability issues. It is efficient if there are a limited number of clients. So I think using java.nio would be the best option. Any example that shows handling the HTTP methods without blocking.
On Monday, December 17, 2012 7:06:00 PM UTC+2, Kristopher Micinski wrote: > > On Mon, Dec 17, 2012 at 6:35 AM, Archana > <ramalinga...@gmail.com<javascript:>> > wrote: > > Hi, > > > > Is it like having separate thread for each request(GET/POST/DELETE) ? > Can > > you please explain? I was also thinking of AsyncTask, message queue or > > multithreading. > > > > Thanks! > > Basically, those are all equivalent... > > AsyncTask is using a thread pool under the hood, a message queue will > probably be a key step in using multi threading also. > > One nice thing about these requests is that handling them typically > doesn't involve much cross communication between requests: as long as > you can serialize on transactions through "shared" pieces of the app. > E.g., if you have a GET request which grabs some information from a > database, you can spawn a thread to get the info from the different > tables and amalgamate it. If you subsequently get a DELETE you can > delete all the required information. One key thing here will be to > think about transactions if you have more complex SQL statements. > (Single queries are implicitly wrapped in transactions anyway, by > sqlite, iirc...) > > There is nothing specific to Android here though, > > kris > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en