• Tidak ada hasil yang ditemukan

Appendix

Dalam dokumen Roland Stühmer (Halaman 159-171)

Open-source Contributions A

This appendix lists the contributions we made to free and open-source software. First, we describe where to find the sources for this work and in a second section we describe where to find pre-compiled binary artefacts.

A.1. Source Code

The results of our work are published open-source. This includes the designed artefacts such as our models and software components described above in Chapters 5 to 7 but also experimental data and test programmes to reproduce our evaluation results described in Chapter 8.

We publish our components under a free open-source license providing users the rights to re-use our approach and study, change and distribute the software to anyone and for any purpose [Laurent 2008]. Furthermore,

Table A.1.:Source Code Locations on the Web

Component Source Code

(https://github.com/...)

Event Model and its SDK play-project/play-commons/

DCEP play-project/play-dcep/

Access Control

play-project/play- commons/tree/master/play-commons-accesscontrol Event Adapters for Twitter,

Facebook and Xively events play-project/play-eventadapters/

WebApp play-project/WebApp/

Experimental datasets and

benchmarks play-project/play-test/

we publish our experimental datasets and test setup to enable users to reproduce our evaluation results. Additional technical documentation such as an install guide1and a developers guide2are provided.

Table A.1 shows the location of the artefact sources. Related components developed by third parties are also made available open-source by those parties. Such components include the service bus DSB3, the storage com-ponent EventCloud4and the Governance5component. The RDF framework RDFReactor6is also available on the Web. It is used as underpinnings to our event modelling SDK and we contributed to it.

1Install Guide: https://github.com/play-project/play-dcep/tree/develop/play-dcep-distribution-etalis/README.md

2Developers Guide: https://github.com/play-project/play-dcep/blob/develop/

README.eclipse.md

3DSB Code on Github: PetalsLinkLabs/petals-dsb/

4EventCloud Code: http://eventcloud.inria.fr/

5Governance Code on Github: play-project/play-governance/

6RDFReactor Code: http://code.google.com/p/semweb4j/

A.2. Binary Artefacts 139

A.2. Binary Artefacts

To make re-use of our software easier for developers, pre-compiled bina-ries are available on the Web. All artefacts compiled from our code are published using Maven7repositories. Consequently, developers can create tools incorporating our technology using Maven, automating the process of resolving and downloading all required dependencies.

Figure A.1 shows the components of our contribution Distributed Complex Event Processing (DCEP).

Figure A.1.:Module Interdependencies of all DCEP Software Artefacts

7Maven Build Tool: http://maven.apache.org/

org.ow2.play api 2.0-SNAPSHOT

org.ow2.play bdpl-etalis 2.0-SNAPSHOT org.ow2.play

play-platformservices-bdpl-esper 2.0-SNAPSHOT

org.ow2.play

querydispatcher-etalis 2.0-SNAPSHOT org.ow2.play

querydispatcher-esper 2.0-SNAPSHOT

org.ow2.play play-dcep-api 2.0-SNAPSHOT

org.ow2.play play-dcep-core 2.0-SNAPSHOT org.ow2.play play-dcep-node-core

2.0-SNAPSHOT org.ow2.play

play-dcep-node-esper 2.0-SNAPSHOT

org.ow2.play play-dcep-node-etalis

2.0-SNAPSHOT org.ow2.play play-dcep-distribution-etalis

2.0- SNAPSHOT org.ow2.play

play-dcep-distribution-esper 2.0-SNAPSHOT

play-platformservices-play-platformservices-

play-platformservices-A.3. Grammar

Our language BDPL is a derivation from SPARQL 1.1 as explained in Section 6.3. Thus, we modified a grammar of SPARQL to obtain a grammar for our language. The Jena ARQ8library contains such a grammar.

We modified the grammar from Jena ARQ and stored our result together with our other open-source contributions at the following address:

https://github.com/play-project/play-dcep

The grammar is available as an input file for the parser generator JavaCC9 and as online documentation in HTML form.

8ARQ – A SPARQL Processor for Jena: http://jena.apache.org/documentation/query/

9JavaCC – The Java Parser Generator: https://javacc.java.net/

B

Listings

This appendix contains the full listings of event patterns used in the eval-uation in Section 8.4.

B.1. Overall System Test

The patterns in BDPL match four events of different types where the subsequent patterns add complexity in (i) testing for event content and (ii) including historic data.

The patterns are part of the experimental setup described in the previous appendix and can be obtained from the Web address mentioned there.

The first pattern was chosen to stress-test the temporal matching of the event processing engine. The second pattern was chosen to test the content-based filtering capabilities and the third pattern adding historic data was chosen to test the retrieval of distributed static data and performing efficient joins.

1 #

2 # B a s i c p a t t e r n d e t e c t i n g 4 c om pa ny - r e l a t e d e v e n t s in s e q u e n c e b o u n d e d by a t i m e w i n d o w .

3 #

4

5 P R E F I X rdf : < h t t p :// www . w3 . org / 1 9 9 9 / 0 2 / 2 2 - rdf - syntax - ns# >

6 P R E F I X u c t e l c o : < h t t p :// e v e n t s . event - p r o c e s s i n g . org / uc / t e l c o / >

7 P R E F I X geo : < h t t p :// www . w3 . org / 2 0 0 3 / 0 1 / geo / w g s 8 4 _ p o s# >

8 P R E F I X xsd : < h t t p :// www . w3 . org / 2 0 0 1 / X M L S c h e m a# >

9 P R E F I X : < h t t p :// e v e n t s . event - p r o c e s s i n g . org / t y p e s / >

10

11 C O N S T R U C T {

12 : e rdf : t y p e : U c T e l c o E s r R e c o m .

13 : e : s t r e a m < h t t p :// s t r e a m s . event - p r o c e s s i n g . org / ids / O v e r a l l R e s u l t s 0 1# stream > .

14 : e u c t e l c o : a c k R e q u i r e d " f a l s e "^^ xsd : b o o l e a n .

15 : e u c t e l c o : a n s w e r R e q u i r e d " f a l s e "^^ xsd : b o o l e a n .

16 : e : m e s s a g e " P a t t e r n 01: F o u r t w e e t s a b o u t our c o m p a n i e s w e r e d e t e c t e d . "^^ xsd : s t r i n g .

17 : e u c t e l c o : a c t i o n < b l a n k :// ac t io n1 > .

18 < b l a n k :// ac t io n1 > rdf : t y p e u c t e l c o : O p e n T w i t t e r ;

19 : s c r e e n N a m e ? s c r e e n N a m e 0 1 .

20 : e : m e m b e r s ? e1 , ? e2 , ? e3 , ? e4 .

21 }

22 W H E R E {

23 W I N D O W {

24 E V E N T ? id1 {

25 ? e1 rdf : t y p e : g o o g l e .

26 ? e1 : s t r e a m < h t t p :// s t r e a m s . event - p r o c e s s i n g . org / ids / T w i t t e r F e e d# stream > .

27 ? e1 : s c r e e n N a m e ? s c r e e n N a m e 0 1 .

28 }

29 SEQ

30 E V E N T ? id2 {

31 ? e2 rdf : t y p e : a p p l e .

32 ? e2 : s t r e a m < h t t p :// s t r e a m s . event - p r o c e s s i n g . org / ids / T w i t t e r F e e d# stream > .

33 }

34 SEQ

35 E V E N T ? id3 {

36 ? e3 rdf : t y p e : m i c r o s o f t .

37 ? e3 : s t r e a m < h t t p :// s t r e a m s . event - p r o c e s s i n g . org / ids / T w i t t e r F e e d# stream > .

38 }

39 SEQ

40 E V E N T ? id4 {

B.1. Overall System Test 143

41 ? e4 rdf : t y p e : y a h o o .

42 ? e4 : s t r e a m < h t t p :// s t r e a m s . event - p r o c e s s i n g . org / ids / T w i t t e r F e e d# stream > .

43 }

44 } (" P T 5 S "^^ xsd : d u r a t i o n , s l i d i n g )

45 }

Listing B.1:Scenario-based Test: First Pattern (BDPL Syntax)

1 #

2 # S e l e c t i v e p a t t e r n d e t e c t i n g 4 co m pa ny - r e l a t e d e v e n t s in s e q u e n c e b o u n d e d by a t i m e w i n d o w

3 # and f i l t e r i n g t w i t t e r e v e n t s for n u m b e r of f r i e n d s and m o r e .

4 #

5

6 P R E F I X rdf : < h t t p :// www . w3 . org / 1 9 9 9 / 0 2 / 2 2 - rdf - syntax - ns# >

7 P R E F I X u c t e l c o : < h t t p :// e v e n t s . event - p r o c e s s i n g . org / uc / t e l c o / >

8 P R E F I X geo : < h t t p :// www . w3 . org / 2 0 0 3 / 0 1 / geo / w g s 8 4 _ p o s# >

9 P R E F I X xsd : < h t t p :// www . w3 . org / 2 0 0 1 / X M L S c h e m a# >

10 P R E F I X : < h t t p :// e v e n t s . event - p r o c e s s i n g . org / t y p e s / >

11

12 C O N S T R U C T {

13 : e rdf : t y p e : U c T e l c o E s r R e c o m .

14 : e : s t r e a m < h t t p :// s t r e a m s . event - p r o c e s s i n g . org / ids / O v e r a l l R e s u l t s 0 2#

stream > .

15 : e u c t e l c o : a c k R e q u i r e d " f a l s e "^^ xsd : b o o l e a n .

16 : e u c t e l c o : a n s w e r R e q u i r e d " f a l s e "^^ xsd : b o o l e a n .

17 : e : m e s s a g e " P a t t e r n 02: F o u r c o mp an y - r e l a t e d e v e n t s w e r e d e t e c t e d u s i n g s t r i c t e r f i l t e r s . "^^ xsd : s t r i n g .

18 : e u c t e l c o : a c t i o n < b l a n k :// ac t io n1 > .

19 < b l a n k :// ac ti o n1 > rdf : t y p e u c t e l c o : O p e n T w i t t e r ;

20 : s c r e e n N a m e ? s c r e e n N a m e 0 1 .

21 : e : m e m b e r s ? e1 , ? e2 , ? e3 , ? e4 .

22 }

23 W H E R E {

24 W I N D O W {

25 E V E N T ? id1 {

26 ? e1 rdf : t y p e : g o o g l e .

27 ? e1 : s t r e a m < h t t p :// s t r e a m s . event - p r o c e s s i n g . org / ids / T w i t t e r F e e d# stream > .

28 ? e1 : s c r e e n N a m e ? s c r e e n N a m e 0 1 .

29 ? e1 : i s R e t w e e t " f a l s e " .

30 ? e1 : f r i e n d s C o u n t ? f r i e n d s C o u n t 0 1 .

31 }

32 F I L T E R(? f r i e n d s C o u n t 0 1 > " 10 ")

33 SEQ

34 E V E N T ? id2 {

35 ? e2 rdf : t y p e : a p p l e .

36 ? e2 : s t r e a m < h t t p :// s t r e a m s . event - p r o c e s s i n g . org / ids / T w i t t e r F e e d# stream > .

37 ? e2 : i s R e t w e e t " f a l s e " .

38 ? e2 : f r i e n d s C o u n t ? f r i e n d s C o u n t 0 2 .

39 }

40 F I L T E R(? f r i e n d s C o u n t 0 2 > " 10 ")

41 SEQ

42 E V E N T ? id3 {

43 ? e3 rdf : t y p e : m i c r o s o f t .

44 ? e3 : s t r e a m < h t t p :// s t r e a m s . event - p r o c e s s i n g . org / ids / T w i t t e r F e e d# stream > .

45 ? e3 : i s R e t w e e t " f a l s e " .

46 ? e3 : f r i e n d s C o u n t ? f r i e n d s C o u n t 0 3 .

47 }

48 F I L T E R(? f r i e n d s C o u n t 0 3 > " 10 ")

49 SEQ

50 E V E N T ? id4 {

51 ? e4 rdf : t y p e : y a h o o .

52 ? e4 : s t r e a m < h t t p :// s t r e a m s . event - p r o c e s s i n g . org / ids / T w i t t e r F e e d# stream > .

53 ? e4 : i s R e t w e e t " f a l s e " .

54 ? e4 : f r i e n d s C o u n t ? f r i e n d s C o u n t 0 4 .

55 }

56 F I L T E R(? f r i e n d s C o u n t 0 4 > " 10 ")

57 } (" P T 5 S "^^ xsd : d u r a t i o n , s l i d i n g )

58 }

Listing B.2:Scenario-based Test: Second Pattern (BDPL Syntax)

1 #

2 # Real - t i m e and h i s t o r i c p a t t e r n d e t e c t i n g 4 c om pa n y - r e l a t e d e v e n t s w h e r e one p o s t e r has p r e v i o u s l y p o s t e d in the p a s t .

3 #

4

5 P R E F I X rdf : < h t t p :// www . w3 . org / 1 9 9 9 / 0 2 / 2 2 - rdf - syntax - ns# >

6 P R E F I X u c t e l c o : < h t t p :// e v e n t s . event - p r o c e s s i n g . org / uc / t e l c o / >

7 P R E F I X geo : < h t t p :// www . w3 . org / 2 0 0 3 / 0 1 / geo / w g s 8 4 _ p o s# >

8 P R E F I X xsd : < h t t p :// www . w3 . org / 2 0 0 1 / X M L S c h e m a# >

9 P R E F I X : < h t t p :// e v e n t s . event - p r o c e s s i n g . org / t y p e s / >

10

11 C O N S T R U C T {

12 : e rdf : t y p e : U c T e l c o E s r R e c o m .

13 : e : s t r e a m < h t t p :// s t r e a m s . event - p r o c e s s i n g . org / ids / O v e r a l l R e s u l t s 0 3# stream > .

14 : e u c t e l c o : a c k R e q u i r e d " f a l s e "^^ xsd : b o o l e a n .

15 : e u c t e l c o : a n s w e r R e q u i r e d " f a l s e "^^ xsd : b o o l e a n .

16 : e : m e s s a g e " P a t t e r n 03: F o u r c om p an y - r e l a t e d e v e n t s w e r e d e t e c t e d w h e r e one p o s t e r has p r e v i o u s l y p o s t e d in the p a s t . "^^ xsd : s t r i n g

.

17 : e u c t e l c o : a c t i o n < b l a n k :// ac t io n1 > .

18 < b l a n k :// ac t io n1 > rdf : t y p e u c t e l c o : O p e n T w i t t e r ;

19 : s c r e e n N a m e ? s c r e e n N a m e 0 1 .

20 : e : m e m b e r s ? e1 , ? e2 , ? e3 , ? e4 .

21 }

22 W H E R E {

23 W I N D O W {

24 E V E N T ? id1 {

25 ? e1 rdf : t y p e : g o o g l e .

B.1. Overall System Test 145

26 ? e1 : s t r e a m < h t t p :// s t r e a m s . event - p r o c e s s i n g . org / ids / T w i t t e r F e e d# stream > .

27 ? e1 : s c r e e n N a m e ? s c r e e n N a m e 0 1 .

28 }

29 SEQ

30 E V E N T ? id2 {

31 ? e2 rdf : t y p e : a p p l e .

32 ? e2 : s t r e a m < h t t p :// s t r e a m s . event - p r o c e s s i n g . org / ids / T w i t t e r F e e d# stream > .

33 ? e2 : s c r e e n N a m e ? s c r e e n N a m e 0 2 .

34 }

35 SEQ

36 E V E N T ? id3 {

37 ? e3 rdf : t y p e : m i c r o s o f t .

38 ? e3 : s t r e a m < h t t p :// s t r e a m s . event - p r o c e s s i n g . org / ids / T w i t t e r F e e d# stream > .

39 }

40 SEQ

41 E V E N T ? id4 {

42 ? e4 rdf : t y p e : y a h o o .

43 ? e4 : s t r e a m < h t t p :// s t r e a m s . event - p r o c e s s i n g . org / ids / T w i t t e r F e e d# stream > .

44 }

45 } (" P T 5 S "^^ xsd : d u r a t i o n , s l i d i n g )

46 G R A P H ? id5 {

47 ? e5 : s t r e a m < h t t p :// s t r e a m s . event - p r o c e s s i n g . org / ids / T w i t t e r F e e d# stream > .

48 ? e5 : s c r e e n N a m e ? s c r e e n N a m e 0 2 .

49 }

50 }

Listing B.3:Scenario-based Test: Third Pattern (BDPL Syntax)

Dalam dokumen Roland Stühmer (Halaman 159-171)