2018年10月16日星期二

Distributed Operation

host#1'operand#1 + host#2'operand#2

+ 是1号机1号元的 operator 与其同在一号机,所以现在有2个 senses 在1号机、1个 sense 在2号机,要怎么执行这个跨机的 distributed operation ?

在2号机对1号机使用 WCF service 下这道式子会先把1号机1号元下载到2号机然后才和2号机2号元一起当作远端呼叫1号机 operator + 的 parameters 上传到1号机,1号机1号元被下载了又上传多此一举白费流量,你会说还不如传 request 给 1号机的 Web server 呼叫 Servlet 在1号机执行。但若2号机2号元的 size 大于1号机1号元与 operator + 是否就不如将 operator + 下载到2号机执行?如 Applet 的做法 ( 把 Applet 看作是一个大 operator ) 。三种架构分别,但软件在跑一下是这情况一下是那情况,这就是为何要丢掉传统架构全面采用 DDA 架构。

🤖

The cerebellar motor control has been well trained, and the brain's on-the-spot analysis of the unfamiliar environments also has to be developed. The two-legged one needs the higher balance feedback control than one with more than four legs, and the cost is higher. Although the demand of the military is the ground sneaking reptiles better than the erect humankind and even asks the joints to rotate omnidirectionally: the most perfect artificial creature is the roll ball which can extend out the omnidirectionally rotating legs, arms, and wings from the whole surface of the sphere; except the humankind can and be willing to self-modify the gene, the human-like bodies will be always needed forever. And it is not expected to connect the neural mechanical body only after the natural body is damaged, so it is necessary to redesign the axis center rotation robot to become the anexoskeleton rotation armor one like the IronMan.

2018年10月13日星期六

Sense space

  • 无论 Sense 结构如何进化,其基本都是 graphs,只要 graph 中一 node 在 memory 被 refer 到即将其第一阶链结到的 nodes 从 storage 预载到 memory,如此即确保要 refer 到的 sense 都已在 memory,因一个 sense 定是透过另一个 sense 来 refer。
  • 在 memory 中的 sense 获得更新则立即更新 storage 中的 sense ,因为还有别的 memory 在 cache 相同的 storage,所以也必须一併更新所有 cache。
  • 当 memory 满时由 rerefer 频率少的 sense 优先 release 腾出空间。

如此外界仅存取 memory 而不直接触及 storage,于是不再有 storage I/O 的观念。

而将网络另一端的 memory 也如对 storage 般对待,于是不再有 network I/O 的观念。

这机制让每一运算机皆为一镜像平行宇宙,每一空间发生的变化都会在其它所有镜像空间同步发生。但其实一个空间并装不下整个宇宙,每个空间实际上只存有局部视野所及的宇宙,是随着视野的移动来由其它平行空间载入其余局部而移出视野的局部实际会在该空间消失但前提是先确保消失的局部有存在另外任一平行空间,于是所有平行空间联集起来是为完整的宇宙。相同的事件在不同的平行空间发生都会有相同的结果镜像到所有的平行空间,但在不同的平行空间触发所花费的时间可能不同而最终成为整体的费时,所以要选择在费时最少的平行空间触发事件以获得最少的整体费时。事件由一组 Senses 构成,每个 Sense 的本尊只会存在其中一个平行空间,其余平行空间的皆为分身。无论本尊位何,所有 Senses 一列排开何者 loading 最大就优先到何者本尊所在之平行空间去进行事件的发生方能让镜像映射所费最少,再者优先选择 performance 最高、space 最大、bandwidth 最大的平行空间触发,那才是原始真实的发生,其余平行空间的皆为结果的镜像。而每一 Sense 本身又是由一群 Senses 组成,所以一件事情的发生实际上是在好几个平行宇宙分部进行再将镜像联集起来。

在任一端将 operands 接上 operators,每一端都会立即同步这个结果,然后每一端都会因为 senses 的相接起了连锁反应也就是运算被触发跑了起来,但每一端运行速度又不一,在速度不一非同步的情况下任一端的变化又会立即更新每一端,那就大乱了,所以每一端都有一个反应前的抑制措施:每一端都各自进行哪个 sense 的 body size 最大的判断,仅在最大的那个 sense 的本尊在己端的前提下才触发。这只是决定在哪端运行的初步判断,作用是让 size 小的 sense body 缓存到 size 大的本尊所在处以使传输耗费最低,进一步还要把 performance、space、bandwidth 三个因素考虑进来,所以至此尚未确定要在此端触发运行。

把 sense 给 lock 住让 operation 进入 critical session 的方式很容易发生过长时独占导致的等待甚至 dead lock,所以当要让多端同时进行同一 operation 以达验算之效时采暂时产生一个 sense 的 clone 转而对其操作之方式在整个 operation 完成后才以 clone 去更新原 sense 然后删掉 clone。

平行空间断链没同步就会分歧出不同版本的 senses,分歧的平行空间合得回来吗?Sense 原本就可以鸟生蛋、蛋生鸟对不同的 senses 进行融合:取交集为 class sense、保留差集为 instance sense,所以并不是无解的问题。

2018年10月9日星期二

operator ≡

The operator ≡ is used to define the replaceable linking state of the operators and operands dynamically like the function definition. If the operator can not be found in the hardware when it is asked to be allocated, it can be replaced with the other linking graph defined by the operator ≡. If the allocated graph is already in usage, it clones the other one for new usage.