1 Study of Database Reliability and Performance in VCL By Yeshwanth Kumaraswamy , North Carolina State University Abstract —This Independent study Report aims OPNET. All that is needed to make use of this to solve certain problems experienced by the facility is a valid ID and an Internet connection. current VCL system, including response slowdowns when multiple users query the system Thousands of student access VCL daily, load on the for statistical information, Section 2 handles this System seems to increase significantly, and hence part of the problem. We also address the the ever increase need for performance problem related to backing up large amounts of enhancement. The future plans to extend the access data at frequent intervals of time, and as to how to VCL to students who are not part of NC State to decrease the backup turn around time of the University rings an alarm, and has raised several database component of the system. performance related issues which are discussed in the following sections. There are some major and The solution to these are discussed in Section 3.This report also highlights the major minor changes as suggested in the rest of the report. differences between MYSQL and PostgreSQL, and tries to arrive at a conclusion as to which We aim to enhance the performance by a one of these is best suited for VCL environment. considerable extent. The current VCL system The solution to this is presented in Section 4 of doesn’t make use of stored procedure and hence the report. increases the system load as the entire result set has to be returned. Hence, increases the memory Finally, the problem of whether to distribute demand and caused certain scripts to terminate database services in a single VCL system is prematurely. Many queries currently in use can be addressed in Section 5 of the report. I have tried modified to perform better by making use of better to address these problems with the help of operators and paraphrasing the query based on the simulations, code and theoretical solutions. The nature of the query. The engine used with each actual code has been replaced by plain textual of the table has also been modified depending on description, and the simulation results are the nature of the tables and based on the nature of included in form of a table. the data stored in them. Significant concurrency can be achieved using specific type of table, and decreases the response time. I. INTRODUCTION T his part of the report aims to describe the A detailed comparison between the two leading functionality of the VCL system. The VCL system open source database system is carried out on the is a complex system which allows the user to basis of several parameters that are relevant to VCL reserve a computer with desired set of applications system and a logical conclusion is derived as to and remotely access the reserved system. This which database system is better for VCL provides great deal of flexibility. VCL allows user environment and if a transformation is desired is it to use popular applications like MATLAB,SAS etc feasible. Additional complexity is introduced as the and provides many simulation environments like 2 database system is maintained by a third party and If the application code is written entirely outside of hence convincing them for such a transformation the database, each of these steps would require a could be difficult. network round trip between the database and the application. The time taken to perform these Since the VCL is going to expand, by being open to network trips can easily dominate overall user other community colleges, the number of users will response time. significantly increase in the near future. Hence it B. The solution would make sense to distribute the database services. This part of the solution is discussed in Stored Procedures, allowing to query to be Section 5 of the report. The objective of this report executed on the server and the results to be sent is to address all these problems and provide back , thus avoiding the entire table from being satisfactory solutions to each of the aforementioned loaded into the memory. Client/Server applications problems. Section 6 of this report also predicts the typically have to balance the load between the client possible outlook of VCL in the future, where the PC and the relatively more powerful server services is made open to different regions (divided machine. Using stored program is one of the ways to reduce the load on the client, which might into quadrants). This schematic diagram differs [14] significantly from the cluster based model. This otherwise get overloaded . model involves lot of complication as presented in Network bandwidth is often a serious section 6, but it can also result in a very robust and constraint on client/server applications, execution of efficient system designed to cater the needs of multiple server-side operations in a single stored number of users. program could reduce network traffic. Also, maintaining correct versions of client software in a Section 7 gives the conclusion and future work in client/server environment was often problematic. this domain. Section 8 gives the list of all references Centralizing at least some of the processing on the both Web and bibliographical. server allowed a greater measure of control over core logic. II. HOW TO AVOID AND MITIGATE DATABASE Stored programs offered clear security advantages, REPONSE SLOWDOWNS WHEN MULTIPLE because in the client/server paradigm, end users CONCURRENT REQUESTS ON STATISTICS ARE SENT typically connected directly to the database to run TO THE SYSTEM . the application. By restricting access to stored A. The Problem programs only, users would not be able to perform ad hoc operations against tables and other database There are restrictions on the size of the script that structures. Hence, stored programs can improve the can be in the memory at a particular point of time security of your database server [6] . (say 32 megs), which results in termination of certain scripts hence resulting in an additional delay. Stored procedures add a extra layer of Abstraction The use of stored procedure obviates this problem, to the existing software application. Which means by ensuring only the result sets are returned. that as long as the interface remains the same the underlying table s can change any number of times , [1] One scenario that takes place in the VCL System without any noticeable change in the application. involves an application that may need to accept By using this layer of abstraction we can prevent a input from the end user, read some data in the potential attacker from knowing the structure of the database, decide what statement to execute next, underlying tables. Hence data become safe from retrieve a result, make a decision, execute some being exposed to the outside world [1] SQL, and so on. Stored programs offer a mechanism to abstract data access routines, hiding your implementation behind 3 a procedural interface and making it easier to evolve SQL, and so on. If the application code is written your data structures over time. entirely outside of the database, each of these steps would require a network round trip between the Stored programs can be used to implement database and the application. The time taken to functionality that is needed and can be called from perform these network trips can easily dominate multiple applications, and from multiple places overall user response time. within a single application. Stored programs will reduce network traffic C. Figure considerably. The evidence is this presented in the figure below. Another security advantage inherent in stored programs is their resistance to SQL The figure below shows abstract functioning of a injection attacks. stored procedure here a user named Bob calls a stored procedure called validate_name. The stored Carefully written stored procedures may allow for procedure accesses the table users to find out if the fine grained security permissions to be applied to a name exists and return only the result hence doesn’t database. Each stored procedure written for mysql eat up the memory. can contain security level as either definer or invoker, the former allows the stored procedure to It also mitigates the memory requirement as all be executed with the permissions set for the the execution takes place on the server side and only invoker, the latter allows the procedure to be the result set is being retuned. Hence no more executed with the permissions of the definer who premature termination of script will take place as wrote the code, so the procedure can access all the the memory limit placed on the size of script will tables and data to which the definer is entitled. not increase. And since the only results are returned Hence, client programs might be restricted from accessing the database via any means except those the network will be kept to minimum. that are provided by the available stored procedures The procedure validate_name() can run directly [14] . within the database engine. In a production system, Stored procedures allow for business logic to be this typically means that the procedures run entirely embedded as an API in the database, which can on a specialized database server, which has direct simplify data management and reduce the need to access to the data being accessed. The benefit here encode the logic elsewhere in client programs. This is that network communication costs can be avoided may result in a lesser likelihood of data becoming completely. This becomes particularly important for corrupted through the use of faulty client programs. complex series of SQL statements.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages27 Page
-
File Size-