Design and implement a flexible event recommendation engine in Java.
You are given domain objects such as Event, Customer, Inventory, and a LocationService. Build a campaign-driven recommendation system that selects events for a user without hard-coding each campaign as a separate chain of if/else logic.
The system should support reusable and composable rules such as:
-
events within a configurable radius of the user's home location
-
events in nearby metro areas
-
events priced below a configurable threshold
-
events happening this weekend
-
events happening within the next
N
days
-
a fallback strategy so the user still receives some recommendation if strict filters return no results
A campaign should be able to combine these behaviors in different ways. For example, one campaign might prioritize nearby low-cost weekend events, while another might use a broader 30-day window with a less strict location rule.
Describe the classes, interfaces, and evaluation flow you would implement so that:
-
new rules can be added without changing existing campaign logic,
-
campaigns can reuse and compose rules,
-
ranking and fallback behavior are configurable, and
-
experimental signals such as weather, seasonality, or hometown-artist preference can be introduced later.