[DMAAP-48] Initial code import
[dmaap/datarouter.git] / README.md
1 # DMAAP_DATAROUTER\r
2                                \r
3 ## OVERVIEW\r
4   \r
5 The Data Routing System project is intended to provide a common framework by which data producers can make data available to data consumers and a way for potential consumers to find feeds with the data they require.  \r
6 The delivery of data from these kinds of production systems is the domain of the Data Routing System. Its primary goal is to make it easier to move data from existing applications that may not have been designed from the ground up to share data.\r
7 The Data Routing System is different from many existing platforms for distributing messages from producers to consumers which focus on real-time delivery of small messages (on the order of a few kilobytes or so) for more\r
8 \r
9    Provisioning is implemented as a Java servlet running under Jetty in one JVM\r
10    \r
11    Provisioning data is stored in a MySQL database\r
12    \r
13    The backup provisioning server and each node is informed any time provisioning data changes\r
14    \r
15    The backup provisioning server and each node may request the complete set of provisioning data at any time\r
16    \r
17    A Node is implemented as a Java servlet running under Jetty in one JVM\r
18 \r
19 Assumptions\r
20     For 95% of all feeds (there will be some exceptions):\r
21         \r
22     Number of Publishing Endpoints per Feed: 1 – 10\r
23         \r
24     Number of Subscribers per Feed: 2 – 10\r
25         \r
26     File Size: 105 – 1010 bytes\r
27         \r
28     with a distribution towards the high end\r
29         \r
30     Frequency of Publishing: 1/day – 10/minute\r
31         \r
32     Lifetime of a Feed: months to years\r
33         \r
34     Lifetime of a Subscription: months to years\r
35         \r
36  \r
37 Data Router and Sensitive Data Handling\r
38  \r
39     A publisher of a Data Router feed of sensitive (e.g., PCI, SPI, etc.) data needs to encrypt that data prior to delivering it to the Data Router\r
40         \r
41     The Data Router will distribute that data to all of the subscribers of that feed.\r
42         \r
43     Data Router does not examine the Feed content or enforce any restrictions or Validations on the Feed Content in any way\r
44         \r
45     It is the responsibility of the subscribers to work with the publisher to determine how to decrypt that data\r
46         \r
47 \r
48 \r
49  \r
50 \r
51 What the Data Router is NOT:\r
52 \r
53     Does not support streaming data\r
54         \r
55     Does not tightly couple to any specific publish endpoint or subscriber\r
56         \r
57     Agnostic as to source and sink of data residing in an RDBMS, NoSQL DB, Other DBMS, Flat Files, etc.\r
58         \r
59     Does not transform any published data\r
60         \r
61     Does not “examine” any published data\r
62         \r
63     Does not verify the integrity of a published file\r
64         \r
65     Does not perform any data “cleansing”\r
66         \r
67     Does not store feeds (not a repository or archive)\r
68         \r
69     There is no long-term storage – assumes subscribers are responsive most of the time\r
70         \r
71     Does not encrypt data when queued on a node\r
72         \r
73     Does not provide guaranteed order of delivery\r
74         \r
75     Per-file metadata can be used for ordering\r
76         \r
77    External customers supported is via DITREX (MOTS 18274)\r
78  \r
79  \r
80  \r
81 \r
82 ## BUILD  \r
83  \r
84 Datarouter can be cloned and repository and builb using Maven \r
85 In the repository \r
86 \r
87 Go to datarouter-prov in the root\r
88 \r
89         mvn clean install\r
90         \r
91 Go to datarouter-node in the root\r
92 \r
93         mvn clean install\r
94          \r
95 Project Build will be Successful\r
96 \r
97 \r
98 \r
99 \r
100 ## RUN \r
101 \r
102 Datarouter is a Unix based service \r
103 \r
104 Pre-requisites to run the service\r
105 \r
106 MySQL Version 5.6\r
107 \r
108 Java JDK 1.8\r
109 \r
110 Install MySQL and load needed table into the database\r
111 \r
112 Sample install_db.sql is provided in the datarouter-prov/data .\r
113 \r
114 Go to datarouter-prov module and run the service using main.java \r
115  \r
116 Go to datarouter-node module and run the service using nodemain.java \r
117 \r
118 Curl Commands to test:\r
119 \r
120 create a feed:\r
121 \r
122 curl -v -X POST -H "Content-Type : application/vnd.att-dr.feed" -H "X-ATT-DR-ON-BEHALF-OF: rs873m" --data-ascii @/opt/app/datartr/addFeed3.txt --post301 --location-trusted  -k https://prov.datarouternew.com:8443\r
123 \r
124 Subscribe to feed:\r
125 \r
126 curl -v -X POST -H "Content-Type: application/vnd.att-dr.subscription" -H "X-ATT-DR-ON-BEHALF-OF: rs873m" --data-ascii @/opt/app/datartr/addSubscriber.txt --post301 --location-trusted -k https://prov.datarouternew.com:8443/subscribe/1\r
127 \r
128 Publish to feed:\r
129 \r
130 curl -v -X PUT --user rs873m:rs873m -H "Content-Type: application/octet-stream" --data-binary @/opt/app/datartr/addFeed3.txt  --post301 --location-trusted -k https://prov.datarouternew.com:8443/publish/1/test1\r
131 \r
132 \r
133  \r
134 \r
135  ## CONFIGURATION \r
136 \r
137 Recommended \r
138 \r
139 Environment - Unix based\r
140 \r
141 Java - 1.8\r
142 \r
143 Maven - 3.2.5 \r
144 \r
145 MySQL - 5.6\r
146 \r
147 Self Signed SSL certificates\r
148  \r
149  \r