Hi Chan,
In most of the real-time scenarios, data need not be persisted; hence it's
ideal to publish data to a dashboard directly, without writing those to a
database and then polling from it.
To publish data to a dashboard directly, you can try using the CEP
Websocket Output Adaptors, which is available in the current development
branch of CEP, like Lasantha has suggested. AFAIK, websocket is a good
transport to publish data to a dashboard.
Here's a sample code snippet for a javascript client, to read data from a
CEP websocket output adaptor.
$(function () {
url = 'ws://localhost:9763/outputwebsocket/TestWebsocketAdaptorLocal/abc';
ws = new WebSocket(url);
ws.onmessage = function(event) {
redrawGraph();
};
});
function redrawGraph() {
//implement logic to redraw the graph.
}
Here we don't do any polling, but in the event we receive any new data, we
redraw the graphs in the dashboard.
what was the strategy used on the DEBS dashboard?
Websocket Adaptors weren't available those days, so we used a webservice to
which the publsher pushed data; Then the dashboard-client polled data from
the webservice every 'n' milliseconds, and redrew the graphs.
Hope this helps,
Regards,
Dilini
On Fri, Sep 26, 2014 at 11:41 AM, Lasantha Fernando <[email protected]>
wrote:
>
>
> On 26 September 2014 11:32, Chan <[email protected]> wrote:
>
>> Hi guys,
>> Based on all the replies - what I understand is - we need to use an Event
>> Sink (Output adaptor) to send all data to a RDBMS. Then create a jaggery
>> service to pull data from the RDBMS. And then poll that data from the
>> jaggery service. I am not sure whether we have web sockets support in the
>> jaggery version we are using or whether we support web sockets at all. I am
>> adding @sameeraM and @supunM to confirm this.
>>
>> @Lasantha currently we have written a Data Publisher for BAM. Do we need
>> to use the HTTPInput adaptor to push data to CEP or can we use the BAM Data
>> Publisher we wrote?
>>
>
> Hi Chan,
>
> You can use the BAM (Thrift) Data Publisher directly to push data to CEP.
> For the RDBMS case, there is already a Gadget Gen tool written by Tanya
> which generates the jaggery service to pull data from RDBMS. Websocket and
> Cassandra support for this gadget gen tool is planned, but not yet
> implemented AFAIK. If you are publishing events to anything other than
> RDBMS, then you would have to write your own jaggery service to pull data.
>
> Thanks,
>
>
>> @Dilini what was the strategy used on the DEBS dashboard?
>>
>> (Jaggery version we are using is 0.9.0.ALPHA4.wso2v3)
>>
>> Cheers~
>>
>> On Fri, Sep 26, 2014 at 11:25 AM, Lasantha Fernando <[email protected]>
>> wrote:
>>
>>> Hi Chan,
>>>
>>> You can't poll data from Cassandra as yet for the real-time dashboard.
>>> Polling from RDBMS databases is supported currently from UES. Also you can
>>> create a web service and poll data from there. I think that was the
>>> approach used by Dilini for DEBS dashboard. You might be able to try
>>> websockets as well which is available in the current development branch of
>>> CEP. Haven't tried it out though.
>>>
>>> @Dilini, can you add more regarding this if possible?
>>>
>>> Thanks,
>>> Lasantha
>>>
>>> On 26 September 2014 11:00, Malith Dhanushka <[email protected]> wrote:
>>>
>>>> In realtime analytics , It doesn't poll data from Cassandra. Rather you
>>>> can utilize preferred output adapter[1] to push results of execution plans
>>>> to dashboards.
>>>>
>>>> [1] https://docs.wso2.com/display/CEP310/Output+Event+Adaptors
>>>>
>>>> Thanks,
>>>>
>>>> On Fri, Sep 26, 2014 at 8:35 AM, Chan <[email protected]> wrote:
>>>>
>>>>> Hi guys,
>>>>> How do we make realtime dashboards for data. Currently the data is
>>>>> Published to the Event Receiver (thus persisted to BAM). Do we poll
>>>>> cassandra from the dashboard to show realtime dashboards?
>>>>>
>>>>> Cheers~
>>>>>
>>>>> --
>>>>> Chan (Dulitha Wijewantha)
>>>>> Software Engineer - Mobile Development
>>>>> WSO2 Inc
>>>>> Lean.Enterprise.Mobileware
>>>>> * ~Email [email protected] <[email protected]>*
>>>>> * ~Mobile +94712112165 <%2B94712112165>*
>>>>> * ~Website dulitha.me <http://dulitha.me>*
>>>>> * ~Twitter @dulitharw <https://twitter.com/dulitharw>*
>>>>> *~Github @dulichan <https://github.com/dulichan>*
>>>>> *~SO @chan <http://stackoverflow.com/users/813471/chan>*
>>>>>
>>>>> _______________________________________________
>>>>> Dev mailing list
>>>>> [email protected]
>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Malith Dhanushka
>>>> Software Engineer - Data Technologies
>>>> *WSO2, Inc. : wso2.com <http://wso2.com/>*
>>>> *Mobile* : +94 716 506 693
>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> [email protected]
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>>
>>> --
>>> *Lasantha Fernando*
>>> Software Engineer - Data Technologies Team
>>> WSO2 Inc. http://wso2.com
>>>
>>> email: [email protected]
>>> mobile: (+94) 71 5247551
>>>
>>
>>
>>
>> --
>> Chan (Dulitha Wijewantha)
>> Software Engineer - Mobile Development
>> WSO2 Inc
>> Lean.Enterprise.Mobileware
>> * ~Email [email protected] <[email protected]>*
>> * ~Mobile +94712112165 <%2B94712112165>*
>> * ~Website dulitha.me <http://dulitha.me>*
>> * ~Twitter @dulitharw <https://twitter.com/dulitharw>*
>> *~Github @dulichan <https://github.com/dulichan>*
>> *~SO @chan <http://stackoverflow.com/users/813471/chan>*
>>
>
>
>
> --
> *Lasantha Fernando*
> Software Engineer - Data Technologies Team
> WSO2 Inc. http://wso2.com
>
> email: [email protected]
> mobile: (+94) 71 5247551
>
--
*Dilini Muthumala*
Software Engineer,
WSO2 Inc.
*E-mail :* [email protected]
*Mobile: *+94713 400 029
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev