[Fiware-data] CEP<->P/S

Peretz Gurel peretz at athenaiss.com
Fri Mar 8 15:45:22 CET 2013


Dear Fano,
The CEP GE does not require any code for the GET and POST operations.
In the WEB UI of the CEP GE there is a place to write the URL for the GET operations and the URL for the POST operations.

Best regards,
Peretz

From: fano.ramparany at orange.com [mailto:fano.ramparany at orange.com]
Sent: Thursday, March 07, 2013 8:36 PM
To: Peretz Gurel
Cc: fiware-data at lists.fi-ware.eu; Guy Sharon; Fermín Galán Márquez; BELLABAS Alia OLNC/OLPS
Subject: RE: [Fiware-data] CEP<->P/S

Thank you for your feedback Peretz,

Even the part of the code of the event sources that the CEP GET  events from and the part of the code of the application the CEP POST alerts to, would be useful (1,2). The CET WEB UI seems to be easy to use (3).
Anyway, once we’ve that part of the code up and running on our side (it will be in java using the Jersey library), we will be happy to share it ☺

Best regards,

Fano

De : Peretz Gurel [mailto:peretz at athenaiss.com]
Envoyé : dimanche 24 février 2013 17:43
À : RAMPARANY Fano OLNC/OLPS
Cc : fiware-data at lists.fi-ware.eu<mailto:fiware-data at lists.fi-ware.eu>; Guy Sharon; Fermín Galán Márquez; BELLABAS Alia OLNC/OLPS
Objet : RE: [Fiware-data] CEP<->P/S

Hi Fano,
In SafeCity we use the CEP engine without any additional code. No input or output format conversions are needed. We did not have to add any additional code "around" the CEP. The applications that feed the CEP, and those that are fed by the CEP, all agreed to send and receive messages according to the format enforced by the CEP, so no additional code is required to convert incoming/outgoing messages.

1.            The CEP GET (REST API) the events from the event sources. Each and every event is generated by the source application as a text in a flat JSON format in the exact format that the CEP expects, so no conversions are needed.

2.            After processing of the events by the CEP, it generates alerts and POST them at the target application.

3.            The definition of the input events and the output alerts, as well as the processing rules of the CEP, is done solely by using the native CET WEB UI, without any additional code.

Best regards,
Peretz

From: fano.ramparany at orange.com<mailto:fano.ramparany at orange.com> [mailto:fano.ramparany at orange.com]
Sent: Friday, February 22, 2013 7:02 PM
To: Peretz Gurel
Cc: fiware-data at lists.fi-ware.eu<mailto:fiware-data at lists.fi-ware.eu>; Guy Sharon; Fermín Galán Márquez; BELLABAS Alia OLNC/OLPS
Subject: RE: [Fiware-data] CEP<->P/S

Hi Peretz and all,

Is there an easy way for us to benefit from your experience in Safecity, using the CEP. I’m thinking about a detailed spec of your architecture and source code of the component that connect to the CEP for feeding it with input events, and of the component that the CEP connects to for sending output events. This echoes a mail I just sent to the FI PPP AB for setting up such reusable stuff, and share experience within UC projects with the intent to improve the efficiency of using FIWARE GE enablers.

Thank you for your suggestion Guy,

Best regards,

Fano

De : fiware-data-bounces at lists.fi-ware.eu<mailto:fiware-data-bounces at lists.fi-ware.eu> [mailto:fiware-data-bounces at lists.fi-ware.eu] De la part de Guy Sharon
Envoyé : mardi 19 février 2013 13:22
À : Fermín Galán Márquez
Cc : fiware-data at lists.fi-ware.eu<mailto:fiware-data at lists.fi-ware.eu>
Objet : Re: [Fiware-data] CEP<->P/S

Another option is to look at SafeCity - they are already producing sensor data and turning it to events and then use events to drive decisions.



Regards,

Guy Sharon
Manager, Event-based Decision Technologies Group
IBM Research - Haifa
________________________________

Phone: 972-4-8296587 | Mobile: 972-54-6976417
E-mail: GUYSH at il.ibm.com<mailto:GUYSH at il.ibm.com>
Website: www.research.ibm.com/haifa/dept/services/soms_ebs.html<https://www.research.ibm.com/haifa/dept/services/soms_ebs.html>


Find me on: [cid:image001.jpg at 01CE1C1C.532C3070] <http://www.linkedin.com/profile/view?id=3618230&authType=name&authToken=7XaO&locale=en_US&pvs=pp&trk=ppro_viewmore>  and within IBM on: [cid:image002.jpg at 01CE1C1C.532C3070] <https://w3-connections.ibm.com/profiles/html/profileView.do?key=c22fdae3-0bc2-4626-a30b-095a0eb63ec8&lang=en>  [cid:image003.jpg at 01CE1C1C.532C3070] <http://cattail.boulder.ibm.com/cattail/#view=guysh@il.ibm.com>

