Hi Robin,
I don't want to be defensive, but I still want to make things little bit clear.
一、关于Cluster
Jevang,banq,我对Cluster确实没有什么研究,虽然没有发言权,但是想谈谈自己的想法。
在我看来,实现load balance并非要用Cluster,DNS循环解析就是一个简单易行的load balance,Yahoo就是这样做的。而且做load balance我觉得更多的是网络软硬件环境的支持,而不是Web Server或者App Server来实现的。做Cluster并不是把几个JBOSS或者WebLogic配置好就行了,主要还要涉及很多网络存储的问题,所以我觉得这是另外一个领域的问题。
<< you are right about hardware support, but I though we are just talking about JVM based app servers, so let's stay in this topic. My co-worker wrote an excellent paper about GC( actually IBM also has lots of Redbooks on this subject, only GC will be enough reason to force people to use multiple VM on multi-processor boxes. >>
二、关于.net的开发效率问题
Jevang,我并不是指开发desktop application,我指的是做架构完整的Web应用。
<< That's what I am talking about, full life cycle, multi-tier app, Business logic, persistence, Modeling,DB schema gen/reeng, code gen, appserver deployment etc. Reason I want to point out desktop app is I want to separate it from HTML based presentation development in topas, before topas integrated with some nice UI tool( dreamweaver e.g), it's relying on text editor to build JSP page( though I use visualstruts tools for flow control), can't compete .NET studio, nor to many solid JSP studios. >>
banq,我也并不是因为TMC的.net petstore vs j2ee petstore评测报告来认定.net开发效率高的。对于TMC的这个评测,基本上是毫无价值的。
其实我觉得去亲手做做就知道了,举一个例子来说:
在j2ee中开发分布式组件,我想大家肯定都会采用EJB,不会直接选择RMI编程了吧,但即使开发一个SLSB,也需要写一个Bean,两个接口,和1个或更多的XML格式或其他格式的EJB配置文件吧,如果你没有一个自动化程度高的支持EJB代码和配置文件自动生成的IDE工具,EJB开发绝对不是轻松的事情。无论如果你都不能否认开发一个EJB起码要比开发一个Java Class在难度上要高很多,而在开发效率上要低很多吧,在调试上要困难很多吧,在概念的复杂程度上要高很多吧。
而对于客户端调用这个EJB,也不能像new 一个class那么轻松对吧?要用JNDI查找得到Home接口的stub类,然后create方法调用再得到Remote接口的stub类,然后就可以像使用一个普通class那样来用了,但仍然要处理RemoteException。
<< Do you mean J2EE == "Anything has to be CMP EJB"? if yes, I don't agree with your definition, but admit you make a valid point, except I will say things are changing very fast. it's just getting better every few months. Ago, don't limit your choice to just few vendors.
If you open up your definiton about J2EE application, which is I think you should anyway, then things are better brighter even as today. e.g. In topas, all business objects by default are just POJO, unless you declare them to be EJB or publish it as webservices. Want to remote access the data for those BO, you get it thru a standard client side lib >>
可是.net中开发分布式组件,就像开发普通的Java Class完全一样,调用分布式组件就像new一个class一样。和你写一个普通的Java class完全没有任何分别。
服务端组件存放在IIS的一个Web App的bin目录下(类似于Java Web App的WEB-INF\classes),如果你想把某个.net Assembly(概念上等同Java的class)变成分布式组件,那么你需要做的唯一的事情就是在web.config(类似于web.xml)里面加一行,声明这个.net assembly为远程组件。剩下的工作全都交给ASP.net来完成了。
而客户端调用远程组件与之类似,需要在某调用代码的配置文件里面声明用的组件不是本地的,而是来自于某个URL。然后客户端new一个远程class,就可以用了。
所以在.net中,没有开发远程组件的概念,因为一个组件是本地组件还是远程组件在代码上是没有任何分别,只是在你部署的时候,根据情况指定它是否是一个分布式组件。
想想在Java中开发,配置,部署,和客户端调用EJB的过程,然后再看看.net中仅仅是写一个普通的cs程序(等于Java程序),然后在服务端配置文件中加一行声明,在客户端配置文件加一行声明,就可以new出来,调用了。开发效率是不是差很多啊?
<< Though i still don't believe .NET has the upper hand, but I like the comparison you made here, seems very objective to me. It's a close game between JAVA vs. NET in term easy of use for small to medium size app dev, that's why I want to integrate .NET with Topas Server tier thru Web services.
For large enterprise system dev, on which my eyes are, we have to think about efficiency from different perspective, it's no longer about drag-drop-click and bingo. I guess we'd better start a new thread for that debate. >>
Nice to talk to you
-Jevang