Search code examples
javaangularspring-bootsoadatabase-performance

Angular and Database hitting from performance point of view


I'm a beginner in Angular 2 and in my new project the structure that we will follow is SOA software design ; that the backend will be in Java (Spring Boot Framework) and the Front end will be in Angular 2 .

Now i have a big question before starting this project , the way we will follow is building a channel of web services and make them as a contract or hand shaking between Java and Angular , so my question is : Is there any issue related to performance on hitting the database every time i will make any validation on UI and rely on Database data?

I'm afraid of side effects on system performance In term of Database crashing or going down or network delay time because of huge number of hitting database in order to make simple validation passing through 2 layers the web services layer and the Model layer .

And if i can start with good guide line to avoid these issues , What are best practices to avoid these issues regardless hardware power ?


Solution

  • The question is very general and the answer only depends on the application requirements, the hardware you have, networks speed and of course the way you implement the app.

    In most of the cases it is ok to do some validations on a request. Even if the requests are passed through a pipe of web services DB interaction usually consumes most of the time. Passing/converting objects through service levels consumes much less time and resources.

    On the other hand if you run web services in different networks and pass huge number of requests the network might be the bottle neck.

    But in fact we can only guess your preconditions.