Formerly I developed client/server MIS application using VB. Now I am trying to migrate the old system to J2ee architecture.
Because I am familiar with VB, I still choose VB as my stand-alone wbe client develop tool,client will use XML/HTTP to communicate with servlet,then servlet access DBMS by JDBC.The test has passed. But there still some question confused me.
1.Client use XML/HTTP to communicate with middle tier,how about the performance about HTTP,If it can quickly repond to a large number of concurrent user request?
2.If I should use EJB tech?.Now servlet receive client's request and construct a SQL string and send to DBMS by JDBC, then servlet will get result set and send back client. What's the advantage of using EJB tech? If I use EJB, how to implement the 2 scenario?
Hope to get your commnets
Firstly, HTTP. If your client applications will be making lots of requests to the servlets then the main expense is in forging the network connection. Make sure you use HTTP 1.1 with keepalive so that the socket connection is maintained.
Also, consider that serializing XML over that stream is a relatively expensive operation in CPU terms. That said, I have taken that exact approach on a project I recently worked on and it worked wonderfully.
With regards the second part, look at it like this.
1) You have some server side code that gets data from data stores.
2) You have multiple ways of getting at that data.
What you need is some client protocol independant code to get the data, it can generate org.w3c.dom.Document objects and pass them back to an outer Facade layer which knows how to get it back to the client.
You could use stateless session beans as second interface to this system, but I wouldn't bother if you're using VB on the client side.
As for using the entity bean parts of EJB, think about the transactional needs of your system. If you are accessing the back end using http, to WRITE data, then you have a problem anyway, since the HTTP socket could die whilst the transaction is half way complete. Until the servlet tries to write data to you, it won't know you've gone away, so it could complete a transaction which you think you aborted. (That's why all the ecommerce web sites warn you not to press cancel or to press the submit button more than once!)
It's hard to answer this part of the question without more information about what the system is meant to do, and what it's non functional requirements are...
Thank you for your valuable comments.
Maybe I should describe our application scene in detail: multi warehouse,two kind of user interface, one is browser for the remote customer to tracking inventory, the other is stand-alone application for warehouse operator, for the latter, it need quick response,concurrent process,high volume transaction process.For the latter, I can not decide the commucation protocol between client and middle tier.
One is HTTP, because the UI's complexity and familiarity, we can use VB as our client dev tool, but I can not confirm if HTTP can satisfy the performance requirement of app.
the other is RMI/IIOP, as Sun said,the best EJB client dev tool is Java, our team know little about Java GUI dev, Sun also said you can use non-Java tool as EJB dev tool,but apparently it need some third party convertor,How about the performance of RMI/IIOP and programming complexity?
Any suggestion welcomed!
Thanks for letting me know that I am not the only one trying to use VB with EJB :-)
I was also trying to migrate my applcation to J2EE framework and as VB was the tools used and we are familier wiht it, I decided to do some research on it before I started working on the applciation.
Can you give me a bit more details about how did you use VB with HTTP to communicate with the serverlet?
For your question regarding EJBs, what I came to know till now is that you'll have to use some containers or Java applciation servers which gives you COM/DCOM proxies for hte EJBs and then you can call them from VB as if it were COM components.