Win a copy of Microservices Testing (Live Project) this week in the Spring forum!

Lakshman Arun

Ranch Hand
+ Follow
since Sep 24, 2008
Cows and Likes
Cows
Total received
1
In last 30 days
0
Total given
0
Likes
Total received
3
Received in last 30 days
0
Total given
3
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Lakshman Arun

JFR is an alternative solution here
4 years ago
You can capture JFR of the application, it will shed more light in to which part of code is causing the contention, what are the threaddumps, is there any issues with memory/cpu utilisation etc.
4 years ago
Can be added methods in enum LevelRole as abstract and in each type UG/PG override it. I got your point.
4 years ago

Lyle Christine wrote:

Lakshman Arun wrote:From the problem you describe, I think of LevelRole and AttendanceRole should be part of Student Class as attributes.

LevelRole can be extended by UG class and PG Class.

Similarly attentancelevel can be extended by FullTime class and PartTime class.

Note: if the behaviour doesnt change based on the levelrole/attendencerole then think about using simple ENUM



Thanks for the reply Lakshman - if you take a look at the post above your reply, my confusion is how would set theLevelRole and AttendanceRole attributes. Is my setter method suggestion correct, and if so, what do I pass as the parameter in the setter method?



A student can be either UG or PG or in other words those are mandatory attributes without setting that , Student Object is not complete.

So should be passed thru constructor
4 years ago
4 years ago
From the problem you describe, I think of LevelRole and AttendanceRole should be part of Student Class as attributes.

LevelRole can be extended by UG class and PG Class.

Similarly attentancelevel can be extended by FullTime class and PartTime class.

Note: if the behaviour doesnt change based on the levelrole/attendencerole then think about using simple ENUM
4 years ago

Tim Moores wrote:

Lakshman Arun wrote:Is your API depends on more IO and more computation needs (complex logic), then would suggest Java, for simple rest apis Node JS is good
...
With some example, for apis like which gets product description/user review comments Node JS is a better candidate. For APIs like, getOrderTotal Java Rest is a better choice


Both these have low complexity, and low I/O and CPU needs, so I don't see much of a difference. Not that I think a complex logic argues for using one language over the other, mind you.



getOrderTotal usually wont be just fetch the value from db/order, it involves, pricing different components of order and total it. And each component(shipping/discounts/promotions/tax etc) pricing will have its own logic. Hope you get my point.

The Complexity (in this context involves more number of sub tasks/operations it needs to do), and recommend Java Over NodeJS for this usecase.
4 years ago
With some example, for apis like which gets product description/user review comments Node JS is a better candidate. For APIs like, getOrderTotal Java Rest is a better choice
4 years ago
1. Node JS is good at solving certain type of problems with its own limitations
2. Server side programming with Java is proven for many decades

Is your API depends on more IO and more computation needs (complex logic), then would suggest Java, for simple rest apis Node JS is good
4 years ago
Does it matter here whether a is smaller or larger than b?

Good catch
4 years ago
valuesRandomised size could be 26, ie it has elements from 0 to 25, not 26th
4 years ago
1. Is this for session management or Config Management
2. Can all nodes can write to cache or only master node can write and should be replicate to other nodes.
Typo PropertiesDialog class
4 years ago
How you are referring Objenesis , with fully package name or just Objenesis inside your PropertyFile class
4 years ago