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

隨筆 - 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 閱讀(1139) 評論(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>
            久久精品中文字幕免费mv| 黑人一区二区三区四区五区| 欧美中文字幕不卡| 欧美日韩国产在线播放| 免费观看成人网| 国产一区美女| 中文精品视频一区二区在线观看| 亚洲激情在线视频| 久久精品国产一区二区三| 性欧美长视频| 国产精品美女主播在线观看纯欲| 亚洲欧洲精品一区二区三区| 狠狠干综合网| 久久精品欧洲| 久久精品最新地址| 国产性做久久久久久| 亚洲一区二区三区中文字幕在线| 一本久久精品一区二区| 欧美电影美腿模特1979在线看| 蜜桃av噜噜一区二区三区| 国产性天天综合网| 久久精品99国产精品酒店日本| 小黄鸭精品aⅴ导航网站入口| 欧美性淫爽ww久久久久无| 亚洲三级电影在线观看| 99视频一区二区| 欧美日本一道本| 99国产精品99久久久久久| 宅男精品视频| 欧美日韩亚洲视频| 一区二区三区视频观看| 亚洲欧美韩国| 国产午夜精品美女视频明星a级| 亚洲欧美日韩一区二区三区在线| 久久激情五月婷婷| 1769国产精品| 免费亚洲网站| 亚洲精品美女在线| 亚洲香蕉成视频在线观看| 国产精品三区www17con| 欧美亚洲一区三区| 欧美mv日韩mv亚洲| 99国产精品久久久久久久| 国产精品v欧美精品v日韩| 亚洲午夜精品在线| 麻豆精品91| 亚洲免费观看| 国产精品盗摄一区二区三区| 午夜视频一区| 欧美激情成人在线视频| 中日韩美女免费视频网址在线观看| 国产精品国产亚洲精品看不卡15| 午夜在线观看免费一区| 欧美激情亚洲综合一区| 亚洲系列中文字幕| 韩国自拍一区| 欧美日韩亚洲在线| 欧美一级在线播放| 亚洲三级免费观看| 久久久精品动漫| 亚洲人成在线播放| 国产欧美va欧美va香蕉在| 另类成人小视频在线| 一区二区三区不卡视频在线观看 | 久久精品成人一区二区三区| 国产最新精品精品你懂的| 欧美成人国产va精品日本一级| 一本一本久久a久久精品综合妖精| 久久国产精品免费一区| 日韩一区二区精品视频| 国内精品久久久久久| 欧美日韩国产专区| 久久久人成影片一区二区三区 | 亚洲欧美日韩人成在线播放| 欧美黄免费看| 久久精品国产亚洲a| 99热在线精品观看| 精品动漫av| 国产嫩草影院久久久久| 欧美另类人妖| 免费在线看一区| 香蕉久久精品日日躁夜夜躁| 亚洲精品极品| 欧美福利在线| 裸体一区二区三区| 欧美在线影院在线视频| 亚洲手机视频| 99国内精品| 亚洲欧洲精品一区二区| 精品不卡在线| 国产自产在线视频一区| 国产酒店精品激情| 欧美性片在线观看| 欧美日本一区二区高清播放视频| 久久亚洲精品一区二区| 久久精品亚洲| 欧美专区福利在线| 欧美一区二区国产| 午夜精品久久久久久99热| 亚洲一区二区免费视频| 99精品欧美一区二区三区综合在线| 欧美黄色aaaa| 欧美激情一二三区| 亚洲电影在线看| 欧美激情小视频| 欧美成人四级电影| 欧美韩日一区二区| 亚洲国产精品成人综合| 欧美国产一区二区| 亚洲国产精品欧美一二99| 亚洲第一中文字幕在线观看| 欧美激情一区二区三区不卡| 亚洲成人在线视频播放| 欧美成人四级电影| 另类激情亚洲| 免费观看亚洲视频大全| 欧美成人69| 欧美日韩在线播放| 国产精品视频免费观看www| 国产精品你懂的| 国产婷婷精品| 在线观看亚洲视频| 亚洲美女区一区| 亚洲一区二三| 久久九九全国免费精品观看| 麻豆精品精华液| 亚洲人成高清| 亚洲视频每日更新| 欧美一区二区私人影院日本| 久久婷婷国产综合尤物精品| 欧美激情按摩在线| 欧美三区不卡| 国产一区二区观看| 亚洲人成网在线播放| 99精品国产热久久91蜜凸| 亚洲欧美日韩成人| 免费日韩av电影| 亚洲精品免费网站| 午夜精品久久久久久久久久久| 久久精品在线播放| 欧美区日韩区| 国产午夜精品在线观看| 亚洲经典三级| 欧美一区二区在线免费播放| 久久蜜桃av一区精品变态类天堂| 欧美激情一区二区三区全黄| 亚洲午夜羞羞片| 久久米奇亚洲| 国产精品乱码一区二三区小蝌蚪| 1204国产成人精品视频| 亚洲一级片在线看| 免费观看久久久4p| 亚洲一区二区综合| 欧美xxxx在线观看| 国产视频精品xxxx| 一区二区三区欧美视频| 美日韩免费视频| 一区二区三区四区精品| 久久久视频精品| 国产精品国产三级国产aⅴ无密码| 红桃视频亚洲| 午夜精品久久久久久久蜜桃app| 欧美激情网友自拍| 欧美在线电影| 欧美三日本三级少妇三99 | 国产日韩欧美在线播放| 9久草视频在线视频精品| 久久综合色影院| 亚洲一区二区免费看| 欧美日韩国产二区| 亚洲高清资源综合久久精品| 午夜精品久久久久久99热| 亚洲精品一区在线观看| 免费观看不卡av| 国产在线播放一区二区三区| 亚洲综合精品四区| 亚洲精品免费在线| 欧美电影免费网站| 亚洲激情电影在线| 狂野欧美一区| 欧美一级二区| 国产午夜精品理论片a级大结局| 亚洲一区二区三区精品在线 | 亚洲狠狠丁香婷婷综合久久久| 欧美专区福利在线| 国产亚洲精品久久久久久| 亚洲自拍高清| 在线视频中文亚洲| 国产精品久久久久久久久久久久 | 欧美片第一页| 亚洲精品四区| 亚洲国产精品999| 欧美成人资源网| 亚洲精品精选| 91久久精品一区二区三区| 欧美国产另类| 一区二区三区高清不卡| 一区二区三区四区国产| 国产精品乱人伦一区二区| 欧美在线91|