I'm looking for a developer to create a simple 3-tier web application
Objective:
Develop a simple 3-tier rule engine application(Simple UI, API and Backend, Data) to determine user eligibility based on attributes like age, department, income, spend [login to view URL] system can use Abstract Syntax Tree (AST) to represent conditional rules and allow for dynamic creation,combination, and modification of these rules.
Data Structure:
● Define a data structure to represent the AST.
● The data structure should allow rule changes
● E,g One data structure could be Node with following fields
○ type: String indicating the node type ("operator" for AND/OR, "operand" for conditions)
○ left: Reference to another Node (left child)
○ right: Reference to another Node (right child for operators)
○ value: Optional value for operand nodes (e.g., number for comparisons)
Data Storage
● Define the choice of database for storing the above rules and application metadata
● Define the schema with samples.
Sample Rules:
● rule1 = "((age > 30 AND department = 'Sales') OR (age < 25 AND department = 'Marketing')) AND (salary > 50000 OR experience > 5)"
● rule2 = "((age > 30 AND department = 'Marketing')) AND (salary > 20000 OR experience > 5)"
API Design:
1. create_rule(rule_string): This function takes a string representing a rule (as shown in the examples) and returns a Node object representing the corresponding AST.
2. combine_rules(rules): This function takes a list of rule strings and combines them into a single AST. It should consider efficiency and minimize redundant checks. You can explore different strategies (e.g., most frequent operator heuristic). The function should return the root node of the combined AST.
3. evaluate_rule(JSON data): This function takes a JSON representing the combined rule's AST and a dictionary data containing attributes (e.g., data = {"age": 35,
"department": "Sales", "salary": 60000, "experience": 3}). The function should evaluate the rule against the provided data and return True if the user is of that cohort based on the rule, False otherwise.
Test Cases:
1. Create individual rules from the examples using create_rule and verify their AST representation.
2. Combine the example rules using combine_rules and ensure the resulting AST reflects the combined logic.
3. Implement sample JSON data and test evaluate_rule for different scenarios.
4. Explore combining additional rules and test the functionality.
I have thoroughly understood your requirements
With an extensive background in web development and proficiency in programming languages like JavaScript and Python, our team is well-equipped to tackle your project of creating a web-based rule engine with an AST. We fully comprehend and appreciate the importance of conditional rules and astute data representation, which aligns perfectly with your requirements. Given our proven experience in using Abstract Syntax Trees for dynamic creation, combination and modification of rules, we can efficiently create the robust system you're seeking.
Our proficiency doesn't end at just implementing data structures and backend logic; we also excel at designing intuitive user interfaces that offer a seamless user experience. Complying with your project's three-tier architecture, we'll create a simple yet attractive UI paired with APIs and a reliable data storage - all designed to meet your unique needs effectively. To ensure efficiency, our proposed API design strategy will leverage effective parsing mechanisms for optimizing redundant checks while combining rules.
Over the years, we have successfully built complex solutions within specific boundaries without compromising on quality or timeline despreline. With thousands of hours invested in development projects across numerous fields, we're confident that our approach aligns directly with the objectives you've outlined.
I am a skilled developer ready to create a 3-tier web application focused on determining user eligibility based on attributes such as age, department, and income. I will implement an Abstract Syntax Tree (AST) to dynamically represent and manage conditional rules. The application will include a simple UI, API, and backend data structure.
I will define an efficient AST with necessary methods for rule creation, combination, and evaluation. Additionally, I will choose an appropriate database for storing rules and application metadata, ensuring effective performance.
Looking forward to collaborating on this project!
Best regards,
Orkhan Shahverdiyev
My proposal is to assist you in developing your adventure game set on another planet, using Python for game programming, puzzle integration, and design guidance. I will provide step-by-step support with code examples, resources on game mechanics, and guidance on storytelling. Additionally, I can help you refine gameplay elements and solve technical challenges as you bring your creative vision to life.