Hi all,

We hope to implement a REST API for WSO2 API manager to expose APIM
statistic data. For that we evaluated WSO2 DAS REST API to check whether we
can use it.
Here are the use cases of the APIM REST API and evaluation result of DAS
REST API.

*Motivation*:

Currently we use DAS/BAM to generate summarised data and they are stored in
an RDBMS.
Next, APIM fetch data from the RDBMS and display it on the dashboard. APIM
has implemented Client which fetch the statistic data from the RDBMS, which
is used by the UI to show statistics on the dashboard.

But we have a new requirement to providing these statistics for a bill
generating application. Since application is separate, we are facing
problems of expose these statistic data to the application.
As a solution we suggest implementing REST API, which can be used to
support above two scenarios (i.e. Current APIM dashboard and the billing
application).

Other advantages.


   - Implementing stat dashboard using REST API
      - Client side data processing getting reduced
      - Possibilities to expose statistic data to others
      - Possible to implement appropriate security model


*DAS REST API*

DAS also contain the REST api where we can use it to expose analytics data
of the DAS data analytics layer(DAL). Currently we use DAS to generate
summarised data of the APIM statistics.

But summarised data are saved in RDBMS since it was easy to fetch data. But
with DAS they have provide the REST API to access DAL data.
Because of this if we used DAS rest api, we can generate and store
summarized data on DAS without using RDBMS.

This will reduce the APIM configuration for statistics and central point of
DATA storing and processing.


Other advantages.


   - Reduce cost to configure RDBMS
      - APIM will depend only on DAS


*Issues with DAS REST API*

Even though DAS provide the REST API to fetch DAL data, query on DAL data
is limited. It provide search mechanism with apache Lucene, but it is
insufficient for APIM requirements.


Here are some query examples we used on mysql.

SELECT api,version,apiPublisher,context,SUM(total_fault_count) as
total_fault_count FROM  `table` WHERE time BETWEEN fromDate AND toDate
GROUP BY api,version,apiPublisher,context;


Here there is 3 main sub functions and queries


   - Time between- searching possible with apache Lucene range search[1]
      - Sum - Not possible to calculate the summation
      - Group by - impossible to grouping and make the calculation like
      SUM, AVG


With all of these advantages we hope to use to DAS REST API without
implementing APIM own REST API. But to take the advantages of the
REST API we have to have a REST API with above queries supported.

Can you please provide a proper way to handle these scenarios?
Any suggestions are appreciated.

[1] https://lucene.apache.org/core/2_9_4/queryparsersyntax.html#Range
Searches

Thanks and Regards.
-- 
Rukshan Chathuranga.
Software Engineer.
WSO2, Inc.
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to