-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bb2bf48
commit 9132339
Showing
9 changed files
with
531 additions
and
48 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# 1. 关于差量化推理管线的问题 | ||
|
||
![](../theory/nop/delta-pipeline.png) | ||
|
||
问题: **每一层为什么要设计其他层用的信息?是delta部分吗?** | ||
|
||
回答:每一层向下一层推导得到的信息只是备选的,每一层都有自己独特的诉求和抽象,这些信息并不要求都在上一层存在。通过这种方式,可以保证每一层既是独立的,有是相互关联的。独立性体现在最终控制权在本层,不会损失任何能力。可以从本层开始,完全忽略前一层推导的来的信息。每一层设计有其他层的信息这有两个原因:1. 本来各层之间就存在隐含的关系,比如数据层的类型是整数,最外层的界面层显示的时候应该是一个整数输入控件,这个信息应该可以跨层保持 2. 为了统一配置方便,一些UI层的信息虽然数据层用不上,也可以暂存在数据层。比如orm.xml中字段上可以配置`ui:show`来控制字段在增删改查哪些页面中显示。ui:show是一个扩展属性,并不是orm模型的一部分,但是作为扩展属性保存在ORM模型中,在推导过程中先是传播到XMeta模型中继续作为扩展属性,推导到XView层的时候才起作用。在Excel模型中就可以配置`ui:show`属性。 | ||
|
||
问题:`ui:show`这种扩展属性的存放规则有相应的文档吗 或者是可定制的,所以使用者也得额外规定哪些属性可以存放在上层? | ||
|
||
回答:使用者可以自由定制,额外选择哪些属性可以放在上层,但是如何向下传播是自己在代码生成器里自行控制的。Nop平台的所有DSL的所有节点缺省都允许保存扩展属性。NopORM中的实体对象同样允许保存任意扩展属性。在Nop平台中永远采用`(data, metadata)`配对设计,确保在最细的粒度处,在信息的近旁总是可以找到一个地方保存Delta信息。 | ||
|
||
问题: 这图是单向的,有没有可能是双向的。理论上,前端交互体验上的一些数据,比如微信发现页面的配置,或者输入对应的快捷键,也可能需要保存到数据库。 | ||
|
||
回答:需要区分编译期和运行时。本质上从DataModel到UiModel,这是在编译期构造的信息推导管道。在运行时,推导之后建立的运行时的信息传输管道自然是双向的。从更大的视角去考虑,对比前端Redux框架的单项数据流(数据驱动),你可以将这个推理管线看作是编译期的一种单向模型驱动。UI层如果有新的需求,那么会导致从最基础的数据模型那里可能发生修改,再传播到UI模型。如果不涉及到存储数据,则也可以导致在更高层模型修改。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# 从可逆计算看ECS架构 | ||
|
||
[游戏开发中的 ECS 框架](https://zhuanlan.zhihu.com/p/20056728243) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.