Hi Dimuth,

>From the given information, it seems option #1 would be better. This is
because the user validation must happen realtime.

Joining an input event (authentication request, in this case) against a
table and extracting a result in realtime is a common usecase for SP.

However we should be cautious about the performance implications of JOIN
operation. For instance, if the size of the table is big, joining might
take sometime. Based on the complexity of the JOIN opertaion (Number of the
authentication requests per second, size of the table etc) we will have to
do performance optimizations.

Thanks,
Dilini

On Mon, Jun 11, 2018 at 5:07 PM, Dimuth Menikgama <dim...@wso2.com> wrote:

> Hi all,
>
> I have a custom requirement of publishing a set of attributes to Stream
> Processor in each time a user is successfully authenticated. That event is
> persisted and stored in a relational database via SP app. When the same
> user tries to authenticate for the second time, I need to validate the user
> based on those previously stored data.
>
> AFAIK there are two possible ways to achieve this.
>
>    1. Create an another SP application that receives required information
>    as an HTTP post (@source), JOIN that event with the table in SP application
>    and return desired results as an HTTP response (@sink).
>    2. Create a simple database client that can return desired results.
>
> Are there any special advantages/disadvantages of using those approaches?
> What is the recommended way to do this?
>
> Regards,
> Dimuth Menikgama
> --
>
> *Dimuth Menikgama*
>
> *Software Engineer*
> *WSO2*
>
>
> *Mobile :      + 94 702337977*
>
>


-- 
*Dilini Muthumala*
Senior Software Engineer,
WSO2 Inc.

*E-mail :* dil...@wso2.com
*Mobile: *+94 713-400-029
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to