青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

隨筆 - 3, 文章 - 0, 評(píng)論 - 16, 引用 - 0
數(shù)據(jù)加載中……

關(guān)于PocoCapsule中reflection及動(dòng)態(tài)proxy的討論

原文是貼在我E文博客中,先轉(zhuǎn)過來有空再譯:

In the pococapsule newsgroup, someone asked the following question about dynamic invocation proxies in PocoCapsule:

As far as i understand, these proxies are dependent on the configuration file (e.g. setup.xml).... I would think that the need for recompiling the proxy when the configuration file changes is a "big disadvantage". One of the great things of IoC is that the system can be configured by "just" changing the configuration file. But now users also have to recompile reflextion proxies (?). ... Can pxgenproxy generate reflextion code for ALL classes in the specified .h file(s)?

I would like to use this opportunity to clarify several related issues:

First of all, with PocoCapsule, one does not need to recompile dynamic proxies under configuration changes that only modified function invocation parameter values. One only needs to rebuild new proxies for new function invocation signatures involved in the new configuration. In my opinion, this is not only desirable (no recompilation on parameter value changes) but also acceptable (build new dynamic proxies for new signatures). The assumption is that real world application configurations should avoid applying new invocation signatures that have never been tested before. This kind of usage scenario automatically avoids the need of an on-the-field recompilation after a reconfiguration. Because all dynamic proxies to be used by the application on field should have been generated and compiled for deploying the application during QA tests.

Secondly, many popular IoC containers today even favor static solutions over dynamic configurations. In these manual programmatic based (such as the PicoContainer without the Nano) or metadata based (such as the Spring Framework with Spring-Annotation) solutions, not only new function signatures but even parameter value changes in configurations would force recompilations. Although I am not keen on these solutions (especially the recompilation under value change is highly undesirable in my opinion), I do believe that these well accepted and even enthusiastically pursued solutions indicate that such a recompilation does not bother real world applications.

This is not because the industry does not recoganize the claimed "disadvantage" of the on-the-field recompilation implied in these hot solutions, but because IoC frameworks are not intended to be yet another scripting environment. Rather, IoC frameworks are mainly for:

  • Separating plumbing logic (component life cycle controls wirings, initial property settings etc.) from business logic and supporting framework agnostic business logic components.
  • Allowing user to setup (configure/deployment/etc.) an application declaratively (by expressing what it is alike, rather than the procedure of how to build it step-by-step),
  • Supporting the idea of software product lines (SPL) based on reusable and quickly reconfigurable components and domain-specific modeling.
Whether a given IoC framework is able to avoid on-the-field recompilation when new signatures appearing in the declarative configuration descriptions is merely a bells-and-whistles feature rather than a "great thing" (neither a "big disadvantage" if it does not support it). In PocoCapsule, generated dynamic proxies are very small and cost neligable recompilation time for most applications, not to mention that:
  • On-the-field recompilation can largely be avoided if component deployments have been pre-tested (as discussed in the beginning).
  • This recompilation need even less time than packaging deployment descriptors (such as package them into .war/.ear/.zip files).
