6/4/98SIGMOD'98 -- Cornell Predator Project1 Secure and Portable Database Extensibility Tobias Mayr Michael Godfrey Praveen Seshadri Thorsten von Eicken Cornell University
6/4/98SIGMOD'98 -- Cornell Predator Project2 Web based OR-DBMS n Web based access n Extensible server n Functionality in object methods Client OR-DBMS Server Queries Results Connectivity Software SELECT S.Company, S.QuoteHistory.WeeklyAvg() FROM Stocks S
6/4/98SIGMOD'98 -- Cornell Predator Project3 User Defined Functions Ü Portability Ü Security Ü Efficiency ? Client OR-DBMS Server Queries Results Connectivity Software Uploading Methods SELECT S.company FROM Stocks S WHERE S.TimeSeries.myAnalysis()>0
6/4/98SIGMOD'98 -- Cornell Predator Project4 Portability & Security n UDF execution environment of the client similar to that of the server Ü Design & Testing on client site n Granularity of control: u Execution errors u Memory access u System resources u Quality of Service attacks
6/4/98SIGMOD'98 -- Cornell Predator Project5 Alternative Solutions n Client site execution n Integrated, native execution n Execution in separate process n Software Fault Isolation n Proof Carrying Code n Interpreted languages n Safe languages n Typed Assembly Language n Java Virtual Machine Language based O/S based
6/4/98SIGMOD'98 -- Cornell Predator Project6 Integration of the JVM n Ubiquitous in browsers and with native interfaces n Interpreted/Compiled (JIT) Client Connectivity Software Browser JVM Classloader Security Manager JVM NI Server System Resources Java UDFs Native Methods
6/4/98SIGMOD'98 -- Cornell Predator Project7 Performance Components n Invocation n Execution u Data access u Computation n Callbacks Execution Engine UDF
6/4/98SIGMOD'98 -- Cornell Predator Project8 n Large objects are passed by reference n Selective retrieval : u only certain objects u only parts of objects n Argument overhead vs. control switches Callbacks Execution Engine UDF
6/4/98SIGMOD'98 -- Cornell Predator Project9 Comparisons n Trusted execution inside server process n Execution in separate process n Execution on JVM inside server process Ü Platform: PREDATOR on a Sparc20 with 64MB of memory running Solaris 2.6. JVM: JDK (includes JIT)
6/4/98SIGMOD'98 -- Cornell Predator Project10 Experimental Setup SELECT UDF(R.ByteArray, NumComps, NumDataAccess, NumCallBacks) FROM ByteArrays R ByteArrays R: Tuple, one attribute ByteArray: Array of bytes (size: ) NumComps: Number of executed integer additions NumDataAccess: Number of iterations over ByteArray NumCallBacks: Number of executed callbacks
6/4/98SIGMOD'98 -- Cornell Predator Project11 Calibration
6/4/98SIGMOD'98 -- Cornell Predator Project12 Invocation Overhead n No data access, computation, or callbacks Ü Control switch cheaper for JVM Ü Costs of argument passing
6/4/98SIGMOD'98 -- Cornell Predator Project13 Invocation Overhead, absolute
6/4/98SIGMOD'98 -- Cornell Predator Project14 Invocation Overhead, relative
6/4/98SIGMOD'98 -- Cornell Predator Project15 Execution: Computation n Argument size bytes, no data access, no callbacks Ü No significant overhead
6/4/98SIGMOD'98 -- Cornell Predator Project16 Computation, absolute
6/4/98SIGMOD'98 -- Cornell Predator Project17 Computation, relative
6/4/98SIGMOD'98 -- Cornell Predator Project18 Execution: Data Access n bytes, no computation, no callbacks Ü High overhead, caused by array bounds checks
6/4/98SIGMOD'98 -- Cornell Predator Project19 Data Access, absolute
6/4/98SIGMOD'98 -- Cornell Predator Project20 Data Access, relative
6/4/98SIGMOD'98 -- Cornell Predator Project21 Callbacks n bytes, no computation, no data access Ü Cheap control switch with native interface
6/4/98SIGMOD'98 -- Cornell Predator Project22 Callbacks, absolute
6/4/98SIGMOD'98 -- Cornell Predator Project23 Callbacks, relative
6/4/98SIGMOD'98 -- Cornell Predator Project24 Results n Low overheads for invocation, computation, and callbacks n Data access overhead dynamic checks n Overheads for UDFs small in context of processing of real queries Ü JVM forms an efficient safe execution environment for OR-DBMS
6/4/98SIGMOD'98 -- Cornell Predator Project25 Caveats n Portability across different JVM versions n Off-the-Shelf JVMs cause integration problems n Security flaws of the JVM
6/4/98SIGMOD'98 -- Cornell Predator Project26 Future Work - Jaguar Project n Security u Execution environment on server site with fine grained system resource control u Integration of J-Kernel resource management n Portability u Execution environment on client site integrated with query processing u Optimization of client site UDFs
6/4/98SIGMOD'98 -- Cornell Predator Project27