展示HN:如何在核心系统之外维护计算器和产品逻辑
我们都经历过这样的情况:你构建了一个不错的计算器或产品逻辑,然后在它投入生产时庆祝。然而,几个月后,你却无法回答一个简单的问题,比如“为什么在计算总额之前要应用16%的税率?”等等。
- 你无法快速调整逻辑或计算,而不进行重构。或者仅仅重新排序计算步骤就需要花费很长时间。
- 更糟糕的是,只有特定的工程师或关键人员能够解释这个计算器或服务逻辑的工作原理。
我们正在寻找一个简单的低代码规则引擎,拥有简单的用户界面,但到目前为止,我们还没有找到合适的选项。如果有更好的替代方案,请指教。
为了应对这个问题,我构建了一个轻量级的规则引擎,以便在不重新部署后端服务的情况下,改变业务逻辑(定价、验证、状态管理)。
BaaS - 业务逻辑即服务
这个引擎作为一个Docker容器运行,并评估在应用代码之外定义的规则。它使用REST API。我们的目标是使决策逻辑明确、可验证,并能够在技术用户和非技术用户之间进行讨论。
Docker Hub: [https://hub.docker.com/r/zeguru/baas](https://hub.docker.com/r/zeguru/baas)
欢迎提出任何问题或解释设计权衡。
查看原文
We've all been there: You build a nice calculator or product logic then celebrate when it graduates to production:<p>- Months down the line you are unable to answer a simple question like "why are we applying 16% rate before computing the gross ?" and so on.<p>- You cant rapidly adjust the logic / calculation without refactoring. Or take too long to simply reorder the steps of the calculation.<p>- Worse case. Only a specific engineer(s) or key person can explain the workings of that calculator or service logic.<p>We are looking for a simple, low code rule engine having a simple ui and so far we have not been able to find one. Kindly point me to a better alternative if any.<p>To get going i have built a lightweight rule engine to solve our problem: changing business logic (pricing, validation, state management) without redeploying backend services.<p>BaaS - Business logic As A Service<p>The engine runs as a Docker container and evaluates rules defined outside the application code. Uses REST api. The goal is to keep decision logic explicit, verifieable and debatable between technical and non technical users.<p>Docker Hub: <a href="https://hub.docker.com/r/zeguru/baas" rel="nofollow">https://hub.docker.com/r/zeguru/baas</a><p>Happy to answer any questions or explain design tradeoffs.