SYSTEM AND METHOD FOR TESTING FILTERS FOR DATA STREAMS IN PUBLISHER-SUBSCRIBER NETWORKS
Methods and systems for testing filter for data streams in publisher-subscriber networks may are provided. A method includes comparing, by a computer processing device, an expected data set of a reference database to an actual data set from the data stream filter of the real-time messaging system. The method further includes determining, by the computer processing device, a performance metric of the data stream filter based on the comparing. The method further includes providing the performance metric to the real-time messaging system.
1 . A method of testing a data stream filter of a real-time messaging system, comprising:
comparing, by a computer processing device, an expected data set of a reference database to an actual data set from the data stream filter of the real-time messaging system;
determining, by the computer processing device, a performance metric of the data stream filter based on the comparing; and
providing the performance metric to the real-time messaging system.
2 . The method of testing a data stream filter of a real-time messaging system of claim 1 , further comprising:
generating a test data set corresponding to the real-time messaging system, the test data set having a first data format;
generating a modified test data set by modifying the first data format of the test data set, the modified test data set having a second data format; and
storing the modified test data set in the reference database.
3 . The method of testing a data stream filter of a real-time messaging system of claim 2 , wherein the reference database does not support the first data format.
4 . The method of testing a data stream filter of a real-time messaging system of claim 2 , further comprising:
receiving the modified test data set from the reference database; and
generating a current test data set by modifying the second format of the modified test data set, the current test data set having the first data format.
5 . The method of testing a data stream filter of a real-time messaging system of claim 4 , further comprising generating the actual data set from the current test data set using the data stream filter.
6 . The method of testing a data stream filter of a real-time messaging system of claim 2 , further comprising generating the expected data set of the reference database from the modified test data set using a test filter, wherein the test filter corresponds to the data stream filter.
7 . The method of testing a data stream filter of a real-time messaging system of claim 4 , further comprising:
generating the data stream filter using a grammar template; and
generating the test filter based on the data stream filter.
8 . The method of testing a data stream filter of a real-time messaging system of claim 2 , wherein the first data format comprises JavaScript Object Notation (JSON) and wherein the second data format comprises My Structured Query Language (MySQL).
9 . An apparatus, comprising:
a computer processing device to:
compare an expected data set of a reference database to an actual data set from a data stream filter of a real-time messaging system;
determine a performance metric of the data stream filter based on the comparing; and
provide the performance metric to the real-time messaging system.
10 . The apparatus of claim 9 , the computer processing device further to:
generate a test data set corresponding to the real-time messaging system, the test data set having a first data format;
generate a modified test data set by modifying the first data format of the test data set, the modified test data set having a second data format; and
store the modified test data set in the reference database.
11 . The apparatus of claim 9 , the computer processing device further to:
receive the modified test data set from the reference database; and
generate a current test data set by modifying the second format of the modified test data set, the current test data set having the first data format.
12 . The apparatus of claim 11 , the computer processing device further to generate the actual data set from the current test data set using the data stream filter.
13 . The apparatus of claim 9 , the computer processing device further to generate the expected data set of the reference database from the modified test data set using a test filter, wherein the test filter corresponds to the data stream filter.
14 . The apparatus of claim 11 , the computer processing device further to:
generate the data stream filter using a grammar template; and
generate the test filter based on the data stream filter.
15 . The apparatus of claim 9 , wherein the first data format comprises JavaScript Object Notation (JSON) and wherein the second data format comprises My Structured Query Language (MySQL).
16 . A non-transitory computer-readable storage medium including instructions that, when executed by a computer processing device, cause the computer processing device to:
compare an expected data set of a reference database to an actual data set from a data stream filter of a real-time messaging system;
determine a performance metric of the data stream filter based on the comparing; and
provide the performance metric to the real-time messaging system.
17 . The non-transitory computer-readable storage medium of claim 16 , the computer processing device further to:
generate a test data set corresponding to the real-time messaging system, the test data set having a first data format;
generate a modified test data set by modifying the first data format of the test data set, the modified test data set having a second data format; and
store the modified test data set in the reference database.
18 . The non-transitory computer-readable storage medium of claim 17 , the computer processing device further to:
receive the modified test data set from the reference database; and
generate a current test data set by modifying the second format of the modified test data set, the current test data set having the first data format.
19 . The non-transitory computer-readable storage medium of claim 18 , the computer processing device further to generate the actual data set from the current test data set using the data stream filter.
20 . The apparatus of claim 18 , the computer processing device further to generate the expected data set of the reference database from the modified test data set using a test filter, wherein the test filter corresponds to the data stream filter.