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

隨筆 - 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>
            亚洲欧美日韩久久精品| 欧美亚洲网站| 亚洲国产成人精品视频| 久久久夜精品| 亚洲精品永久免费| 亚洲最新视频在线播放| 欧美系列精品| 久久美女性网| 欧美国产激情| 亚洲一区二区欧美| 欧美一区二区三区在线免费观看| 激情欧美一区二区三区| 亚洲国产高清aⅴ视频| 欧美三级视频在线播放| 久久精品国产精品亚洲| 麻豆精品在线视频| 亚洲欧美日韩一区二区| 久久久久9999亚洲精品| 99日韩精品| 久久国产日韩欧美| 日韩系列欧美系列| 香蕉久久夜色| 一区二区三区.www| 久久久噜噜噜久久人人看| 一二三区精品福利视频| 久久国产天堂福利天堂| 一区二区免费在线观看| 午夜影院日韩| 一区二区欧美国产| 老色鬼久久亚洲一区二区| 亚洲综合色自拍一区| 久久综合亚洲社区| 欧美一区三区二区在线观看| 欧美久久久久久久久久| 美女尤物久久精品| 国产精品免费一区豆花| 亚洲人成网站777色婷婷| 国产亚洲一区精品| 99亚洲视频| 亚洲激情网站| 久久久久久久精| 欧美三区免费完整视频在线观看| 久久久久国产精品厨房| 欧美性猛片xxxx免费看久爱| 欧美激情国产日韩| 国产一区二区三区免费不卡| 亚洲每日更新| 一本色道久久综合一区| 蜜桃伊人久久| 欧美成黄导航| 在线观看亚洲| 久久午夜羞羞影院免费观看| 久久精品国产99国产精品| 国产精品丝袜白浆摸在线| 亚洲久色影视| 一本到高清视频免费精品| 久久综合九色综合欧美就去吻| 久久精品亚洲乱码伦伦中文 | 亚洲视频在线一区| 99在线精品免费视频九九视| 蜜桃av久久久亚洲精品| 美日韩精品免费| 在线播放日韩欧美| 久久久亚洲一区| 欧美国产综合| 亚洲精品中文字| 欧美国产在线电影| 日韩一级成人av| 亚洲欧美一区二区在线观看| 国产精品久久网| 亚洲欧美精品在线| 久久久久免费视频| 亚洲第一在线综合在线| 欧美h视频在线| 日韩亚洲欧美一区| 午夜在线精品偷拍| 韩国精品久久久999| 久久资源av| 亚洲人成小说网站色在线| 亚洲视屏在线播放| 国产精品色婷婷久久58| 欧美一区二区在线免费播放| 男女激情视频一区| 9久草视频在线视频精品| 国产精品久久久久久久午夜| 午夜精品福利一区二区三区av| 久久久久女教师免费一区| 在线成人av| 欧美天天综合网| 欧美与欧洲交xxxx免费观看| 亚洲国产精品久久91精品| 亚洲桃花岛网站| 伊人精品视频| 欧美三级第一页| 久久国产综合精品| 亚洲国产小视频| 久久疯狂做爰流白浆xx| 91久久久一线二线三线品牌| 国产精品r级在线| 久久免费视频这里只有精品| 日韩一级网站| 欧美91视频| 先锋资源久久| 99精品国产高清一区二区| 国产午夜精品理论片a级探花| 久久综合国产精品台湾中文娱乐网| 亚洲精品在线观| 女女同性精品视频| 久久激情中文| 中文一区字幕| 欧美日韩精品三区| 久久精品成人一区二区三区| 99国产精品99久久久久久| 牛人盗摄一区二区三区视频| 欧美一区视频| 亚洲一区二区精品在线| 亚洲精品国产精品国产自| 国产在线乱码一区二区三区| 欧美日韩国产va另类| 久久亚洲精品一区| 欧美呦呦网站| 午夜国产欧美理论在线播放 | 欧美激情一区二区三区成人 | 亚洲欧美一区二区精品久久久| 亚洲高清视频在线| 国产主播一区二区| 国产欧美一区二区视频| 欧美午夜a级限制福利片| 欧美高清视频| 欧美成人网在线| 久久综合给合| 久久综合导航| 免费av成人在线| 久久综合电影| 欧美成年人网站| 欧美大片91| 欧美精品麻豆| 欧美日韩成人免费| 欧美日产一区二区三区在线观看| 另类图片国产| 欧美高清自拍一区| 欧美日韩国产一区| 欧美三日本三级三级在线播放| 欧美日韩精品伦理作品在线免费观看 | 久久av在线看| 久久男人资源视频| 久久夜色精品一区| 美女成人午夜| 亚洲国产精品嫩草影院| 亚洲国产成人av在线| 亚洲激情女人| 一本色道久久综合亚洲精品高清 | 国产欧美精品xxxx另类| 国产一区在线视频| 18成人免费观看视频| 91久久精品视频| 亚洲在线黄色| 久久久.com| 亚洲黄色在线看| 亚洲一区欧美激情| 久久精品三级| 欧美日韩另类综合| 国产精品亚洲аv天堂网| 国内久久婷婷综合| 亚洲精品久久久久久下一站| 亚洲一区二区黄| 久久久综合网站| 亚洲日本视频| 欧美亚洲一级片| 免费日韩视频| 国产精品亚洲一区| 亚洲国产成人av| 亚洲欧美日韩国产中文| 久久婷婷国产综合国色天香| 亚洲理论在线| 久久久久久久综合狠狠综合| 欧美xart系列在线观看| 国产精品推荐精品| 亚洲国产婷婷| 欧美影院成年免费版| 亚洲国产日韩美| 亚洲美女免费精品视频在线观看| 国产精品羞羞答答| 欧美精品在线观看91| 国产欧美一区二区精品秋霞影院| 亚洲国产精品尤物yw在线观看| 亚洲欧美国产精品桃花| 欧美大尺度在线| 午夜一区不卡| 欧美日韩视频专区在线播放 | 午夜激情综合网| 亚洲国产欧洲综合997久久| 午夜精品久久| 欧美日韩免费区域视频在线观看| 精品福利免费观看| 久久精品国产在热久久| 99成人精品| 欧美日韩国产成人精品| 亚洲大片免费看| 久久久久久999|