Take the 2-minute tour ×

I am trying to develop a clients-server distributed system. Clients will be running in iOS while I would like to use java for the backend part.

I would like to write some API, since I am in a mobile environment and I cant predict how many clients are going to ask my service, what kind of BaaS do you advice?

It is not needed to maintain an open connection with TCP, I would like to avoid useless battery wasting. I need to use SSL for some API call and use the HTTP 1.1 layer instead that the TCP one will help me a lot. I would like to use JSON as output.

Are there ready made frameworks (java-iOS) that I can use in order to achieve this goal, or libraries that you can advice? How would you setup everything in order to have an heartbeat mechanism iOS side (so I can keep track of all the clients server side) and answer appropriately. Server side what is the most suitable JBoss or Glassfish? I have heard about the reactor pattern, is there something from where I can start in java?

I really thank you!


share|improve this question

1 Answer 1

It is quite easy to implement a RESTful API in java. There is a specification for that - jax-rs. There are several libraries that implement it - Jersey is the reference implementation, but there are others as well. For server - I would go for Tomcat or Jetty. Unless you use EJBs (which I don't think you really want to), there is no reason to use an application server like Glassfish or JBoss.

share|improve this answer
I really thank you Amir, do you think Tomcat will be enough? Don't I need EJB stateful in order to maintain the connection alive among clients and server? thanks –  user2179694 Apr 21 '13 at 15:48
I've seen very complex projects based on Tomcat. It's free and it's fast. As for Stateful EJBs - you can do without them. You can manage sessions by HTTP sessions or by using cache. Don't go into the EJB trap. Keep things simple! –  Amir Kost Apr 21 '13 at 18:53

Your Answer


