First Thank you so much for your great video. Second, I think this is nothing but polymorphism, you don't need to filter or match on anything, the JVM will understand what method it will execute based on the type of the POJO. Rule engines are mostly created to ensure the flexibility of rules regardless of the object types. in other words, adding more rules should be decoupled from the core code. Thank you.
If possible can you please make a video on how frameworks will scan all the annotations that exist in the application at runtime(dynamically) in a cleaner way. I want to whether they will cache this annotation metadata or they will scan entire application on demand
What if instead of changing just one property in the rule we need to change doZens of properties? Should we implement a rule engine in each rule of the main rule engine?
If you have 200 rules, create a singleton of implementation and load it as Map with Key as rule name and value as implementation object. Based on the rule to be used at runtime, you can load the rule from Map. This is in-memory storage but you need rules across multiple servers then one can go for external cache e.g. Redis. Does it answer your question?
@@konstantinthekonstantin example is use hashmaps Rule 1 key = addition and value is addition object which implements rules interface and has method calculate. This rules does the addition Rule 2 key = multiply and value is multiply object which implements rules interface and has method calculate. This rules does the multiplication. You can use runtime polymorphism to get the object using interface as reference
Great video and explanation. Is there a way to externalize the rules? (declarative way) so that no coding/compiling/deployment would be needed to add new rule. (rule can come from config/csv etc..like Drool) Any suggestions? I am wondering if to go for Drool or use Java Generics
A very poor example of a rule engine. Rule engine is a much complex topic where you can have 100's of rules and each rule can have a chain of conditions. For example: Find me a version 6 of an android that is 2nd hand and under 500$. This example won't even scale and is poor engineering. It should only be used to understand generics rather than a rule engine.
After watching this video i have implement this in 2 big projects. Thanks you very much for this video.
Awesome content, a intro to Drool and Spring Statemachine would be cool
First Thank you so much for your great video. Second, I think this is nothing but polymorphism, you don't need to filter or match on anything, the JVM will understand what method it will execute based on the type of the POJO. Rule engines are mostly created to ensure the flexibility of rules regardless of the object types. in other words, adding more rules should be decoupled from the core code. Thank you.
If possible can you please make a video on how frameworks will scan all the annotations that exist in the application at runtime(dynamically) in a cleaner way.
I want to whether they will cache this annotation metadata or they will scan entire application on demand
Just a thought.. iPhoneRule and AndroidPhoneRule naming would have been less confusing as they're implementing RuleI
It would be nice to get the update for that
very good explanation..
Could you present a video on Clara Rule engine
Is it same as factory or statergy design pattern but just skiping if else part?
What if instead of changing just one property in the rule we need to change doZens of properties? Should we implement a rule engine in each rule of the main rule engine?
Nice, thanks!
What is the significance of process() API why is it used?
Can we create a new Instance and pass?
Good job, can you create a rate engine example?
And whats the best design patterns to use with rule engine?
but does it comply with SOLID principles?
Hi, have you stopped designing architecture for any app..
You have deleted paytm design app also
No mate. Will upload with much cleaner solutions.
Tech Primers great.
👍 thank you
waiting for it
Hi can you do a session about Drools with Spring Boot
Llooking for Rules engine with configurable way which is supports a spring boot way.
bro can you tell which ide you use
It's IntelliJ IDEA
And it rocks
Good explanation .. if I have 200 rules , 200 interface and implementation ? Can you share your thoughts to overcome from this please please please?
If you have 200 rules, create a singleton of implementation and load it as Map with Key as rule name and value as implementation object. Based on the rule to be used at runtime, you can load the rule from Map. This is in-memory storage but you need rules across multiple servers then one can go for external cache e.g. Redis. Does it answer your question?
Makarand Parab thank you very much sir . Appreciated .
@@Makarand76 Hello! Could you please provide a simple example of this? I would be extremely appreciated
.
@@konstantinthekonstantin example is use hashmaps
Rule 1 key = addition and value is addition object which implements rules interface and has method calculate. This rules does the addition
Rule 2 key = multiply and value is multiply object which implements rules interface and has method calculate. This rules does the multiplication.
You can use runtime polymorphism to get the object using interface as reference
@@Makarand76 Thanks a lot!
Nice video broi
Good video !!
Great video and explanation.
Is there a way to externalize the rules? (declarative way) so that no coding/compiling/deployment would be needed to add new rule. (rule can come from config/csv etc..like Drool)
Any suggestions? I am wondering if to go for Drool or use Java Generics
A very poor example of a rule engine. Rule engine is a much complex topic where you can have 100's of rules and each rule can have a chain of conditions. For example: Find me a version 6 of an android that is 2nd hand and under 500$.
This example won't even scale and is poor engineering. It should only be used to understand generics rather than a rule engine.