[cid:image004.gif at 01CE1C1C.532C3070]

Haifa University, Mount Carmel
Haifa, HA 31905
Israel






From:        Fermín Galán Márquez <fermin at tid.es<mailto:fermin at tid.es>>
To:        fiware-data at lists.fi-ware.eu<mailto:fiware-data at lists.fi-ware.eu>,
Date:        19/02/2013 14:10
Subject:        Re: [Fiware-data] CEP<->P/S
Sent by:        fiware-data-bounces at lists.fi-ware.eu<mailto:fiware-data-bounces at lists.fi-ware.eu>
________________________________



Hi,

I have tried to summarize the conclusions of the discussion up to now and put them in a shared google doc that we can use from on to add more conclusions that could arise.

https://docs.google.com/document/d/11bD-tWz7CA1iVww1Kteob3kf8DJ0AZRNr6pQhJnY-LI/edit

In the document, I have tried to show concrete examples of the involved messages, base on my knowledge of NGSI and the feedback that Tali has provided. It would be great Tali if you could review that last part, to check if everything is ok from CEP point of view or fix otherwise (please tell me your google id to provide writing permission in the document, if you like).

As I think somebody has already mentioned, we need to know which kind of entities, attributes and CEP processings Outmart needs (note that in the document I have used a "dummy" example). Who should provide that information?

Of course, everybody is welcome to read the document and provide feedback. Comments are open to everybody, so you can use that to provide your feedback in specify parts of the documents.

Best regards,

------
Fermín

El 19/02/2013 12:27, Tali Yatzkar-Haham escribió:
Hi Fano and all,

In the CEP,  the application developer defines the CEP input and output events types as part of the application definition that contains events, rules, producer, consumer,... This is usually done through the CEP Web UI.
Each event type has a name and a set of attributes, where each attribute has a type and a name. The definition of the event types will not be done using the CEP <-> P/S adapter.

