Java – which is extensible? Simple crud webapp communicates with webapp and rest services

I think the title makes this clear I am not a master of scalability I'm about to create a web application that needs to scale to large datasets and may require many (not to exaggerate here, thousands) concurrent users

Mongodb is a data repository. I'm struggling to write a simple play! Webapp talk to mongodb and play! Applications talk to rest Service Applications (in scala), which can do all the heavy work of business logic and persistence

Part of me believes that wrapping business logic as a service is proof of the future and allows webapps to be deployed in multiple nodes I come from Java EE stack and play! Is a rebel in the java web framework This method assures me that I can stay away from play! If necessary

Part of me also think play! Application Scala service application is additional complexity and may not be effective in the long run

Any suggestions are appreciated

Note: I'm new to Scala, mongodb and play! Please forgive me if my question is stupid

Solution

Scalability is an engineering art This means that you have a large number of parameters and apply your experience to specific values of these parameters for a solution Therefore, general advice is difficult without more specific data on your problem

Having said that, based on experience, some general recommendations:

>Keep your application as clean and simple as possible This allows you to keep the option on In your case, start with a simple play application Focus on clean code so that you can easily modify what you have into different architectural models (use clean code, which is simpler than you think: -) > measure, not guess, where the bottleneck is It is simple enough to fill the server with requests Use analysis, memory dump, etc. to identify scalability bottlenecks

Only in this way, with the work at hand, the application (which you can start in advance) and the data about the scaling bottleneck, you can decide to split (horizontally scalable) the content of the service

From the beginning, services look good and scalable, but they often get you into trouble - services need to communicate with each other, so you start introducing messages, and so on Keep it simple, measure, optimize

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>