What is the best technology stack to support mobile apps and a website from the same external server?

I will have native apps for iPhone and Android, and then a mobile website (for other mobile platforms) talking with background content that controls users, settings, videos, social graphs, etc. I will also have a dynamic website with lots of videos, images and social graph management. The website will be basically a more functional version of the apps on the phones. The inner part consists of video storage, transcoding, video advertising mechanism, video sharing options with your network.

My thought is that I have to create a common application services layer that provides a RESTful api that returns JSON and has both applications and a website to talk to this api.

My question is whether I should support the website and the service level both in the same technology and using Java for the service level, and Rails or Python for the website to use their estimated faster development time. The site will have a lot of JavaScript and AJAX to support dynamic behavior. If I use Rails or Python, should they also speak REST / JSON at the service level? As far as deployment and scaling management is concerned, it seems that sticking to one technology like Java might be better for all the backs; but, on the other hand, Rails and Python promise faster development and maintenance times for the web tier. If I use Rails for the web tier, would it be wise to deploy it in JRuby in the same JVM as the service tier to have fewer moving parts to manage on the web application server?

A site can grow to millions of users and videos. The development team is experienced in Java, with some Python, but smart and can quickly learn other technologies.

Feel free to offer the technology stack of your choice.

+6
source share
1 answer

Here are some tips based on my experience:

  • create a separate API level for your JSON api. Use Spring MVC or JAX-RS there
  • you can use grails for the web interface - it combines the strengths of dynamic languages ​​like ruby ​​and python with the power of the JVM and the java stack.
  • you can use only your API from your site or expose only some of the functions through the API and use the rest inside.
  • for intercom, try not to add overhead - you can start with simple service classes (e.g. spring beans). Exposing them as web services is harmful, imo. Yes, it seems that your modules are untied, but this makes flexibility difficult. Since services have no status, they can be called from anywhere, so you can easily make them live and called in the same JVM as a grails application.
+1
source

Source: https://habr.com/ru/post/889827/


All Articles