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

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

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

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

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


只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
網(wǎng)站導(dǎo)航: 博客園   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>
            中文日韩在线视频| 午夜精品在线看| 亚洲午夜电影| 亚洲精品影院在线观看| 欧美连裤袜在线视频| 亚洲作爱视频| 亚洲永久免费av| 国产毛片一区二区| 久久精品一区二区| 久久久一区二区| 91久久精品美女高潮| 亚洲人成啪啪网站| 欧美体内she精视频在线观看| 亚洲午夜黄色| 欧美专区第一页| 亚洲级视频在线观看免费1级| 最新国产の精品合集bt伙计| 亚洲视频在线播放| 国产欧美日韩不卡| 欧美高清一区二区| 欧美亚洲第一区| 久久婷婷影院| 欧美日韩精品在线观看| 久久精品国产99国产精品| 久久久国产成人精品| 亚洲毛片一区二区| 欧美一乱一性一交一视频| 亚洲国产天堂网精品网站| 国产精品99久久久久久宅男 | 欧美激情一区二区三级高清视频| 欧美区一区二| 久久久久久**毛片大全| 欧美精品一区二区三| 久久精品亚洲乱码伦伦中文| 欧美r片在线| 久久久精品日韩欧美| 欧美日韩精品在线观看| 久久夜色精品国产亚洲aⅴ| 欧美视频中文字幕在线| 欧美电影免费观看高清完整版| 国产精品毛片大码女人| 亚洲高清二区| 激情久久久久久| 亚洲午夜电影在线观看| 99国产精品99久久久久久| 久久精品二区| 久久国产精品高清| 国产精品黄页免费高清在线观看| 欧美va天堂在线| 国内精品美女av在线播放| 国产精品99久久久久久久女警| 亚洲人成在线观看网站高清| 久久九九电影| 久久久久欧美精品| 国产精品亚发布| 亚洲天堂成人在线观看| 亚洲最快最全在线视频| 欧美xx69| 亚洲国产专区校园欧美| 亚洲国产一区二区视频| 久久影院午夜论| 欧美高清在线一区二区| 在线观看福利一区| 91久久中文字幕| 亚洲国产aⅴ天堂久久| 久久久水蜜桃| 免费中文字幕日韩欧美| 精品成人一区| 老司机精品视频一区二区三区| 久久久午夜精品| 一区三区视频| 乱码第一页成人| 亚洲国产精品va在线观看黑人 | 欧美福利专区| 亚洲国产精品视频| 亚洲伦理中文字幕| 欧美色视频一区| 亚洲在线播放电影| 久久久国产精品一区二区中文| 国产一区二区毛片| 久久久久久久久久久久久9999| 免费一级欧美片在线播放| 1769国内精品视频在线播放| 男人的天堂亚洲在线| 亚洲茄子视频| 欧美一级片一区| 狠狠色丁香婷婷综合久久片| 麻豆精品91| av72成人在线| 久久精品国产99国产精品| 一区二区在线不卡| 欧美精品在线免费观看| 亚洲香蕉伊综合在人在线视看| 久久精品亚洲精品| 亚洲精品久久嫩草网站秘色| 欧美新色视频| 久久久久国内| 一本久道久久综合婷婷鲸鱼| 久久精品午夜| 日韩亚洲在线观看| 国产日韩欧美综合| 欧美成人精品在线播放| 亚洲一区欧美一区| 亚洲成色精品| 久久成人18免费观看| 亚洲激情第一区| 国产精品主播| 欧美激情一区在线| 久久经典综合| 亚洲图片欧洲图片av| 欧美国产精品久久| 欧美在线观看日本一区| 亚洲理论电影网| 国产一区二区三区日韩欧美| 欧美极品在线视频| 久久久久99| 亚洲综合国产| 亚洲欧洲视频在线| 久久综合色综合88| 性欧美超级视频| 一区二区三区视频在线| 亚洲国产高潮在线观看| 国产欧美一区二区三区另类精品| 欧美国产一区二区在线观看| 欧美在线视频一区| 亚洲女同精品视频| 99精品久久久| 亚洲精品资源美女情侣酒店| 欧美成人免费一级人片100| 久久福利影视| 欧美一区91| 亚洲欧美中日韩| 亚洲亚洲精品三区日韩精品在线视频| 1000部精品久久久久久久久| 国产亚洲综合在线| 国产欧美日韩视频一区二区三区| 欧美日韩少妇| 欧美视频导航| 国产精品二区三区四区| 欧美日韩亚洲高清一区二区| 欧美激情精品久久久| 蜜桃精品久久久久久久免费影院| 久久久久久久久久看片| 久久久91精品| 久久亚洲一区| 免费人成网站在线观看欧美高清| 快播亚洲色图| 欧美高清日韩| 欧美精品成人91久久久久久久| 女同一区二区| 欧美日韩精品综合| 国产精品二区影院| 国产精品午夜在线观看| 国产欧美91| 一色屋精品视频在线观看网站| **性色生活片久久毛片| 亚洲国产一区二区视频| 一本色道久久88精品综合| 亚洲午夜av在线| 欧美一区二区三区的| 久久午夜视频| 亚洲福利专区| 一区二区三区欧美视频| 香蕉亚洲视频| 麻豆成人在线观看| 欧美日韩岛国| 国产欧美一区二区精品性 | 欧美午夜美女看片| 国产精品亚洲欧美| 在线观看成人av电影| 亚洲免费高清视频| 午夜欧美精品| 美女精品网站| 一区二区三区视频在线| 欧美一区二区三区四区视频| 免费观看亚洲视频大全| 欧美午夜精品久久久久久久| 国产一区二区三区最好精华液| 1204国产成人精品视频| 在线视频一区二区| 久久性色av| 在线亚洲观看| 狂野欧美激情性xxxx欧美| 国产精品多人| 91久久在线观看| 久久99伊人| 亚洲三级电影在线观看| 欧美尤物巨大精品爽| 欧美日本亚洲韩国国产| 国产一区二区三区四区老人| aa亚洲婷婷| 卡通动漫国产精品| 亚洲午夜一区| 欧美大片一区二区三区| 国产综合婷婷| 香蕉久久夜色| 日韩视频不卡中文| 欧美大片在线看| 亚洲第一黄网| 久久女同精品一区二区|