Show HN: 如何在核心系统之外维护计算器和产品逻辑
2 分•作者: zeguru•6 个月前
我们都经历过:你构建了一个不错的计算器或产品逻辑,然后在它上线生产时庆祝一番:
- 几个月后,你却无法回答一个简单的问题,比如“为什么我们在计算毛额之前要应用 16% 的税率?”等等。
- 你无法在不重构的情况下快速调整逻辑/计算。或者需要很长时间才能简单地重新排序计算步骤。
- 更糟糕的是,只有特定的工程师或关键人物才能解释该计算器或服务逻辑的运作方式。
我们正在寻找一个简单的、低代码的规则引擎,它有一个简单的用户界面,但到目前为止,我们还没有找到一个。如果有什么更好的替代方案,请指点。
为了开始,我构建了一个轻量级的规则引擎来解决我们的问题:在不重新部署后端服务的情况下更改业务逻辑(定价、验证、状态管理)。
BaaS - 业务逻辑即服务
该引擎作为 Docker 容器运行,并评估在应用程序代码之外定义的规则。使用 REST API。目标是保持决策逻辑的明确性、可验证性,并可在技术和非技术用户之间进行讨论。
Docker Hub: <a href="https://hub.docker.com/r/zeguru/baas" rel="nofollow">https://hub.docker.com/r/zeguru/baas</a>
很乐意回答任何问题或解释设计权衡。
查看原文
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.