Bigwood Liu wrote:Stored procedure might have better performance, but it is part of solution in C, and it is bad on scalability and remote access.
I prefer C
cool preferece your preference of c
I just got my cup of
coffee and want to debate. so let's debate merrits and problems with solution. I don't mean any offense.
Performance: (transactions/second)
Can we both agree that a tomcat webcontainer will out perform a full blown comercial EE containter (weblogics, websphere, oracle app server)? It has been a long time since I used tomcat, but tomcat was only a web container, but may have added on. I also have not used weblogics since 8 but the commericial servers above always started both servlet and
ejb container. It is my understanding that when EE6 rolls out that the server can decide what not to launch. So if we use option C- there is no need for the web container. Then why spend the cpu cycles to spin up and maintain the web container when those cycles can be used to handle requests.
Vertical Scaling:
remains the same in either case. throw faster cpu's, more memory, faster disk, a seperate ethernet for the servers to communicate to the DB on.
Horizontal scaling:
1) adding multiple instances: once again add another tomcat or weblogics container. In my opinion the same thing.
2) It has been a long time since I read the spec. but containers must appear to be running 1 instance of SLSB's or servlets. They can choose to run multiple copies of SLSB's to handle requests. Ok you may have me on servlets. Servlets there is only 1 instance, SLSB's can spin up multiple instances if the container vendor has implemented that feature, problem it is an optional feature
Remote Access:
A http request to a servlet is a remote request by it's nature. I have rarely seen any firewall that blocks port 80. So A servlet webservice provides remote access.
So the remote issues we are trying to decide is, " which is faster to serialize an object graph. Use a servlet with JSON or XML, OR a SLSB serializing with XML or standard java serialization." If both are serializing with XML it should be equal. If the SLSB is serializing useing "RMI-IIOP" still probably equal to convert to corba format. I would think that serializtion would be faster if serialization was "RMI" only.
I until you get to 100+ requests a second serializing large graphs. I doubt serialization time would play much of a factor in your decision, and then at that point
you should be writing custom serialization objects
Well I am looking forward to response. Perhapse there is some aspect I have not considered. sleep time