SlideShare a Scribd company logo
PLSQL Commons v1.0
How to enrich the programmer's PLSQL toolkit


Arnold Reuser
Agenda



  1        Serving a need

  2        What PLSQL Commons can do for you

  3        How you can make a difference




Page  2                      PLSQL Commons v1.0
Serving a need

Reusable PLSQL Components

 PLSQL Commons is a project focused on creating and maintaining
  reusable PLSQL components.
 Components that will enrich the PLSQL programmer's toolkit
 Components that promote the programmers shift from solving purely
  technical problems to actual business problems




Page  3                      PLSQL Commons v1.0
Serving a need

Reusable PLSQL Components

 PLSQL Commons is used by a CRM service provider of General Motors
  to handle their specific needs
 Used on their production Oracle database servers as the defacto standard
  components for the past three years




Page  4                       PLSQL Commons v1.0
What PLSQL Commons can do for you



 Current status
 Practical applications




Page  5                   PLSQL Commons v1.0
Current Status

There are several upcoming sandbox components not mentioned.
This presentation will focus on just a few components.

           Component      Focus
           plsql_async    Parallel processing of tasks

           plsql_cache    General purpose memory based caching

           plsql_error    Exception management

           plsql_file     Reading and writing operating system text files

           plsql_ftp      Copy a file from one host to another based on the ftp protocol.

           plsql_host     Executing a command in the host environment

           plsql_log      Logging application behavior

           plsql_match    Text search engine

           plsql_test     Writing repeatable unit tests

           plsql_timeit   Measuring the execution time of a program unit

           plsql_util     General purpose utilities

           plsql_soap     Lightweight webservices based on the soap protocol


Page  6                          PLSQL Commons v1.0
Practical Applications

Parallel processing of tasks




 Imagine a potential pipeline of an ETL process to load CRM data.
 The pipeline passes several processing elements.



Page  7                       PLSQL Commons v1.0
Practical Applications

Parallel processing of tasks




 If the elements Address and Communication are independent.
 The pipeline could be organized to process these elements in parallel



Page  8                       PLSQL Commons v1.0
Practical Applications

Parallel processing of tasks




 Fundamental questions :
   • How can you maintain the processing flow?
   • What if Address and Communication would like to pass their identifiers?



Page  9                           PLSQL Commons v1.0
Practical Applications

Parallel processing of tasks




 The answers provided :
   - plsql_async can be used to route and maintain the processing flow
   - plsql_async can be used to pass information between sequential processes
   - plsql_cache can be used to cache session and cross-session based information
 Read the user guide for more details on this.
 If your interest in building a processing flow. Read the book Enterprise Integration Patterns.

Page  10                                PLSQL Commons v1.0
Practical Applications

Exception management

    Assertion at any location you assume will not be reached.

  gender char(1) := 'A';
  plsql_test.assert(gender in ('M','F'),'Gender can be M or F; current value is {1}',varchars_t(gender));




    Error to identify an exceptional condition that an application might want to catch

 soapFaultReason varchar2(100) := ImportDataRecord has been invoked at an illegal or inappropriate time.';
 err.raise(err.SOAPFaultException,'operation raised exception : {1}',varchars_t(soapFaultReason));




Page  11                                             PLSQL Commons v1.0
Practical Applications

Testing application behavior

 plsql_test is a testing facility for the plsql programming
 plsql_test will help you :
   - measure your progress, spot unintended side effects, and focus your
     development efforts
   - without automated testing tools like this facility retesting can be a tedious and
     inaccurate process.
   - by allowing the testing process to occur frequently and automatically, you can
     keep software coding errors at a minimum




Page  12                             PLSQL Commons v1.0
Practical Applications

Testing application behavior

       Developing a test suite
 create package body test_plsql_util_pck
 as
      procedure t_varchars
      is
       vt1 varchars_t:= new varchars_t('A','B');
      begin
       plsql_test.assert(vt1.count = 2,'list contains only two elements');
      end;
      procedure t_isWhiteSpace
      is
           cause varchar2(2000) := 'incorrect implementation of contract';
      begin
           plsql_test.assert(putil.isWhiteSpace(' '),cause); -- a space is whitespace
           plsql_test.assert(not putil.isWhiteSpace(null),cause); -- null is not whitespace
           plsql_test.assert(not putil.isWhiteSpace(''),cause); -- empty string is not whitespace
      end;
 end;



  Each and every package can become a test suite.
           - Just add a few procedures with prefix t_ to turn it into a test suite.
           - Once that's done. It can be run as a test suite.

Page  13                                                                               PLSQL Commons v1.0
Practical Applications

Testing application behavior

      Running a test suite                      DBMS Output
                                              ===== Run Test Suite ====
 plsql_test.runTestSuite                      unit TST_PLSQL_UTIL_PCK.T_ISWHITESPACE succeeded
 ( module => 'test_plsql_util_pck             unit TST_PLSQL_UTIL_PCK.T_VARCHARS succeeded
 , runAll => true                             ===== Test Report =====
 );                                           Run 2 tests of which 2 succeeded and 0 failed




Page  14                           PLSQL Commons v1.0
Practical Applications

Logging application behavior

    Sneak Preview                                                        DBMS Output

                                                                       20110113-10:47:45.228 INFO   gender is M
 plog.turn_on;
 gender char(1) := 'M';
 plog.info('gender is {1}',varchars_t(gender));




  Logging supports
    - Different layout types : text, rich_text, custom
    - Different output types : dbms_pipe, dbms_output, http, table
    - Different levels of logging : trace, debug, info, info, warn, error, fatal

  Read the userguide for more details on this.

Page  15                                         PLSQL Commons v1.0
Practical Applications

Measuring application behavior

    Sneak Preview

 number idx;
 plsql_timeit.remove;
 plsql_timeit.start_watch(pp_context => 'assignment');
 idx := 1;
 plsql_timeit.stop_watch(pp_context => 'assignment');
 plog.info('took {1} millisec',varchars_t(mmit_plsql_timeit_pck.period(pp_context => 'assignment',pp_total => true));




  plsql_timeit is a facility to measure the execution time of a program unit
    - measure if the execution time of your code is fit for use

  plsql_timeit and plsql_test could be combined to introduce
   load, volume, overload and stress test functionality.


Page  16                                           PLSQL Commons v1.0
Practical Applications

General purpose utilities

    Sneak Preview

 var varchar2(200) := chr(10); -- new line
 isWhiteSpace boolean := putil.isWhiteSpace(var);
 plog.info(putil.toChar(isWhiteSpace));




  The standard libraries fail to provide enough general purpose methods.
  plsql_util provides these methods




Page  17                                           PLSQL Commons v1.0
Practical Applications

General purpose utilities

    Sneak Preview

 list StringList := new StringList('el2','el1');
 list := putil.sort(list);
 val varchar2(32767) := putil.join(list,'#');
 list := putil.split(val,'#');




  The standard libraries fail to provide enough general purpose methods.
  plsql_util provides these methods




Page  18                                          PLSQL Commons v1.0
Practical Applications

General purpose utilities

    Sneak Preview

 list StringList := new StringList('el2','el1');
 list := putil.sort(list);
 val varchar2(32767) := putil.join(list,'#');
 list := putil.split(val,'#');




  The standard libraries fail to provide enough general purpose methods.
  plsql_util provides these methods




Page  19                                          PLSQL Commons v1.0
How you can make a difference



 Give it a try
 Be a happy user
 Tell us and the whole wide world about it!
 If you would like to get in touch.
  Drop me a mail at arnold@reuser.info




Page  20                     PLSQL Commons v1.0
Do You Have
                Any Questions?
                We would be happy to help.




Page  21   PLSQL Commons v1.0

More Related Content

What's hot

New Stuff in the Oracle PL/SQL Language
New Stuff in the Oracle PL/SQL LanguageNew Stuff in the Oracle PL/SQL Language
New Stuff in the Oracle PL/SQL Language
Steven Feuerstein
 
Store procedures
Store proceduresStore procedures
Store procedures
Farzan Wadood
 
Stored-Procedures-Presentation
Stored-Procedures-PresentationStored-Procedures-Presentation
Stored-Procedures-PresentationChuck Walker
 
Java 8 in Anger, Devoxx France
Java 8 in Anger, Devoxx FranceJava 8 in Anger, Devoxx France
Java 8 in Anger, Devoxx France
Trisha Gee
 
Java features. Java 8, 9, 10, 11
Java features. Java 8, 9, 10, 11Java features. Java 8, 9, 10, 11
Java features. Java 8, 9, 10, 11
Ivelin Yanev
 
Database Testing
Database TestingDatabase Testing
Database Testing
Siva Kotilingam Pallikonda
 
Java 9 sneak peek
Java 9 sneak peekJava 9 sneak peek
Java 9 sneak peek
Martin Toshev
 
Demystifying postgres logical replication percona live sc
Demystifying postgres logical replication percona live scDemystifying postgres logical replication percona live sc
Demystifying postgres logical replication percona live sc
Emanuel Calvo
 
Java Enterprise Edition Concurrency Misconceptions
Java Enterprise Edition Concurrency Misconceptions Java Enterprise Edition Concurrency Misconceptions
Java Enterprise Edition Concurrency Misconceptions
Haim Yadid
 
Session 38 - Core Java (New Features) - Part 1
Session 38 - Core Java (New Features) - Part 1Session 38 - Core Java (New Features) - Part 1
Session 38 - Core Java (New Features) - Part 1
PawanMM
 
Why & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to queryWhy & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to queryAntonios Chatzipavlis
 
Oracle’ın parallel execution yetenekleri ve performans
Oracle’ın parallel execution yetenekleri ve performansOracle’ın parallel execution yetenekleri ve performans
Oracle’ın parallel execution yetenekleri ve performans
Emrah METE
 
Exploring plsql new features best practices september 2013
Exploring plsql new features best practices   september 2013Exploring plsql new features best practices   september 2013
Exploring plsql new features best practices september 2013Andrejs Vorobjovs
 
Javantura v3 - Going Reactive with RxJava – Hrvoje Crnjak
Javantura v3 - Going Reactive with RxJava – Hrvoje CrnjakJavantura v3 - Going Reactive with RxJava – Hrvoje Crnjak
Javantura v3 - Going Reactive with RxJava – Hrvoje Crnjak
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Stored procedures
Stored proceduresStored procedures
Stored procedures
MuksNoor
 
Akka http
Akka httpAkka http
Akka http
Knoldus Inc.
 
Module Owb External Execution
Module Owb External ExecutionModule Owb External Execution
Module Owb External ExecutionNicholas Goodman
 
Web application penetration using SQLMAP.
Web application penetration using SQLMAP.Web application penetration using SQLMAP.
Web application penetration using SQLMAP.
asmitaanpat
 
Logical Replication in PostgreSQL - FLOSSUK 2016
Logical Replication in PostgreSQL - FLOSSUK 2016Logical Replication in PostgreSQL - FLOSSUK 2016
Logical Replication in PostgreSQL - FLOSSUK 2016
Petr Jelinek
 
Presentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12cPresentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12c
Ronald Francisco Vargas Quesada
 

What's hot (20)

New Stuff in the Oracle PL/SQL Language
New Stuff in the Oracle PL/SQL LanguageNew Stuff in the Oracle PL/SQL Language
New Stuff in the Oracle PL/SQL Language
 
Store procedures
Store proceduresStore procedures
Store procedures
 
Stored-Procedures-Presentation
Stored-Procedures-PresentationStored-Procedures-Presentation
Stored-Procedures-Presentation
 
Java 8 in Anger, Devoxx France
Java 8 in Anger, Devoxx FranceJava 8 in Anger, Devoxx France
Java 8 in Anger, Devoxx France
 
Java features. Java 8, 9, 10, 11
Java features. Java 8, 9, 10, 11Java features. Java 8, 9, 10, 11
Java features. Java 8, 9, 10, 11
 
Database Testing
Database TestingDatabase Testing
Database Testing
 
Java 9 sneak peek
Java 9 sneak peekJava 9 sneak peek
Java 9 sneak peek
 
Demystifying postgres logical replication percona live sc
Demystifying postgres logical replication percona live scDemystifying postgres logical replication percona live sc
Demystifying postgres logical replication percona live sc
 
Java Enterprise Edition Concurrency Misconceptions
Java Enterprise Edition Concurrency Misconceptions Java Enterprise Edition Concurrency Misconceptions
Java Enterprise Edition Concurrency Misconceptions
 
Session 38 - Core Java (New Features) - Part 1
Session 38 - Core Java (New Features) - Part 1Session 38 - Core Java (New Features) - Part 1
Session 38 - Core Java (New Features) - Part 1
 
Why & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to queryWhy & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to query
 
Oracle’ın parallel execution yetenekleri ve performans
Oracle’ın parallel execution yetenekleri ve performansOracle’ın parallel execution yetenekleri ve performans
Oracle’ın parallel execution yetenekleri ve performans
 
Exploring plsql new features best practices september 2013
Exploring plsql new features best practices   september 2013Exploring plsql new features best practices   september 2013
Exploring plsql new features best practices september 2013
 
Javantura v3 - Going Reactive with RxJava – Hrvoje Crnjak
Javantura v3 - Going Reactive with RxJava – Hrvoje CrnjakJavantura v3 - Going Reactive with RxJava – Hrvoje Crnjak
Javantura v3 - Going Reactive with RxJava – Hrvoje Crnjak
 
Stored procedures
Stored proceduresStored procedures
Stored procedures
 
Akka http
Akka httpAkka http
Akka http
 
Module Owb External Execution
Module Owb External ExecutionModule Owb External Execution
Module Owb External Execution
 
Web application penetration using SQLMAP.
Web application penetration using SQLMAP.Web application penetration using SQLMAP.
Web application penetration using SQLMAP.
 
Logical Replication in PostgreSQL - FLOSSUK 2016
Logical Replication in PostgreSQL - FLOSSUK 2016Logical Replication in PostgreSQL - FLOSSUK 2016
Logical Replication in PostgreSQL - FLOSSUK 2016
 
Presentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12cPresentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12c
 

Similar to Plsql commons

An introduction to_rac_system_test_planning_methods
An introduction to_rac_system_test_planning_methodsAn introduction to_rac_system_test_planning_methods
An introduction to_rac_system_test_planning_methods
Ajith Narayanan
 
Oracle real application clusters system tests with demo
Oracle real application clusters system tests with demoOracle real application clusters system tests with demo
Oracle real application clusters system tests with demo
Ajith Narayanan
 
Declarative benchmarking of cassandra and it's data models
Declarative benchmarking of cassandra and it's data modelsDeclarative benchmarking of cassandra and it's data models
Declarative benchmarking of cassandra and it's data models
Monal Daxini
 
APAC ksqlDB Workshop
APAC ksqlDB WorkshopAPAC ksqlDB Workshop
APAC ksqlDB Workshop
confluent
 
Apache Flink Overview at SF Spark and Friends
Apache Flink Overview at SF Spark and FriendsApache Flink Overview at SF Spark and Friends
Apache Flink Overview at SF Spark and Friends
Stephan Ewen
 
Training Slides: 153 - Working with the CLI
Training Slides: 153 - Working with the CLITraining Slides: 153 - Working with the CLI
Training Slides: 153 - Working with the CLI
Continuent
 
AskTom: How to Make and Test Your Application "Oracle RAC Ready"?
AskTom: How to Make and Test Your Application "Oracle RAC Ready"?AskTom: How to Make and Test Your Application "Oracle RAC Ready"?
AskTom: How to Make and Test Your Application "Oracle RAC Ready"?
Markus Michalewicz
 
Java 8 Overview
Java 8 OverviewJava 8 Overview
Java 8 Overview
Nicola Pedot
 
20160609 nike techtalks reactive applications tools of the trade
20160609 nike techtalks reactive applications   tools of the trade20160609 nike techtalks reactive applications   tools of the trade
20160609 nike techtalks reactive applications tools of the trade
shinolajla
 
Ikc 2015
Ikc 2015Ikc 2015
Scalable Applications with Scala
Scalable Applications with ScalaScalable Applications with Scala
Scalable Applications with ScalaNimrod Argov
 
Laravel tips-2019-04
Laravel tips-2019-04Laravel tips-2019-04
Laravel tips-2019-04
Fernando Andrés Pérez Alarcón
 
LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1
Hajime Tazaki
 
Computing recommendations at extreme scale with Apache Flink @Buzzwords 2015
Computing recommendations at extreme scale with Apache Flink @Buzzwords 2015Computing recommendations at extreme scale with Apache Flink @Buzzwords 2015
Computing recommendations at extreme scale with Apache Flink @Buzzwords 2015
Till Rohrmann
 
Automated Testing for SQL Injection Vulnerabilities: An Input Mutation Approach
Automated Testing for SQL Injection Vulnerabilities: An Input Mutation ApproachAutomated Testing for SQL Injection Vulnerabilities: An Input Mutation Approach
Automated Testing for SQL Injection Vulnerabilities: An Input Mutation ApproachLionel Briand
 
Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3
Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3
Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3
Elixir Club
 
Reactive programming with examples
Reactive programming with examplesReactive programming with examples
Reactive programming with examples
Peter Lawrey
 
Distributed Performance testing by funkload
Distributed Performance testing by funkloadDistributed Performance testing by funkload
Distributed Performance testing by funkload
Akhil Singh
 
Chapter 3.pptx Oracle SQL or local Android database setup SQL, SQL-Lite, codi...
Chapter 3.pptx Oracle SQL or local Android database setup SQL, SQL-Lite, codi...Chapter 3.pptx Oracle SQL or local Android database setup SQL, SQL-Lite, codi...
Chapter 3.pptx Oracle SQL or local Android database setup SQL, SQL-Lite, codi...
TAISEEREISA
 

Similar to Plsql commons (20)

An introduction to_rac_system_test_planning_methods
An introduction to_rac_system_test_planning_methodsAn introduction to_rac_system_test_planning_methods
An introduction to_rac_system_test_planning_methods
 
Oracle real application clusters system tests with demo
Oracle real application clusters system tests with demoOracle real application clusters system tests with demo
Oracle real application clusters system tests with demo
 
Using AWR for SQL Analysis
Using AWR for SQL AnalysisUsing AWR for SQL Analysis
Using AWR for SQL Analysis
 
Declarative benchmarking of cassandra and it's data models
Declarative benchmarking of cassandra and it's data modelsDeclarative benchmarking of cassandra and it's data models
Declarative benchmarking of cassandra and it's data models
 
APAC ksqlDB Workshop
APAC ksqlDB WorkshopAPAC ksqlDB Workshop
APAC ksqlDB Workshop
 
Apache Flink Overview at SF Spark and Friends
Apache Flink Overview at SF Spark and FriendsApache Flink Overview at SF Spark and Friends
Apache Flink Overview at SF Spark and Friends
 
Training Slides: 153 - Working with the CLI
Training Slides: 153 - Working with the CLITraining Slides: 153 - Working with the CLI
Training Slides: 153 - Working with the CLI
 
AskTom: How to Make and Test Your Application "Oracle RAC Ready"?
AskTom: How to Make and Test Your Application "Oracle RAC Ready"?AskTom: How to Make and Test Your Application "Oracle RAC Ready"?
AskTom: How to Make and Test Your Application "Oracle RAC Ready"?
 
Java 8 Overview
Java 8 OverviewJava 8 Overview
Java 8 Overview
 
20160609 nike techtalks reactive applications tools of the trade
20160609 nike techtalks reactive applications   tools of the trade20160609 nike techtalks reactive applications   tools of the trade
20160609 nike techtalks reactive applications tools of the trade
 
Ikc 2015
Ikc 2015Ikc 2015
Ikc 2015
 
Scalable Applications with Scala
Scalable Applications with ScalaScalable Applications with Scala
Scalable Applications with Scala
 
Laravel tips-2019-04
Laravel tips-2019-04Laravel tips-2019-04
Laravel tips-2019-04
 
LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1
 
Computing recommendations at extreme scale with Apache Flink @Buzzwords 2015
Computing recommendations at extreme scale with Apache Flink @Buzzwords 2015Computing recommendations at extreme scale with Apache Flink @Buzzwords 2015
Computing recommendations at extreme scale with Apache Flink @Buzzwords 2015
 
Automated Testing for SQL Injection Vulnerabilities: An Input Mutation Approach
Automated Testing for SQL Injection Vulnerabilities: An Input Mutation ApproachAutomated Testing for SQL Injection Vulnerabilities: An Input Mutation Approach
Automated Testing for SQL Injection Vulnerabilities: An Input Mutation Approach
 
Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3
Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3
Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3
 
Reactive programming with examples
Reactive programming with examplesReactive programming with examples
Reactive programming with examples
 
Distributed Performance testing by funkload
Distributed Performance testing by funkloadDistributed Performance testing by funkload
Distributed Performance testing by funkload
 
Chapter 3.pptx Oracle SQL or local Android database setup SQL, SQL-Lite, codi...
Chapter 3.pptx Oracle SQL or local Android database setup SQL, SQL-Lite, codi...Chapter 3.pptx Oracle SQL or local Android database setup SQL, SQL-Lite, codi...
Chapter 3.pptx Oracle SQL or local Android database setup SQL, SQL-Lite, codi...
 

Recently uploaded

GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 

Recently uploaded (20)

GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 

Plsql commons

  • 1. PLSQL Commons v1.0 How to enrich the programmer's PLSQL toolkit Arnold Reuser
  • 2. Agenda 1 Serving a need 2 What PLSQL Commons can do for you 3 How you can make a difference Page  2 PLSQL Commons v1.0
  • 3. Serving a need Reusable PLSQL Components  PLSQL Commons is a project focused on creating and maintaining reusable PLSQL components.  Components that will enrich the PLSQL programmer's toolkit  Components that promote the programmers shift from solving purely technical problems to actual business problems Page  3 PLSQL Commons v1.0
  • 4. Serving a need Reusable PLSQL Components  PLSQL Commons is used by a CRM service provider of General Motors to handle their specific needs  Used on their production Oracle database servers as the defacto standard components for the past three years Page  4 PLSQL Commons v1.0
  • 5. What PLSQL Commons can do for you  Current status  Practical applications Page  5 PLSQL Commons v1.0
  • 6. Current Status There are several upcoming sandbox components not mentioned. This presentation will focus on just a few components. Component Focus plsql_async Parallel processing of tasks plsql_cache General purpose memory based caching plsql_error Exception management plsql_file Reading and writing operating system text files plsql_ftp Copy a file from one host to another based on the ftp protocol. plsql_host Executing a command in the host environment plsql_log Logging application behavior plsql_match Text search engine plsql_test Writing repeatable unit tests plsql_timeit Measuring the execution time of a program unit plsql_util General purpose utilities plsql_soap Lightweight webservices based on the soap protocol Page  6 PLSQL Commons v1.0
  • 7. Practical Applications Parallel processing of tasks  Imagine a potential pipeline of an ETL process to load CRM data.  The pipeline passes several processing elements. Page  7 PLSQL Commons v1.0
  • 8. Practical Applications Parallel processing of tasks  If the elements Address and Communication are independent.  The pipeline could be organized to process these elements in parallel Page  8 PLSQL Commons v1.0
  • 9. Practical Applications Parallel processing of tasks  Fundamental questions : • How can you maintain the processing flow? • What if Address and Communication would like to pass their identifiers? Page  9 PLSQL Commons v1.0
  • 10. Practical Applications Parallel processing of tasks  The answers provided : - plsql_async can be used to route and maintain the processing flow - plsql_async can be used to pass information between sequential processes - plsql_cache can be used to cache session and cross-session based information  Read the user guide for more details on this.  If your interest in building a processing flow. Read the book Enterprise Integration Patterns. Page  10 PLSQL Commons v1.0
  • 11. Practical Applications Exception management Assertion at any location you assume will not be reached. gender char(1) := 'A'; plsql_test.assert(gender in ('M','F'),'Gender can be M or F; current value is {1}',varchars_t(gender)); Error to identify an exceptional condition that an application might want to catch soapFaultReason varchar2(100) := ImportDataRecord has been invoked at an illegal or inappropriate time.'; err.raise(err.SOAPFaultException,'operation raised exception : {1}',varchars_t(soapFaultReason)); Page  11 PLSQL Commons v1.0
  • 12. Practical Applications Testing application behavior  plsql_test is a testing facility for the plsql programming  plsql_test will help you : - measure your progress, spot unintended side effects, and focus your development efforts - without automated testing tools like this facility retesting can be a tedious and inaccurate process. - by allowing the testing process to occur frequently and automatically, you can keep software coding errors at a minimum Page  12 PLSQL Commons v1.0
  • 13. Practical Applications Testing application behavior Developing a test suite create package body test_plsql_util_pck as procedure t_varchars is vt1 varchars_t:= new varchars_t('A','B'); begin plsql_test.assert(vt1.count = 2,'list contains only two elements'); end; procedure t_isWhiteSpace is cause varchar2(2000) := 'incorrect implementation of contract'; begin plsql_test.assert(putil.isWhiteSpace(' '),cause); -- a space is whitespace plsql_test.assert(not putil.isWhiteSpace(null),cause); -- null is not whitespace plsql_test.assert(not putil.isWhiteSpace(''),cause); -- empty string is not whitespace end; end;  Each and every package can become a test suite. - Just add a few procedures with prefix t_ to turn it into a test suite. - Once that's done. It can be run as a test suite. Page  13 PLSQL Commons v1.0
  • 14. Practical Applications Testing application behavior Running a test suite DBMS Output ===== Run Test Suite ==== plsql_test.runTestSuite unit TST_PLSQL_UTIL_PCK.T_ISWHITESPACE succeeded ( module => 'test_plsql_util_pck unit TST_PLSQL_UTIL_PCK.T_VARCHARS succeeded , runAll => true ===== Test Report ===== ); Run 2 tests of which 2 succeeded and 0 failed Page  14 PLSQL Commons v1.0
  • 15. Practical Applications Logging application behavior Sneak Preview DBMS Output 20110113-10:47:45.228 INFO gender is M plog.turn_on; gender char(1) := 'M'; plog.info('gender is {1}',varchars_t(gender));  Logging supports - Different layout types : text, rich_text, custom - Different output types : dbms_pipe, dbms_output, http, table - Different levels of logging : trace, debug, info, info, warn, error, fatal  Read the userguide for more details on this. Page  15 PLSQL Commons v1.0
  • 16. Practical Applications Measuring application behavior Sneak Preview number idx; plsql_timeit.remove; plsql_timeit.start_watch(pp_context => 'assignment'); idx := 1; plsql_timeit.stop_watch(pp_context => 'assignment'); plog.info('took {1} millisec',varchars_t(mmit_plsql_timeit_pck.period(pp_context => 'assignment',pp_total => true));  plsql_timeit is a facility to measure the execution time of a program unit - measure if the execution time of your code is fit for use  plsql_timeit and plsql_test could be combined to introduce load, volume, overload and stress test functionality. Page  16 PLSQL Commons v1.0
  • 17. Practical Applications General purpose utilities Sneak Preview var varchar2(200) := chr(10); -- new line isWhiteSpace boolean := putil.isWhiteSpace(var); plog.info(putil.toChar(isWhiteSpace));  The standard libraries fail to provide enough general purpose methods.  plsql_util provides these methods Page  17 PLSQL Commons v1.0
  • 18. Practical Applications General purpose utilities Sneak Preview list StringList := new StringList('el2','el1'); list := putil.sort(list); val varchar2(32767) := putil.join(list,'#'); list := putil.split(val,'#');  The standard libraries fail to provide enough general purpose methods.  plsql_util provides these methods Page  18 PLSQL Commons v1.0
  • 19. Practical Applications General purpose utilities Sneak Preview list StringList := new StringList('el2','el1'); list := putil.sort(list); val varchar2(32767) := putil.join(list,'#'); list := putil.split(val,'#');  The standard libraries fail to provide enough general purpose methods.  plsql_util provides these methods Page  19 PLSQL Commons v1.0
  • 20. How you can make a difference  Give it a try  Be a happy user  Tell us and the whole wide world about it!  If you would like to get in touch. Drop me a mail at arnold@reuser.info Page  20 PLSQL Commons v1.0
  • 21. Do You Have Any Questions? We would be happy to help. Page  21 PLSQL Commons v1.0