Anti Pattern costing Application Performance Part 1
Human have tendency of learning from there own mistakes even though they read and see others do it, they careless about it but when they face it causing them hard time they realize and tends to not make it again but I’m one of those who have been recursively making the same one again and again.
I have listed out some of the things which have cost degradation of application performance in the large scale application.
- Too many layers
- Multiple API requests
- Everything into session
- Everything as a service
- Chatty Service
Too Many Layers:
Stating in simple words, if there are large number of layers which means large number of classes which you can also assume which result effectively starting impacting on the overall performance of your application and hard for you to maintenance of your code. But, that’s also true if you see a thousands line of code in a same class if will give a heck of dizziness just to understand it and if you having hard to understand it think what will others members in your team will have understanding that crappy code.
That concludes, base on size of the application you have to layer the application which need to be thought careful with the experience teammate who might have a different thought about it and give you a better solution.
But wait, if enter application gets deployed in the same container, there is possibility of not requiring of use of multiple layer of process beans, service beans, data access objects, etc. As stated above large number of layers start adding overhead to request processing
Multiple API requests
Why do you want to do multiple API request? Is it because u are too lazy to re-modify the code which might be working fine previously and you can just add another request to the code and get it done. To me i think the similar way just add another request call and get it done if I start modify the previous code that can cost another bug to occur and again i have to correct it, Shhhu I also don’t want to get into the same recursive trouble. But we have to think of application performance too.
Multiple call for the single user request will cause round tripping that is a similar bunch of request for same data in the different time at last causing the both the client and server to take the load and making your application go slow, which u eventually will realize ones your business logic get bigger.
I will post about the rest as part 2..
Hope you guys wont be confused while trying to understand my language.