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

隨筆 - 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 閱讀(1130) 評論(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>
            国产亚洲欧美aaaa| 亚洲精品在线电影| 亚洲欧洲精品一区二区三区不卡| 国产欧美一区二区在线观看| 国产精品一区二区三区乱码 | 国产有码在线一区二区视频| 国产亚洲欧洲| 一区二区三区在线免费观看| 在线精品福利| 一本久道久久综合狠狠爱| 亚洲视频在线观看一区| 亚洲男人的天堂在线观看| 欧美亚洲一区二区在线| 久久综合久久88| 亚洲破处大片| 亚洲免费观看高清完整版在线观看熊 | 亚洲免费成人| 午夜影院日韩| 欧美韩国一区| 国产伊人精品| 亚洲人成小说网站色在线| 亚洲一区二区三区免费观看| 久久激五月天综合精品| 欧美成人精品一区二区| 日韩亚洲欧美中文三级| 午夜精品久久久久久久99黑人| 久久先锋影音av| 国产精品成人在线| 亚洲激情另类| 久久av二区| 亚洲精品免费网站| 久久免费高清视频| 国产精品美女久久久久久久| 在线不卡亚洲| 亚洲欧美美女| 亚洲日本成人女熟在线观看| 久久精品日韩欧美| 国产精品vip| 日韩一区二区免费看| 毛片av中文字幕一区二区| 亚洲少妇一区| 欧美日韩大片| 亚洲精品视频免费观看| 久久久久久亚洲精品中文字幕| 亚洲美女中出| 欧美—级高清免费播放| 狠狠色狠狠色综合日日五| 欧美亚洲一区三区| 日韩午夜免费视频| 欧美久久在线| 亚洲乱码久久| 亚洲激情另类| 欧美电影电视剧在线观看| 黄色精品在线看| 久久久久久久久蜜桃| 亚洲欧美日韩天堂一区二区| 国产精品美女视频网站| 亚洲欧美中文另类| 亚洲精品综合| 影音先锋亚洲视频| 久久久久久穴| 欧美在线视频日韩| 黑人操亚洲美女惩罚| 久久精品主播| 性娇小13――14欧美| 国产日韩亚洲欧美综合| 久久国产黑丝| 久久精品在线免费观看| 国产日韩成人精品| 久久久久久久成人| 久久免费视频在线观看| 激情伊人五月天久久综合| 久久久久久久久久久久久9999| 久久国产精品色婷婷| 亚洲盗摄视频| 91久久精品国产91性色tv| 欧美女主播在线| 亚洲欧美日韩在线不卡| 99天天综合性| 国产尤物精品| 亚洲国产欧美在线| 国产精品久久久久一区二区| 久久岛国电影| 玖玖视频精品| 亚洲在线一区| 欧美一区二区三区免费视| 亚洲国产精品久久久| 日韩天堂在线观看| 国产欧美一区二区色老头| 久热这里只精品99re8久| 免费h精品视频在线播放| 亚洲香蕉成视频在线观看 | 亚洲精品美女在线观看播放| 国产精品乱人伦一区二区| 久久青青草综合| 欧美日韩一区二区在线播放| 欧美在线亚洲一区| 老司机精品视频网站| 亚洲在线观看视频网站| 久久国产一区二区三区| 日韩午夜在线观看视频| 亚洲欧美日韩国产中文在线| 在线欧美日韩| 亚洲一区二区三区在线看 | 久久久久国产精品一区| 欧美激情精品久久久久久久变态| 先锋影音网一区二区| 欧美第一黄色网| 久久精品中文字幕一区| 欧美三区免费完整视频在线观看| 久久精品一二三区| 欧美日韩国产在线| 亚洲成人中文| 国内精品久久久久国产盗摄免费观看完整版| 亚洲大胆视频| 亚洲第一网站| 香蕉久久夜色精品| 国产精品毛片a∨一区二区三区| 欧美国产日本韩| 亚洲韩国青草视频| 欧美福利视频在线| 久久综合久久综合这里只有精品| 欧美日韩国产不卡在线看| 欧美高清视频在线| 亚洲电影在线| 久久久久久久久久久久久9999| 欧美一区日韩一区| 国产精品青草久久久久福利99| 亚洲人成在线播放网站岛国| 亚洲国产高清自拍| 久久在线播放| 免费h精品视频在线播放| 国产区欧美区日韩区| 一本色道久久精品| 亚洲午夜av| 国产精品高潮在线| 亚洲私人影院在线观看| 亚洲欧美99| 国产精品网站一区| 香蕉成人久久| 裸体歌舞表演一区二区| 国产一区二区三区黄视频| 欧美一区免费| 麻豆精品视频在线| 亚洲人成啪啪网站| 欧美视频一区| 篠田优中文在线播放第一区| 久久国产欧美精品| 在线观看日韩一区| 欧美日韩不卡| 亚洲综合精品自拍| 猫咪成人在线观看| 亚洲免费激情| 国产精品视频免费一区| 欧美亚洲一区二区在线| 免费h精品视频在线播放| 亚洲日本免费| 国产精品久久久一区麻豆最新章节| 亚洲一区二区免费在线| 久久亚洲春色中文字幕| 日韩一级视频免费观看在线| 国产精品视频久久一区| 久久日韩精品| aa级大片欧美三级| 久久精品伊人| 一区二区高清在线| 国产一区二区无遮挡| 欧美超级免费视 在线| 亚洲无限av看| 欧美韩日一区二区| 亚洲综合国产| 亚洲激情黄色| 国产性猛交xxxx免费看久久| 免费黄网站欧美| 亚洲欧美不卡| 亚洲福利一区| 久久成人免费网| 一区二区三区av| 国内成+人亚洲| 国产精品国产三级欧美二区| 久久美女性网| 亚洲欧美日韩另类| 亚洲精品乱码久久久久久蜜桃91| 欧美一区二区三区在线播放| 亚洲精品久久久久久下一站| 国产农村妇女精品一二区| 欧美国产视频日韩| 久久精品在线观看| 亚洲免费在线视频| 亚洲精品乱码久久久久久黑人| 久久亚洲精选| 国产精品爽爽爽| 欧美激情第4页| 亚洲在线观看免费| 亚洲一区二区三区四区在线观看| 久久婷婷激情| 中日韩高清电影网| 欧美成人影音| 久久精品国产91精品亚洲| 你懂的网址国产 欧美|