黑盒交易的最佳设计模式
我正在启动一个项目,其中涉及为我的一位朋友创建的策略编写一个黑盒交易机器人,我试图思考最好的设计模式是什么。 我目前的想法是,我应该使用 Actor 模型来允许大量并发计算和信息传递。
还有其他人有什么想法吗?还是同意?
I am starting a project that involves coding a Black-Box Trading Bot for a strategy one of my friends created, and I was trying to think of what the best design pattern would be.
My current thought is that I should use the Actor model to allow for lots of concurrent calculation and information passing.
Anyone else have any ideas? Or agree?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您可能过早地寻找设计模式。假设有人说“我正在编写一个人力资源系统,我应该使用什么设计模式?”或“应收帐款”或“运输调度”。
我认为您需要首先进行一些基本的 OO 设计,然后寻找需要减少耦合的点,引入灵活性点并总体上改进您的设计。此时设计模式开始变得重要。
“我正在建造一座房子,我该使用哪种建造模式?”
“哦,你需要锤子和钉子”
过早选择图案往往会导致忽视替代方案......
I think you're probably looking for design patterns too soon. Suppose someone said "I'm writing an HR system, what design patterns should I use?" or "Accounts Receivable" or "Transport Scheduling".
I think you need to get some basic OO design in place first, then look for points where you need to decrease coupling, introduce points of flexibility and generally refine your design. At this point design patterns start to become important.
"I'm building a house, which construction patterns do I use?"
"Oh you'll need hammers and nails"
Making a choice of patterns too soon tends to lead to ignoring alternatives ...