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

隨筆 - 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>
            亚洲精品看片| 91久久精品视频| 亚洲午夜三级在线| 亚洲精品国产精品乱码不99按摩| 久久综合伊人77777尤物| 亚洲国产精品久久久久婷婷老年| 欧美韩日精品| 欧美日韩国产系列| 欧美一区不卡| 久久综合成人精品亚洲另类欧美| 亚洲国产综合在线| 一本久久a久久免费精品不卡| 国产精品v欧美精品v日韩精品| 欧美一区激情视频在线观看| 久久精品在这里| 99国产一区二区三精品乱码| 亚洲影院免费观看| 尤物九九久久国产精品的分类| 亚洲国产精品视频一区| 国产女人水真多18毛片18精品视频| 久久精品视频va| 欧美精品久久久久久久久老牛影院| 亚洲在线免费观看| 美国十次成人| 欧美在线视频免费| 欧美另类变人与禽xxxxx| 欧美在线看片a免费观看| 老司机精品视频一区二区三区| 一区二区精品在线| 欧美一级黄色网| 中文在线资源观看视频网站免费不卡| 香蕉成人久久| 在线中文字幕日韩| 久久久激情视频| 午夜精品亚洲一区二区三区嫩草| 久久人人看视频| 欧美一区二区三区另类| 欧美日韩国产大片| 欧美成人精品在线观看| 国产精品一区久久久久| 91久久午夜| 亚洲国产精品999| 午夜日韩电影| 亚洲免费在线电影| 欧美国产欧美亚洲国产日韩mv天天看完整 | 蜜臀va亚洲va欧美va天堂| 午夜精品久久久久久久99水蜜桃 | 国产在线欧美| 欧美激情精品久久久久久免费印度| 欧美日韩一区二区三区视频| 蜜桃精品久久久久久久免费影院| 国产精品久久一区二区三区| 亚洲国产岛国毛片在线| 精品动漫3d一区二区三区免费版 | 亚洲精品一区久久久久久| 一区视频在线| 久久久久成人网| 久久久久久穴| 国产乱码精品一区二区三区不卡| 亚洲精品亚洲人成人网| 日韩视频免费在线观看| 牛牛影视久久网| 欧美激情视频在线播放| 亚洲第一视频| 麻豆精品视频在线观看视频| 麻豆av福利av久久av| 国内在线观看一区二区三区| 亚洲欧美制服中文字幕| 欧美综合国产精品久久丁香| 国产精品拍天天在线| 亚洲图片欧洲图片日韩av| 亚洲无毛电影| 国产伦精品一区二区三区四区免费| 亚洲视频在线二区| 欧美主播一区二区三区| 国产偷久久久精品专区| 久久精品天堂| 亚洲电影免费观看高清完整版| 亚洲国产一区视频| 欧美日韩和欧美的一区二区| 日韩写真在线| 久久精品夜色噜噜亚洲aⅴ| 狠狠久久综合婷婷不卡| 免费观看一区| 一区二区高清| 久久成人免费日本黄色| 亚洲盗摄视频| 欧美日韩免费高清| 欧美一区二区视频免费观看| 麻豆久久精品| 99在线精品视频| 国产欧美精品一区| 另类人畜视频在线| 亚洲精品在线电影| 欧美在线免费观看| 亚洲第一黄色| 国产精品magnet| 久久国产欧美日韩精品| 欧美丰满高潮xxxx喷水动漫| 9久re热视频在线精品| 国产精品一区视频| 美日韩免费视频| 一本大道av伊人久久综合| 久久综合成人精品亚洲另类欧美 | 国产精品xxxav免费视频| 欧美一乱一性一交一视频| 欧美成人在线影院| 欧美一区二区视频免费观看| 91久久精品www人人做人人爽| 欧美性片在线观看| 免费观看亚洲视频大全| 亚洲欧美日本精品| 99精品国产一区二区青青牛奶| 久久国内精品自在自线400部| 日韩视频专区| 亚洲国产精品成人久久综合一区| 国产精品免费久久久久久| 欧美大尺度在线| 久久久99久久精品女同性| 亚洲一区二区免费看| 最新国产成人av网站网址麻豆| 久久久久久夜精品精品免费| 亚洲欧美变态国产另类| 亚洲理论电影网| 亚洲第一视频| 1769国产精品| 国产在线精品二区| 国产美女扒开尿口久久久| 国产精品久99| 国产精品成人一区| 欧美丝袜一区二区三区| 欧美精品久久久久久久久老牛影院 | 欧美国产91| 久久综合伊人| 久久精品国产99国产精品澳门| 亚洲一区二区在线播放| 一区二区三区高清在线| 日韩亚洲欧美成人| 99热这里只有成人精品国产| 亚洲日本在线观看| 亚洲精品永久免费| 日韩视频免费在线| 夜夜夜久久久| 亚洲视频观看| 午夜精品久久久久久久白皮肤 | 欧美丝袜一区二区| 欧美日韩另类综合| 欧美另类99xxxxx| 欧美日韩一区二区三区四区五区| 欧美精品一区二区三区视频| 欧美黄网免费在线观看| 欧美成人免费播放| 欧美日韩国产不卡在线看| 欧美视频四区| 国产精品自在线| 国产日产欧产精品推荐色| 国产老女人精品毛片久久| 国产欧美日韩一区二区三区在线观看 | 午夜精品久久久久久久99热浪潮| 亚洲欧美国产高清| 欧美伊人久久| 久久综合狠狠综合久久综合88| 久久午夜精品| 亚洲福利在线视频| 亚洲区欧美区| 亚洲一区二区在| 久久久国产一区二区三区| 你懂的视频一区二区| 欧美三级午夜理伦三级中视频| 国产精品美女久久久| 黄色成人在线| 中文在线资源观看网站视频免费不卡 | 国产精品久久久久久久久免费| 国产欧美日韩三级| 在线观看精品一区| 日韩亚洲欧美精品| 久久国产免费看| 欧美激情一区二区三区高清视频 | 一本色道久久88精品综合| 亚洲少妇中出一区| 久久久久久久尹人综合网亚洲| 欧美wwwwww| 国产一在线精品一区在线观看| 亚洲国产一区视频| 久久成人久久爱| 亚洲人成亚洲人成在线观看| 亚洲欧美一区二区激情| 免费成人av在线看| 国产人成一区二区三区影院| 亚洲精品一品区二品区三品区| 欧美一级久久久| 亚洲国产91色在线| 欧美一区二区三区啪啪 | 欧美一区影院| 欧美日本免费| 在线欧美福利| 久久久久久999| 亚洲免费中文字幕| 欧美精彩视频一区二区三区| 国产综合色在线视频区|