Now, let's take a look on those seemingly "minor" disadvantages from the suggested solution that generates proxies for all classes in specified header files:
  • More manually code fixes: I would suggest one to play some of relevant utilities, such as GCC XML, on various header files on different platforms (including Windows, various unix/linux, VxWorks, Symbain OS, etc. Because IoC frameworks do not (and should not) prohibit user to use non-portable components, the utilities that parsing header files would have to either deal with non-portable header files (including various platform specific C++ extensions) or require users to fix those header files manually before parsing. In the suggested scenario, the developers who were only going to configure the application at high level would have to apply more low level code fix effort.
  • Bloated code generation and heavy runtime footprint: Based on various application examples, we compared PocoCapsule generated proxies code to CERN REFLEX that generate all proxies of classes in specified header files. Typically, one would see REFLEX produces 10 to 1,000 times more code than it was actually needed for an IoC configuration. These redundent code eat megas of runtime memory (instead of few or few tens kilos). This is because in the suggested solution, one would have to generate proxies for all classes that were implicitly included (declared in the other header files that were include by specified header files), proxies for all classes that were used as parent classes of some other classes, and proxies that are used as parameters of class methods, etc.. Otherwise, it would be merely 50 yards vs 100 yards, namely, one would still have the claimed "big" disadvantage of having to rebuild proxies after all.
  • Human involved manually edited filters: Utilities, such as GCC XML (and therefore the CERN REFLEX), allows one to filter out unwanted proxies to reduce the size of generated code. However, one would have to manually edit filter configurations. The consequence of applying such filters are more code (or script) and more complexities to be handled and mantained manually. This immediately defeats the whole point of using the IoC frameworks.
  • Additional footprint for a runtime type system: To support OO polymorphism (e.g. components that extend from interfaces) without recompilation, simply generating all proxies is not sufficient. The solution would have to provide a runtime type system (and additional metadata as well). This will increase the application runtime footprint roughly by another ~1Mbytes.
  • Generic programming (GP) would be prohibited: As we know, C++ template specialization mandates recompilation. We can't have compiled code that could be applied to all possible specializations. To ensure no recompilation, the solution would have to accept a "minor" disadvantage, namely prohibit the use of GP. GP is used heavily in many PocoCapsule examples (see those corba examples that use "native" servant implemention). It significantly shortens the learning curve of some middlewares, such as CORBA (one no longer need to learn POA skeletons), simplifies application code, and supports legacy components with much less refactoring cost.
With all these disadvantages what one would gain was a merely an "advantage" that could help him to shoot himself in the foot -- to deploy an application that involves wirings that have never been tested previously.

posted on 2008-03-10 03:11 kjin101 閱讀(1139) 評(píng)論(0)  編輯 收藏 引用


只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            午夜在线一区二区| 欧美一乱一性一交一视频| 欧美成人国产va精品日本一级| 国产一区二区三区在线观看免费视频| 午夜影院日韩| 欧美与黑人午夜性猛交久久久| 国产欧美精品一区aⅴ影院| 久久精品国产一区二区三| 亚洲欧美大片| 激情综合视频| 欧美黄网免费在线观看| 欧美激情亚洲精品| 亚洲专区国产精品| 欧美伊人久久久久久午夜久久久久 | 免费看的黄色欧美网站| 欧美成人一区二免费视频软件| 亚洲精品一区二区三区四区高清 | 亚洲精品国产视频| 欧美日韩一区二区三区| 欧美在线啊v| 久久久久女教师免费一区| 日韩视频免费| 亚洲欧美在线一区| 亚洲人成小说网站色在线| 一区二区三区国产在线| 国内在线观看一区二区三区| 亚洲国产裸拍裸体视频在线观看乱了| 欧美日本中文| 久久免费精品视频| 欧美日韩亚洲视频一区| 美腿丝袜亚洲色图| 欧美午夜精品伦理| 欧美成人免费全部观看天天性色| 欧美日韩麻豆| 欧美福利一区二区| 国产精品专区一| 亚洲国产二区| 国产原创一区二区| 99在线|亚洲一区二区| 一区在线电影| 亚洲欧美日韩国产另类专区| 日韩视频一区二区三区在线播放免费观看 | 欧美三级乱码| 欧美刺激午夜性久久久久久久| 国产精品家庭影院| 亚洲国产成人av| 国内精品久久久久影院优| 99亚洲视频| av72成人在线| 欧美福利电影网| 免费观看一级特黄欧美大片| 国产麻豆9l精品三级站| 亚洲精选一区二区| 亚洲精品一二区| 欧美aⅴ一区二区三区视频| 久久深夜福利免费观看| 国产欧美亚洲日本| 亚洲一区二区三区在线看| 一本久久知道综合久久| 欧美成人精品在线观看| 美国三级日本三级久久99| 国产欧美一区二区三区久久 | 久久久久久久久久久久久女国产乱 | 欧美一区二区在线视频| 国产精品久久一区二区三区| 日韩视频免费| 一区二区三区四区五区视频 | 欧美电影免费观看网站| 麻豆精品一区二区综合av| 国内精品久久久| 久久精品亚洲国产奇米99| 久久久亚洲国产美女国产盗摄| 国产日韩欧美日韩大片| 欧美一区二区三区精品电影| 久久国产精品一区二区| 国产一区 二区 三区一级| 欧美一区二视频| 免费欧美日韩| 日韩一二三在线视频播| 欧美日韩日本视频| 亚洲图片在线观看| 久久福利影视| 在线看片欧美| 欧美精品一区二区三区一线天视频| 亚洲精美视频| 亚洲一级电影| 国产亚洲美州欧州综合国| 久久精品国产精品亚洲精品| 免费成人高清| 亚洲一区二区三区涩| 国产欧美日韩一级| 久久亚洲美女| 亚洲精品一区在线| 欧美呦呦网站| 最新成人av网站| 欧美日韩一区二区视频在线| 午夜一区二区三区在线观看| 欧美大胆成人| 亚洲一区二区三区四区五区午夜| 国产日韩欧美一区二区三区在线观看 | 免费高清在线一区| 夜夜嗨一区二区三区| 久久久久久久综合色一本| 亚洲日产国产精品| 国产精品黄视频| 裸体女人亚洲精品一区| 一区二区三区色| 久久婷婷国产综合精品青草| 日韩一级精品视频在线观看| 国产三级欧美三级日产三级99| 欧美国产第二页| 欧美一区二区三区电影在线观看| 亚洲福利国产精品| 久久成人免费电影| 一区二区激情小说| 亚洲第一毛片| 国产日韩欧美视频| 欧美涩涩视频| 欧美成人免费视频| 久久精品一区二区三区四区| 日韩特黄影片| 亚洲高清一区二| 麻豆精品一区二区av白丝在线| 亚洲影院免费观看| 亚洲人成在线观看网站高清| 国产一区二区三区日韩| 欧美午夜宅男影院| 欧美国产日本在线| 久久综合伊人| 久久久久国产精品人| 午夜视黄欧洲亚洲| 亚洲一区二区四区| 亚洲无线视频| 在线亚洲自拍| av成人天堂| 一本大道久久精品懂色aⅴ | 亚洲欧美日韩国产精品| 中文亚洲视频在线| 日韩午夜激情| 一本色道久久88精品综合| 亚洲美女电影在线| 亚洲看片网站| 一区二区三区四区五区视频| 亚洲免费观看在线观看| 99精品视频免费观看| 一本色道久久综合精品竹菊 | 91久久久久久| 亚洲欧洲在线免费| 亚洲人成高清| 亚洲视频一二| 亚洲欧美视频在线观看| 性色一区二区三区| 欧美专区在线| 久久亚洲私人国产精品va媚药| 久久人人爽爽爽人久久久| 久久久久久穴| 亚洲电影免费观看高清完整版在线| 欧美激情精品久久久六区热门| 欧美激情视频一区二区三区在线播放 | 久久男女视频| 欧美精品三级| 国产精品美女xx| 国产一区二区按摩在线观看| 国产一区二区三区久久精品| 永久域名在线精品| 日韩一区二区精品在线观看| 这里是久久伊人| 久久精品国产亚洲aⅴ| 免费久久99精品国产| 亚洲国产aⅴ天堂久久| 最新日韩中文字幕| 亚洲无人区一区| 久久婷婷丁香| 欧美三级视频在线观看| 国产亚洲一级高清| 亚洲人成人一区二区三区| 亚洲一区国产| 美女精品自拍一二三四| 亚洲精品久久久久久久久| 亚洲男人的天堂在线| 久久中文字幕一区| 国产精品国产自产拍高清av| 狠狠爱综合网| 亚洲视频网在线直播| 快射av在线播放一区| 99riav国产精品| 久久久久久夜| 国产精品久久久久久久午夜片| 国产自产2019最新不卡| 宅男精品视频| 欧美电影专区| 小黄鸭精品aⅴ导航网站入口| 男人的天堂亚洲| 国产丝袜一区二区三区| 亚洲图片欧美午夜| 欧美激情一区二区三区| 性高湖久久久久久久久| 欧美日韩一级片在线观看| 亚洲国产精品久久人人爱蜜臀| 亚洲小视频在线观看|