Results 1 to 3 of 3
  1. #1
    MyTimeFinder is offline Member
    Join Date
    Dec 2011
    Posts
    4
    Rep Power
    0

    Default Java web app to replicate/replace stored procedures in MS-SQL based application

    I am relatively new to Java, though not to programming in general. I have an application currently with an asp.net front end and ms/sql back end that I would like to enhance with Java. My question is whether as a general concept this would be an appropriate use of Java? Looking for a sanity check.

    The problem:

    I manage a web app where many concurrent users access relatively few records from a SQL database and then do a significant amount of manipulation of those records. In general my users access between 10 and 50 records at any one time with approximately 20 fields. In database terms this is tiny. However, each record is then manipulated by a series of stored procedures that evaluates, sorts, updates, etc., fields within each record. All that manipulation is happening within MS-SQL via stored procedures on the server. This is a problem for two reasons:

    1) stored procedures are unbelievably inefficient users of CPU cycles. A computer rendering in real time amazing 3d graphics or analyzing sound and manipulating it in real time is getting bogged down by a few thousand lines of stored procedure code. Our server is bogging down with very few users. The problem is approaching critical for us.

    2) having the "thinking" happen in SQL ties us to MS-SQL. We want the freedom to move to other databases or apply our algorithms in other situations.

    The proposed solution:

    What I would like to do is replicate the stored procedures in a Java web app that runs on the client's computer. Ideally, the Java app would:

    a) be downloaded onto the client's computer only as needed (i.e. returning clients would not have to re-download every time they access the database).
    b) The Java app would be transparent to the user. The user would access the database through our web portal application and never know that the "thinking" was happening on their local computer.
    c) A call for data would be made through the asp.net web portal that would invoke the java web app.
    d) The Java app would pull the raw data from the SQL database into a local array and then apply the various algorithms to update selected fields (and even add new fields to each record).
    d) Finally, the Java app would return to the asp.net call the now manipulated array.

    The benefits we anticipate:

    We believe that since cpu rather than bandwidth is causing us problem that we can solve that problem by making the data manipulation happen on the client side through a Java app. We think this would speed up significantly our procedures and allow for more concurrent users. We also believe Java is the appropriate vehicle because client side scripts are compiled on the fly and that makes our proprietary processes available to all and greatly slows down the system. We understand that a Java web app is downloaded to the client computer pre-compiled.

    So my question is basically a sanity check from the experienced Java community. Are there any assumptions in what I have laid out that are obviously wrong? For example, is there some reason an asp.net web portal cannot invoke a Java web app to retrieve data from a MS SQL database? Can a java web app be used to manipulate records retrieved from SQL and deliver the results to the web portal? Is there anything about the Java architecture I am missing that would negate any performance improvements of moving the data manipulation to the client? Am I correct that a compiled small footprint app is what is downloaded by the server in a Java web app? Can anyone suggest sample code (from an open source project, etc.) as an example?

    Thanks!

  2. #2
    ozzyman's Avatar
    ozzyman is offline Senior Member
    Join Date
    Mar 2011
    Location
    London, UK
    Posts
    797
    Blog Entries
    2
    Rep Power
    4

    Default Re: Java web app to replicate/replace stored procedures in MS-SQL based application

    Go ahead with the Java client-side app but keep the other option open too - the users will choose whichever option is more convenient or faster (which should be the client app unless running on a mobile computer).

    You can get the JDBC driver from Microsoft's website
    Microsoft JDBC Driver for SQL Server

    Of course, Java is capable of all the features you outlined from A-E.

    "Java client technology integrates seamlessly with ASP.net technology."
    Read more: Java Applets, ASP.net - Can You Play Together?

  3. #3
    MyTimeFinder is offline Member
    Join Date
    Dec 2011
    Posts
    4
    Rep Power
    0

    Default Re: Java web app to replicate/replace stored procedures in MS-SQL based application

    Quote Originally Posted by ozzyman View Post
    Go ahead with the Java client-side app but keep the other option open too - the users will choose whichever option is more convenient or faster (which should be the client app unless running on a mobile computer).

    You can get the JDBC driver from Microsoft's website
    Microsoft JDBC Driver for SQL Server

    Of course, Java is capable of all the features you outlined from A-E.

    "Java client technology integrates seamlessly with ASP.net technology."
    Read more: Java Applets, ASP.net - Can You Play Together?
    Thanks for the sanity check. I have too often started down logical sounding development paths only to discover some key limitation in the architecture. I have not had any warnings like, "there is no way for Java to manipulate recordsets once they have been retrieved by JDBC," or "Every time a user calls the database the entire Java applet will have to be compiled and download onto the client machine," or "Java applets must have a console and must display on screen." With your encouragement I feel confident to begin diagraming out the project ahead.

    Thanks.

Similar Threads

  1. Executing stored procedures
    By mew in forum JDBC
    Replies: 3
    Last Post: 08-20-2008, 05:47 PM
  2. Stored Procedures
    By geeta_ravikanti in forum JDBC
    Replies: 1
    Last Post: 04-22-2008, 02:34 AM
  3. Stored Procedures with java
    By Albert in forum JDBC
    Replies: 4
    Last Post: 06-08-2007, 05:59 AM
  4. stored procedures in Hibernate
    By Alan in forum JDBC
    Replies: 2
    Last Post: 05-31-2007, 04:49 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •