DATA STREAMING FRAMEWORK FROM DATABASE TO MULTIPLE TARGETS BY LEVERAGING CACHED DATABASE CONNECTIONS AND CURSORS
Example systems and methods for streaming data from database using established pipelines are described. In one implementation, a method receives a request for data from a database. The method also determines a pipeline corresponding to the request, and then provide a data stream from the database using the determined pipeline.
1 . A method comprising:
receiving, by one or more processors, a request for data from a database;
determining a pipeline corresponding to the request, the pipeline including a connection cache that has a database connection configuration that has been created in response to one or more previous requests, the database connection configuration indicating a database connection to the data in the database; and
providing a data stream from the database using the determined pipeline.
2 . The method of claim 1 , further comprising:
maintaining the database connection open; and
caching the database connection configuration after the database connection has been established in response to the one or more previous requests.
3 . The method of claim 1 , wherein the pipeline comprises a result set metadata cache that includes one or more result sets that are returned and cached in response to the one or more previous requests.
4 . The method of claim 3 , wherein the pipeline comprises a cursor cache that includes one or more database cursors each corresponding to a result set of the one or more result sets.
5 . The method of claim 1 , wherein the providing the data stream from the database using the determined pipeline comprises executing the request using the database connection.
6 . The method of claim 1 , wherein the providing the data stream comprises providing the data stream using a Round-Robin algorithm.
7 . The method of claim 1 , wherein the providing the data stream from the database using the determined pipeline comprises transmitting a dataset associated with the data stream to one or more plugins.
8 . The method of claim 1 , further comprising:
facilitating multiple transformations of the data for one or more targets associated with database activity monitoring.
9 . A method comprising:
receiving, by one or more processors, a request for data from a database;
establishing a pipeline corresponding to the request, the pipeline including a connection cache that has a database connection configuration that is created in response to the request, the database connection configuration indicating a database connection to the data in the database;
caching the database connection configuration of the database connection; and
maintaining the database connection open to facilitate data streaming from the database.
10 . The method of claim 9 , wherein the pipeline comprises a result set metadata cache that includes one or more result sets that are returned and cached in response to the request.
11 . The method of claim 10 , wherein the pipeline comprises a cursor cache that includes one or more database cursors each corresponding to a result set of the one or more result sets.
12 . The method of claim 9 , further comprising:
receiving an additional request for the data from the database;
determining the pipeline corresponding to the additional request; and
providing a data stream from the database using the determined pipeline.
13 . The method of claim 12 , wherein the providing the data stream from the database using the determined pipeline comprises executing the request using the database connection.
14 . The method of claim 12 , wherein the providing the data stream comprises providing the data stream using a Round-Robin algorithm.
15 . The method of claim 1 , wherein the providing the data stream from the database using the determined pipeline comprises transmitting a dataset associated with the data stream to one or more plugins.
16 . An apparatus comprising:
a memory configured to store data and one or more sets of instructions; and
one or more processors coupled to the memory, the one or more processors configured to execute the one or more sets of instructions and perform operations comprising:
receiving, by one or more processors, a request for data from a database;
determining a pipeline corresponding to the request, the pipeline including a connection cache that has a database connection configuration that has been created in response to one or more previous requests, the database connection configuration indicating a database connection to the database; and
providing a data stream from the database using the determined pipeline.
17 . The apparatus of claim 16 , wherein the operations further comprise:
maintaining the database connection open; and
caching the database connection configuration after the database connection has been established in response to the one or more previous requests
18 . The apparatus of claim 16 , wherein the pipeline comprises a result set metadata cache that includes one or more result sets that are returned and cached in response to the one or more previous requests.
19 . The apparatus of claim 17 , wherein the pipeline comprises a cursor cache that includes one or more database cursors each corresponding to a result set of the one or more result sets.
20 . The apparatus of claim 16 , wherein the providing the data stream from the database using the determined pipeline comprises transmitting a dataset associated with the data stream to one or more plugins.