At run time, the CEP expect to get only events instances from defined event type. The CEP expects to get it in a flat JSON format of key value pairs. The name (type) of the event is given in an attribute called "Name"
Example(you can find them in the wiki<http://forge.fi-ware.eu/plugins/mediawiki/wiki/fiware/index.php/Complex_Event_Processing_Open_RESTful_API_Specification_%28PRELIMINARY%29#Getting_Events_API>):
1. TrafficReport input event with only one attribute called volume:
{"Name":"TrafficReport", "volume":"1000"}

2. TrafficReport output event with one attribute called volume and several auto-generated CEP attributes
{"Cost":"0.0","Certainty":"0.0","Name":"TrafficReport","EventSource":"","Duration":"0.0","Annotation":"",
"volume":"1000","EventId":"e206b5e8-9f3a-4711-9f46-d0e9431fe215","DetectionTime":"1350311378034"}

Note that all the attributes are given as Strings (the CEP parses them internally according to the attributes defined type), the attributes are not ordered.
Please tell me if you have any questions about the event format.

Regards,

Tali Yatzkar-Haham
Event-based Middleware & Solutions Group
IBM Haifa Research Lab
________________________________

Phone: 972-4-829-6320 | Mobile: 972-54-4388482
E-mail: TALI at il.ibm.com<mailto:TALI at il.ibm.com>

Haifa University, Mount Carmel
Haifa, 31905
Israel







From:        <fano.ramparany at orange.com><mailto:fano.ramparany at orange.com>
To:        Tali Yatzkar-Haham/Haifa/IBM at IBMIL,
Cc:        "fiware-data at lists.fi-ware.eu"<mailto:fiware-data at lists.fi-ware.eu> <fiware-data at lists.fi-ware.eu><mailto:fiware-data at lists.fi-ware.eu>
Date:        19/02/2013 12:32 PM
Subject:        RE: [Fiware-data] CEP<->P/S
________________________________



Hi Tali,

You’ll find attached a queryContextResponse xml document to give you an idea. Although in our case we need the document contained in a notifyContext message. I’ve got a message from the ngsi mailinglist with a link to such NGSI messages samples, but unfortunately and can’t find it right now…

Regards,

Fano

De : Tali Yatzkar-Haham [mailto:TALI at il.ibm.com]
Envoyé : mardi 19 février 2013 08:12
à : RAMPARANY Fano OLNC/OLPS
Cc : fiware-data at lists.fi-ware.eu<mailto:fiware-data at lists.fi-ware.eu>
Objet : Re: [Fiware-data] CEP<->P/S

Hi Fano, and all,

Yes, as I wrote in my previous mail - the CEP can activate external REST API for sending CEP output events (In my previous mail, I point to the documentation of it).
Maybe you can send us an example of an P/S event and we can see how to transform it to CEP event. If you also know what is the event data you expect the CEP to generate, we can then transform it back to P/S event. Do you have such an example?


Regards,

Tali Yatzkar-Haham
Event-based Middleware & Solutions Group
IBM Haifa Research Lab
________________________________

Phone: 972-4-829-6320 | Mobile: 972-54-4388482
E-mail: TALI at il.ibm.com<mailto:TALI at il.ibm.com>

Haifa University, Mount Carmel
Haifa, 31905
Israel








From:        fano.ramparany at orange.com<mailto:fano.ramparany at orange.com>
To:        Fermín Galán Márquez <fermin at tid.es<mailto:fermin at tid.es>>,
Cc:        BELLABAS Alia OLNC/OLPS <alia.bellabas at orange.com<mailto:alia.bellabas at orange.com>>, "fiware-data at lists.fi-ware.eu<mailto:fiware-data at lists.fi-ware.eu>" <fiware-data at lists.fi-ware.eu<mailto:fiware-data at lists.fi-ware.eu>>
Date:        18/02/2013 06:44 PM
Subject:        Re: [Fiware-data] CEP<->P/S
Sent by:        fiware-data-bounces at lists.fi-ware.eu<mailto:fiware-data-bounces at lists.fi-ware.eu>

________________________________





Hi Fermin and all,

My feedback inline…

De : Fermín Galán Márquez [mailto:fermin at tid.es]
Objet : Re: [Fiware-data] CEP<->P/S
…
So, if I'm understanding correctly, we need two adaptation steps:
1.        PubSub -> (Adaptator1) -> CEP. In this case, the best approach would be to subscribe Adaptator1 to notifications of Outsmart data/context events in PubSub, so when a new event is received from OutSmart IoT, then PubSub will send a NGSI10 notifyContext to Adaptator.1 Then, Adaptator1 will transform this NGSI to a REST request according to the CEP "Sending Events" API described at http://forge.fi-ware.eu/plugins/mediawiki/wiki/fiware/index.php/Complex_Event_Processing_Open_RESTful_API_Specification_%28PRELIMINARY%29#Sending_Events_API.
[FR] This seems to me the right thing to do. The content of the notifyContext message and how it should be transformed into CEP event description has to be elaborated though.
2.        CEP -> (Adaptator2) -> PubSub. In this case, I understand that the CEP is not capable of pro-actively send data/context events (please, tell me if I'm wrong), so Adaptator2 will need to periodically poll CEP using the CEP "Getting events"API described at http://forge.fi-ware.eu/plugins/mediawiki/wiki/fiware/index.php/Complex_Event_Processing_Open_RESTful_API_Specification_%28PRELIMINARY%29#Getting_Events_API, sending NGSI10 updateContext to PubSub when a new event (or change) is detected.
[FR] As far as I understand, Tali can correct me if I’m wrong, CEP can pro-actively create event and there’s a CEP API for being notified of new events (based itself on a polling mechanism which is transparent to the component using this API, except for setting up the polling frequency). This simplifies your design which for the rest I agree with.

(Adaptator1 and Adaptator2 are logical entities; of course they can be implemented by the same piece of software).

Is my interpretation correct? If it is right, I would suggest as next step to write "reference messages" for the four cases (notifyContext, "Sending events", "Gettings events" and updateContext).

Best regards,

------
Fermín

El 18/02/2013 16:11, fano.ramparany at orange.com<mailto:fano.ramparany at orange.com> escribió:
Dear all,

Determining the respective roles of the CEP and P/S in the overall architecture is very important and will dictate what additional components need to be implemented.
In the discussion so far, it is considered that P/S is an event source that feeds the CEP with events, which I think is fine. I think that conversely the CEP should be a context provider for the P/S. Because if an application would like a pattern of events to be detected such as in the case of OUTSMART UC “a street lamp is not switched on whereas it is dusk”, it should subscribe to the P/S. The simplest scenario I foresee is that the CEP create an event which corresponds to this situation (this pattern of events) as soon as is occurrs and push it towards the P/S.  The application would then be notified, provided that it has subscribed to this event.

More generally, could we draw the overall architecture depicting the GEs and the dataflow they exchange? It will then be clearer for UC projects, how they can use the GE involved.

Best regards,

Fano


De : fiware-data-bounces at lists.fi-ware.eu<mailto:fiware-data-bounces at lists.fi-ware.eu> [mailto:fiware-data-bounces at lists.fi-ware.eu] De la part de Moltchanov Boris
Envoyé : vendredi 15 février 2013 07:18
à : fermin at tid.es<mailto:fermin at tid.es>; fiware-data at lists.fi-ware.eu<mailto:fiware-data at lists.fi-ware.eu>
Objet : Re: [Fiware-data] CEP<->P/S

yes, P/S NGSI.

BR,
B


Отправлено с Samsung Mobile

Fermín Galán Márquez <fermin at tid.es><mailto:fermin at tid.es> написал:
Dear Boris,

I have two doubts regarding this topic:

 *   Is the interface exposed by CEP documented in some place (e.g. URL in the FIWARE wiki)?
 *   I understand you are considering NGSI as the interface exposed by P/S, right?
Thanks!

Best regards,

------
Fermín

El 14/02/2013 17:57, Moltchanov Boris escribió:
Dear All,

The conclusion after our AC would be that, as WP6, we need an intermediate component (converter, middleware, platform) performing the following functions between the CEP and P/S GEs:
-          Subscribe the P/S only for needed data/scope/entityIDs.
-          Enrich events containing the data, becoming the context, with entityIDs and scopes taken from events attribute;
-          Parse the context, becoming the events, and build the events integrating into the event structure the entityID and scopes as the attributes for feeding the CEP with the event coming from context P/S flow;
-          Converting JSON2XML and vice versa XML2JSON. This piece could be used also for other components , GEs, etc. in FI-WARE and UCPs.
Then, given the application (UCP or generically application domain) the P/S will be subscribed only to that context, which is relevant for the event generation for that UCP, or generally speaking application domain, by the CEP.

Best Regards,
Boris
Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie.

This e-mail and any attachments is confidential and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorised. If you are not the intended recipient, please delete this message and any attachments and advise the sender by return e-mail, Thanks.
Rispetta l'ambiente. Non stampare questa mail se non è necessario.



_______________________________________________
Fiware-data mailing list
Fiware-data at lists.fi-ware.eu<mailto:Fiware-data at lists.fi-ware.eu>
http://lists.fi-ware.eu/listinfo/fiware-data


________________________________




Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra política de envío y recepción de correo electrónico en el enlace situado más abajo.
This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at:
http://www.tid.es/ES/PAGINAS/disclaimer.aspx
_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
France Telecom - Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, France Telecom - Orange is not liable for messages that have been modified, changed or falsified.
Thank you.

________________________________




Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra política de envío y recepción de correo electrónico en el enlace situado más abajo.
This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at:
http://www.tid.es/ES/PAGINAS/disclaimer.aspx
_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
France Telecom - Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, France Telecom - Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
_______________________________________________
Fiware-data mailing list
Fiware-data at lists.fi-ware.eu<mailto:Fiware-data at lists.fi-ware.eu>
http://lists.fi-ware.eu/listinfo/fiware-data

_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
France Telecom - Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, France Telecom - Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
[attachment "queryContextResponse-VehicleLocation0.xml" deleted by Tali Yatzkar-Haham/Haifa/IBM]

_______________________________________________
Fiware-data mailing list
Fiware-data at lists.fi-ware.eu<mailto:Fiware-data at lists.fi-ware.eu>
http://lists.fi-ware.eu/listinfo/fiware-data

________________________________

Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra política de envío y recepción de correo electrónico en el enlace situado más abajo.
This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at:
http://www.tid.es/ES/PAGINAS/disclaimer.aspx_______________________________________________
Fiware-data mailing list
Fiware-data at lists.fi-ware.eu<mailto:Fiware-data at lists.fi-ware.eu>
http://lists.fi-ware.eu/listinfo/fiware-data

_________________________________________________________________________________________________________________________



Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc

pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler

a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,

France Telecom - Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.



This message and its attachments may contain confidential or privileged information that may be protected by law;

they should not be distributed, used or copied without authorisation.

If you have received this email in error, please notify the sender and delete this message and its attachments.

As emails may be altered, France Telecom - Orange is not liable for messages that have been modified, changed or falsified.

Thank you.

_________________________________________________________________________________________________________________________



Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc

pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler

a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,

France Telecom - Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.



This message and its attachments may contain confidential or privileged information that may be protected by law;

they should not be distributed, used or copied without authorisation.

If you have received this email in error, please notify the sender and delete this message and its attachments.

As emails may be altered, France Telecom - Orange is not liable for messages that have been modified, changed or falsified.

Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fiware.org/private/old-fiware-data/attachments/20130308/4990eaae/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 518 bytes
Desc: image001.jpg
URL: <https://lists.fiware.org/private/old-fiware-data/attachments/20130308/4990eaae/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 467 bytes
Desc: image002.jpg
URL: <https://lists.fiware.org/private/old-fiware-data/attachments/20130308/4990eaae/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.jpg
Type: image/jpeg
Size: 494 bytes
Desc: image003.jpg
URL: <https://lists.fiware.org/private/old-fiware-data/attachments/20130308/4990eaae/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.gif
Type: image/gif
Size: 360 bytes
Desc: image004.gif
URL: <https://lists.fiware.org/private/old-fiware-data/attachments/20130308/4990eaae/attachment.gif>


More information about the Old-Fiware-data mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy