Lakshman Arun

Ranch Hand
+ Follow
since Sep 24, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Lakshman Arun

JFR is an alternative solution here
6 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.
6 years ago
Can be added methods in enum LevelRole as abstract and in each type UG/PG override it. I got your point.
6 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
6 years ago
6 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
6 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.
6 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
6 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
6 years ago
Does it matter here whether a is smaller or larger than b?

Good catch
6 years ago
valuesRandomised size could be 26, ie it has elements from 0 to 25, not 26th
6 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
6 years ago
How you are referring Objenesis , with fully package name or just Objenesis inside your PropertyFile class
6 years ago