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

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

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

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

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


只有注冊(cè)用戶(hù)登錄后才能發(fā)表評(píng)論。
網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問(wèn)   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>
            国产精品一区二区三区免费观看 | 亚洲欧美日韩精品久久久| 午夜精品福利一区二区蜜股av| 久久久人成影片一区二区三区| 一本大道久久a久久精品综合| 美女福利精品视频| 精品成人乱色一区二区| 欧美一级黄色网| 亚洲午夜极品| 欧美日韩午夜剧场| 中国av一区| 99re6这里只有精品视频在线观看 99re6这里只有精品 | 99国产精品久久| 欧美精品一区二区三| 亚洲精品一区二区三区av| 亚洲免费观看| 午夜在线视频一区二区区别| 国模吧视频一区| 国产三区二区一区久久| 欧美日韩一级大片网址| 欧美黄色网络| 欧美性一区二区| 国产在线一区二区三区四区| 欧美福利在线| 欧美激情亚洲精品| 国产精品高清一区二区三区| 国产偷自视频区视频一区二区 | 国产精品有限公司| 亚洲黄页视频免费观看| 亚洲欧美在线观看| 亚洲成人在线视频网站| 亚洲精品一二三区| 久久精品国产第一区二区三区最新章节| 亚洲区一区二区三区| 亚洲国产毛片完整版 | 国产精品呻吟| 久久一区二区三区四区五区| 免费看精品久久片| 久久婷婷麻豆| 日韩视频在线观看免费| 国产精品国产馆在线真实露脸| 亚洲免费在线视频一区 二区| 香蕉免费一区二区三区在线观看| 激情成人中文字幕| 亚洲精品日韩精品| 国产欧美精品日韩| 久久疯狂做爰流白浆xx| 欧美精品激情| 亚洲国产一二三| 亚洲老板91色精品久久| 蜜桃久久av一区| 久久精品国产免费| 国产一级精品aaaaa看| 欧美一区二区三区久久精品| 久久国产精品电影| 一区二区三区精品久久久| 中文日韩电影网站| 国内在线观看一区二区三区| 亚洲黄色片网站| 国产精品日韩一区二区| 欧美高清视频免费观看| 国产精品专区h在线观看| 欧美高清成人| 黄色成人在线免费| 亚洲婷婷国产精品电影人久久| 亚洲高清av在线| 亚洲欧美另类在线| 亚洲伊人久久综合| 欧美国产综合视频| 免费日韩av| 国产日韩在线一区二区三区| 亚洲日本精品国产第一区| 在线观看欧美日本| 欧美亚洲系列| 性亚洲最疯狂xxxx高清| 欧美色图一区二区三区| 91久久精品一区| 在线国产日韩| 久久久久国产精品厨房| 欧美一区深夜视频| 黄色精品一区二区| 欧美日本三区| 免费一级欧美在线大片| 一区二区三区四区在线| 欧美不卡视频一区| 性高湖久久久久久久久| 亚洲伦理在线观看| 一区在线视频观看| 亚洲精品一区久久久久久| 欧美一区二区免费| 亚洲视频免费观看| 怡红院精品视频在线观看极品| 欧美激情在线有限公司| 久久久久久欧美| 性xx色xx综合久久久xx| 亚洲精品欧美专区| 久久超碰97人人做人人爱| 欧美日韩亚洲一区二区三区四区| 鲁大师影院一区二区三区| 国产揄拍国内精品对白| 欧美亚洲午夜视频在线观看| 久久精品国产亚洲高清剧情介绍| 国产日韩欧美二区| 久久国产精品99国产| 久久久久一区二区| 狠狠色伊人亚洲综合成人| 久久精品亚洲一区| 久久一区二区三区超碰国产精品| 国内精品久久久久国产盗摄免费观看完整版 | 国产一区二区三区高清| 久久国产精品99国产| 免费看的黄色欧美网站| 亚洲黄色精品| 欧美三级电影一区| 午夜精品免费在线| 免费黄网站欧美| 亚洲美洲欧洲综合国产一区| 国产精品二区二区三区| 欧美一区二区三区免费大片| 久久综合999| 99国内精品久久| 国产精品久久久久久久第一福利| 午夜精品在线| 欧美激情国产精品| 亚洲欧美日韩综合aⅴ视频| 国内精品久久久久影院 日本资源| 久久深夜福利| 亚洲色在线视频| 久久免费精品日本久久中文字幕| 亚洲精品护士| 国产精品羞羞答答xxdd| 欧美成年人网站| 亚洲欧洲av一区二区| 久久久久久日产精品| 国内激情久久| 欧美大片在线看免费观看| 国产亚洲欧美一区二区三区| 久久久久久久久伊人| 欧美激情免费在线| 亚洲少妇自拍| 国产一区二区三区在线观看精品 | 午夜精品视频一区| 久久精品中文字幕一区二区三区| 韩国一区二区三区在线观看| 蜜桃av一区二区三区| 亚洲在线免费| 欧美激情一区二区三区成人| 亚洲欧美高清| 亚洲日韩中文字幕在线播放| 国产精品家教| 欧美激情视频一区二区三区不卡| 亚洲自拍偷拍一区| 亚洲欧洲一区二区三区| 欧美一区二区三区四区夜夜大片| 亚洲国产精品久久人人爱蜜臀| 国产精品久久久久久久久久久久久久 | 亚洲国产高清aⅴ视频| 国产精品伦子伦免费视频| 久久九九精品| 亚洲中午字幕| 欧美成人一品| 国产日韩综合| 亚洲欧美日韩综合国产aⅴ| 亚洲国产一区二区视频| 麻豆成人小视频| 久久久www成人免费毛片麻豆| 午夜日韩视频| 午夜精品久久久久久久| 亚洲午夜高清视频| 亚洲免费观看高清在线观看 | 国产日韩欧美一区二区三区在线观看| 欧美日韩伦理在线| 欧美激情区在线播放| 久久久午夜电影| 久久精品国产清自在天天线| 欧美一区影院| 久久狠狠一本精品综合网| 欧美一区二区免费| 亚洲欧美一区二区激情| 亚洲性视频网址| 亚洲永久免费观看| 国产欧美一区二区三区久久| 欧美偷拍另类| 欧美日韩国产首页| 欧美日韩1234| 欧美色欧美亚洲另类七区| 欧美日韩在线看| 国产精品草莓在线免费观看| 欧美视频亚洲视频| 国产精品你懂的| 国产精品一区在线观看| 国产伦理一区| 激情成人综合| 亚洲精品一区二| 在线午夜精品| 香港成人在线视频| 新狼窝色av性久久久久久| 久久久精品国产免大香伊| 欧美不卡视频| 亚洲毛片视频|