Skip to content

Instantly share code, notes, and snippets.

@ndzj081221130
Created April 2, 2014 02:46
Show Gist options
  • Save ndzj081221130/9927149 to your computer and use it in GitHub Desktop.
Save ndzj081221130/9927149 to your computer and use it in GitHub Desktop.
2014_3_31CF的动态更新
首先,app的静态依赖是通过苏萍的插入代码获得的,通过苏萍的插入代码,
app在运行过程中,会给某个端口发送消息?
String fieldName = "_txLifecycleMgr";
String fieldDesc = "Lcn/edu/nju/moon/conup/spi/tx/TxLifecycleManager;";
苏萍插入的代码,需要根据TxLifecycleManager对象,
生成对应的事务生命周期管理器。
插入一个filed和一个方法
insert field TxLifecycleManager and the method setTxLifecycleManager for
* generating transaction id; public void
* setTxLifecycleManager(TxLifecycleManager tlm){ txLifecycleMgr = tlm; }
*
----------
beginAnalyze(tempFile, "Lcn/edu/nju/moon/conup/spi/datamodel/**ConupTransaction**;","Lorg/oasisopen/sca/annotation/**Reference**;");
analyzeApplication具体做了什么?
analyzeSource和analyzeJar,调用beginAnalyze
如果有@ConupTransaction标记,那么需要analyze
----------
现在,我们需要对@ConupTransaction和@Reference标记进行。。。。
插入代码的工作,通过processor中的Analyze方法,搞定,只需要生成一个UUID就可以了。还有一个
getComponentIdentifier.
当程序运行字节码的时候,会调用LDDM。
某个方法开始时,会notify一个start,结束时,会notify一个""
这个时候,我只需要向DEA发送这些消息即可。
----------
要将具体的动态更新过程移植到CF层,主要是DEA和router?
包括setup,valid,update,等。
当DEA收到update请求时,DEA根据当前节点的运行状态,来ondemand_setup,比如说通知相关节点。
DEA如何去维护这些依赖信息呢???
每个DEA上,当前运行的App应该只有一个吧?
当DEA收到ondemand请求、或者update请求时,DEA进行ondemand setup
在DEA instance中,维护一个数据结构。
App会定期给DEA发送其
----------
至于事务的概念,如果Proc|DEA1 调用了 Auth|DEA2 , 那么更新Auth时,
会先通知Proc进行ondemand setup,
如果更新过程中,有事务的存在,那么可能会出现future_ondemand_setup和past_ondemand_setup/
sub_future_ondemand和sub_past_ondemand.
> Written with [StackEdit](https://stackedit.io/).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment