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

隨筆 - 3, 文章 - 0, 評論 - 16, 引用 - 0
數據加載中……

關于PocoCapsule中reflection及動態proxy的討論

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

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 閱讀(1143) 評論(0)  編輯 收藏 引用


只有注冊用戶登錄后才能發表評論。
網站導航: 博客園   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>
            欧美电影美腿模特1979在线看| 亚洲成人在线免费| 91久久国产精品91久久性色| 久久精品道一区二区三区| 亚洲欧美另类久久久精品2019| 国产精品高精视频免费| 亚洲男人的天堂在线| 亚洲午夜在线| 国产主播一区二区| 老牛影视一区二区三区| 久久免费99精品久久久久久| 亚洲国产精品嫩草影院| 亚洲欧洲一区二区三区| 国产精品拍天天在线| 欧美中文在线视频| 久久久综合网站| 一本大道久久a久久综合婷婷| 99国产精品国产精品久久| 国产精品久久久久秋霞鲁丝| 久久精品盗摄| 欧美电影打屁股sp| 午夜精品久久久久久久| 久久久不卡网国产精品一区| 亚洲麻豆av| 亚洲欧美一区二区视频| 亚洲黄页视频免费观看| 一本色道久久综合一区 | 久久国产精彩视频| 亚洲三级影院| 亚洲欧美国产精品桃花| 91久久在线观看| 亚洲性视频网址| 亚洲电影毛片| 亚洲一区二区三区涩| 亚洲国产精品一区二区第一页| 99精品久久久| 亚洲丶国产丶欧美一区二区三区| 在线视频欧美精品| 亚洲国产欧美一区| 99精品99| 久久久久九九九九| 亚洲在线不卡| 欧美国产一区视频在线观看 | 亚洲一区二区毛片| 亚洲国产欧美久久| 欧美一级大片在线观看| 一区二区三区四区五区视频| 久久精品亚洲一区二区| 欧美一区二区三区视频在线| 欧美激情自拍| 欧美成人在线免费观看| 国产欧美日韩| 亚洲欧美久久久久一区二区三区| 99国产精品久久久久久久| 久久精品亚洲一区二区| 午夜久久99| 欧美天堂亚洲电影院在线观看| 亚洲电影在线免费观看| 欧美一级理论性理论a| 亚洲五月婷婷| 欧美日本中文字幕| 亚洲日韩欧美视频一区| 亚洲精品美女免费| 蜜桃av综合| 欧美激情女人20p| 亚洲国产成人不卡| 久久免费黄色| 黄色一区二区三区| 欧美综合第一页| 美女任你摸久久| 在线播放中文字幕一区| 久久免费国产精品| 欧美大片网址| 99热在这里有精品免费| 欧美国产日韩在线观看| 亚洲精品国久久99热| 欧美日韩喷水| 99视频一区二区三区| 亚洲欧美成人网| 国产精品一区在线观看| 欧美伊人久久久久久久久影院 | 亚洲美女电影在线| 欧美精品18| 亚洲深夜福利| 国产精品亚洲综合色区韩国| 亚洲伊人观看| 蜜臀av在线播放一区二区三区| 精品盗摄一区二区三区| 免费久久99精品国产| 亚洲欧洲日韩综合二区| 亚洲一区在线视频| 国产亚洲欧洲一区高清在线观看| 久久精品国产综合| 亚洲激情第一页| 国产精品久久久久免费a∨大胸| 亚洲专区一区| 免费人成精品欧美精品| 一区二区三区精密机械公司 | 国产精品亚洲аv天堂网| 性色av一区二区三区在线观看 | 国产一区99| 老鸭窝毛片一区二区三区| 亚洲精品欧美激情| 欧美一级片在线播放| 亚洲国产成人精品女人久久久| 欧美精品在线播放| 欧美一区不卡| 亚洲免费观看高清完整版在线观看熊| 亚洲一区二区三区乱码aⅴ蜜桃女 亚洲一区二区三区乱码aⅴ | 国产精品亚洲不卡a| 久久久国产一区二区| 亚洲美女黄色| 麻豆久久精品| 亚洲欧美日韩精品一区二区| 在线观看亚洲精品视频| 国产精品久久一级| 欧美高清不卡| 久久精品1区| 亚洲一品av免费观看| 欧美激情一二三区| 久久久蜜桃精品| 午夜欧美大片免费观看| 日韩一级在线观看| 亚洲国产精品va| 国色天香一区二区| 国产精品欧美一区二区三区奶水 | 欧美一级免费视频| 中文av一区二区| 亚洲经典自拍| 欧美成人嫩草网站| 免费精品99久久国产综合精品| 亚洲欧美综合| 亚洲免费一级电影| 亚洲在线黄色| 亚洲视频精品| 日韩一级大片在线| 亚洲精品123区| 91久久精品网| 亚洲国产婷婷综合在线精品| 国产一区二区三区在线观看网站 | 最新国产の精品合集bt伙计| 韩国欧美国产1区| 国产农村妇女毛片精品久久麻豆 | 加勒比av一区二区| 激情一区二区三区| 香蕉免费一区二区三区在线观看| 在线视频免费在线观看一区二区| 亚洲精品综合精品自拍| 亚洲国产视频直播| 亚洲激情电影中文字幕| 亚洲人成网站在线观看播放| 91久久久久久久久久久久久| 亚洲国内欧美| 亚洲看片网站| 一本一本久久| 亚洲一区亚洲二区| 欧美在线免费观看| 久久久国产视频91| 麻豆国产精品va在线观看不卡| 久久亚洲春色中文字幕久久久| 美女网站久久| 亚洲人成免费| 正在播放亚洲| 欧美在线观看视频一区二区三区| 久久精品噜噜噜成人av农村| 久久午夜国产精品| 亚洲高清精品中出| 中日韩美女免费视频网址在线观看| 亚洲伊人网站| 久久综合一区| 欧美日韩一区二区在线| 国产欧美精品在线观看| 激情婷婷亚洲| 欧美激情精品久久久六区热门| 欧美精品福利| 国产伦精品免费视频| 永久免费毛片在线播放不卡| 99riav久久精品riav| 亚洲女与黑人做爰| 每日更新成人在线视频| 亚洲久色影视| 欧美亚洲一区二区三区| 免费成人高清| 国产日本欧美一区二区三区在线| 亚洲电影激情视频网站| 亚洲欧美韩国| 亚洲高清精品中出| 香蕉av777xxx色综合一区| 免费在线观看成人av| 国产精品中文字幕欧美| 99国产精品久久久久老师| 久久亚洲国产成人| 99re热这里只有精品视频| 久久精品国产精品亚洲| 国产精品v欧美精品∨日韩| 亚洲大片精品永久免费| 亚洲欧美日韩中文视频| 亚洲激情在线观看| 久久夜色撩人精品| 国产偷国产偷亚洲高清97cao|