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

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

關于PocoCapsule中reflection及動態(tài)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 閱讀(1129) 評論(0)  編輯 收藏 引用

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            国产精品亚洲欧美| 欧美日韩国产一区精品一区| 国产美女扒开尿口久久久| 亚洲网站在线| 亚洲一级二级在线| 国产一区二区三区在线观看免费| 欧美在线一二三区| 久久男人av资源网站| 亚洲欧洲精品一区二区三区不卡 | 欧美尤物一区| 亚洲电影下载| 99热这里只有精品8| 国产欧美日韩视频一区二区三区 | 在线欧美日韩| 亚洲区欧美区| 国产精品免费一区豆花| 久久综合九九| 欧美理论电影网| 久久经典综合| 欧美精品麻豆| 久久久综合网站| 欧美精品三级| 久久久夜精品| 国产精品v片在线观看不卡| 久久久国产成人精品| 欧美精品激情在线观看| 久久精品夜夜夜夜久久| 欧美激情亚洲精品| 亚洲欧美另类综合偷拍| 国产区在线观看成人精品| 亚洲福利国产精品| 国产精品一区二区三区四区| 欧美激情在线有限公司| 国产人成精品一区二区三| 亚洲日本精品国产第一区| 国产午夜亚洲精品羞羞网站| 日韩小视频在线观看专区| 1024日韩| 久久国产免费看| 亚洲欧美国产精品桃花| 欧美国产欧美综合| 久久人人爽人人爽爽久久| 国产精品色在线| 日韩网站在线| 亚洲理论电影网| 久久乐国产精品| 久久精品天堂| 国产欧美一区二区精品仙草咪| 亚洲精品国产无天堂网2021| 亚洲福利视频网| 久久精品天堂| 久久久噜噜噜久久人人看| 国产精品久久影院| 亚洲视频精品在线| 亚洲在线播放| 欧美午夜剧场| 一区二区三区精品在线| 亚洲午夜一区二区三区| 欧美人成免费网站| 亚洲国产美女久久久久| 午夜精品亚洲一区二区三区嫩草| 国产色产综合色产在线视频 | 久久精品免费观看| 国产九色精品成人porny| 中文久久乱码一区二区| 亚洲在线视频| 国产精品视频免费| 性欧美8khd高清极品| 久久精品一区二区三区不卡| 国产亚洲一区二区三区| 久久gogo国模裸体人体| 美女国产一区| 亚洲精品久久嫩草网站秘色| 欧美片第1页综合| 一区二区三区色| 欧美在线一二三四区| 激情欧美日韩一区| 欧美成人黑人xx视频免费观看| 亚洲国产专区| 亚洲欧美国产va在线影院| 国产日韩欧美综合一区| 久久久久国产精品一区| 亚洲国产毛片完整版| 亚洲午夜激情| 国产午夜精品麻豆| 美女精品自拍一二三四| 亚洲精品视频在线观看网站| 午夜精品99久久免费| 狠狠v欧美v日韩v亚洲ⅴ| 欧美成人中文| 亚洲亚洲精品三区日韩精品在线视频 | 欧美日韩在线视频一区| 午夜精品亚洲一区二区三区嫩草| 噜噜噜91成人网| 日韩一级欧洲| 国产亚洲欧美另类中文| 欧美极品色图| 午夜视频在线观看一区| 亚洲国产美女| 久久高清国产| 男女激情久久| 亚洲欧美激情诱惑| 亚洲第一视频网站| 久久久蜜臀国产一区二区| 久久精品成人一区二区三区| 久久久久久一区二区| 亚洲乱亚洲高清| 久久精品国产一区二区电影| 久热精品视频| 国产精品三级久久久久久电影| 国产性做久久久久久| 亚洲福利免费| 久久只精品国产| 日韩一区二区免费看| 玖玖精品视频| 黄色免费成人| 午夜亚洲影视| 亚洲少妇自拍| 欧美高清在线| 亚洲国产一区在线| 久久久99精品免费观看不卡| 亚洲视频一区在线| 欧美日韩一级大片网址| 亚洲国产免费看| 亚洲国产精品电影| 欧美jizzhd精品欧美喷水| 国产亚洲欧美日韩精品| 久久久在线视频| 久久精品中文| 亚洲日本激情| 亚洲日本免费| 激情视频一区| 久久精品视频一| 欧美精品一区在线发布| 久久精品亚洲国产奇米99| 久久精品国内一区二区三区| 亚洲精品影视在线观看| 欧美va日韩va| 欧美激情久久久| 亚洲深夜福利| 久久精品国产第一区二区三区| 欧美视频一区二区三区…| 亚洲黄色小视频| 欧美国产在线观看| 欧美日韩中文字幕在线视频| 久久久久看片| 午夜天堂精品久久久久| 亚洲免费观看高清在线观看| 在线免费观看日韩欧美| 欧美激情1区| 欧美xxx在线观看| 欧美成在线视频| 欧美激情一二区| 欧美三级日韩三级国产三级| 欧美三级电影大全| 一本色道久久88亚洲综合88| 亚洲国产天堂久久国产91| 亚洲精品一区二区三区av| 一本色道久久综合亚洲精品婷婷| 一区二区三区视频在线播放| 亚洲欧美日韩成人高清在线一区| 亚洲永久免费精品| 久久国产福利国产秒拍| 女仆av观看一区| 99国产精品久久久久久久成人热| 亚洲网站在线观看| 欧美在线亚洲在线| 欧美成人一二三| 欧美午夜国产| 激情综合色综合久久| 亚洲理论在线| 久久福利影视| 亚洲精品视频二区| 欧美一区激情视频在线观看| 麻豆精品视频在线| 国产精品乱人伦中文| 在线观看国产日韩| 亚洲影院一区| 免费在线成人| 亚洲午夜精品国产| 蜜桃av噜噜一区| 国产欧美日韩综合| 亚洲精品一品区二品区三品区| 性8sex亚洲区入口| 欧美黄色免费网站| 亚洲欧美成人一区二区在线电影 | 亚洲永久免费观看| 欧美大片第1页| 亚洲欧美在线免费| 欧美日韩日本网| 亚洲国产精品999| 久久激情一区| 中日韩高清电影网| 欧美成人dvd在线视频| 国产偷自视频区视频一区二区| 一区二区三区欧美日韩| 欧美国产成人在线| 久久国产视频网| 国产精品一区二区三区乱码| av成人免费在线观看|