You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streams.apache.org by ds...@apache.org on 2013/09/17 20:13:22 UTC

svn commit: r1524151 - /incubator/streams/site/trunk/content/streams-usage.mdtext

Author: dsullivan
Date: Tue Sep 17 18:13:21 2013
New Revision: 1524151

URL: http://svn.apache.org/r1524151
Log:
changing usage information for new setup

Modified:
    incubator/streams/site/trunk/content/streams-usage.mdtext

Modified: incubator/streams/site/trunk/content/streams-usage.mdtext
URL: http://svn.apache.org/viewvc/incubator/streams/site/trunk/content/streams-usage.mdtext?rev=1524151&r1=1524150&r2=1524151&view=diff
==============================================================================
--- incubator/streams/site/trunk/content/streams-usage.mdtext (original)
+++ incubator/streams/site/trunk/content/streams-usage.mdtext Tue Sep 17 18:13:21 2013
@@ -24,15 +24,41 @@ The following is an outline of how to wo
 
 ---
 
-Streams is designed for deployment in Apache ServiceMix which provides Apache Camel and as OSGI container.  Step 1 is to download the latest [ServiceMix] [1].  You should also get the latest [Streams source] [2].  
+Before starting you will need the following software:
 
+[ServiceMix] [1] 
+
+[Cassandra] [2]
+
+[Tomcat] [3]
+
+[Streams Master][4]
+
+[Streams Source][5]
+
+Streams is designed for deployment in Apache Tomcat, Apache ServiceMix provides a JMS connection, and Apache Cassandra acts as a persistence layer.
+
+To begin run mvn install from within the streams-master directory and then from within the streams-source directory:
+ 
      mvn install
 
-This will generate jar files for streams-eip-routes and streams-osgi-components (each module individually).  Transfer (drag and drop, or copy):
+This will generate a war file located in the streams-web/target directory. Before starting Tomcat, you will need to start Cassandra. To do this, run:
+
+     ./bin/cassandra -f
 
->streams-eip-routes-0.1-SNAPSHOT.jar, activity-subscriber-0.1-SNAPSHOT.jar,activity-registration-0.1-SNAPSHOT.jar, and activity-consumer-0.1-SNAPSHOT.jar into the {servicemix}/deploy folder.
+from within your Cassandra installation
 
-     ./bin/servicemix will start servicemix
+Copy the streams-web.war to the /webapps directory of tomcat and start Tomcat:
+
+     ./bin/startup.sh
+ 
+from within your Tomcat installation
+
+Start ServiceMix: 
+
+     ./bin/servicemix 
+
+from within your ServiceMix installation
 
 
 Testing Throughput
@@ -40,7 +66,7 @@ Testing Throughput
 
 You can use any utility capable a sending HTTP requests, but Chrome's Advanced Rest Client browser plugin is simple and easy to use.
 
-With your HTTP utility of choice set up a publisher by POSTing JSON like the following to http://localhost:8000/streams/publisher/register
+With your HTTP utility of choice set up a publisher by POSTing JSON like the following to http://localhost:8080/streams/publisher/register
 
      {
          "authToken": "token",
@@ -56,37 +82,49 @@ With your HTTP utility of choice set up 
 
 The service will return a URL that can be POSTed to with ActivityStrea.ms formatted JSON.
 
-Next setup a subscriber by POSTing JSON like the following to http://localhost:8000/streams/subscriber/register
+Next setup a subscriber by POSTing JSON like the following to http://localhost:8080/streams/subscriber/register
 
      {
          "authToken": "token",
          "@class":"org.apache.streams.osgi.components.activitysubscriber.impl.ActivityStreamsSubscriptionImpl",
          "filters": [
-             {
-                 "@class":"org.apache.streams.osgi.components.activitysubscriber.impl.ActivityStreamsSubscriptionLuceneFilterImpl",
-                 "query": "string represented query of type expected by filter implementation"
-                 
-                 
-             }
-         ],
-         "outputs": [
-             {
-                 "output_type": "http",
-                 "method": "post",
-                 "url": "http.example.com:8888",
-                 "delivery_frequency": "60",
-                 "max_size": "10485760",
-                 "auth_type": "none",
-                 "username": "username",
-                 "password": "password"
-             }
+             "tags"
          ]
      }
 
 This will return a unique URL that can take GET and POST requests.  POST requests should contain JSON like the above to reconfigure the endpoint, GET requests will return activity streams JSON.
 
-Now, POST some JSON activitystrea.ms to the URL you received for the Publisher and then GET the URL you received for the Subscriber.
+Now, POST some JSON activitystrea.ms to the URL you received for the Publisher and then GET the URL you received for the Subscriber. The subscriber will return activity with tags that correspond to the subscribers filter. The following is an example of an activity that will be returned to the subscriber example:
+
+     {
+         "id": "id",
+         "verb": "verb",
+         "tags": "tags",
+         "provider": {
+              "url": "www.providerexample.com"
+         },
+         "actor": {
+              "id": "actorid",
+              "objectType": "actorobject",
+              "displayName": "actorname",
+              "url": "www.actorexampleurl.com"
+         },
+         "target": {
+               "id": "targetid",
+               "displayName": "targetname",
+               "url": "www.targeturl.com"
+         },
+         "object": {
+               "id": "objectid",
+               "displayName": "objectname",
+               "objectType": "object",
+               "url": "www.objecturl.org"
+           }
+     }
 
 
 [1]: http://servicemix.apache.org/
-[2]: http://streams.incubator.apache.org/source-repository.html
\ No newline at end of file
+[2]: http://cassandra.apache.org/download/
+[3]: http://tomcat.apache.org/
+[4]: https://svn.apache.org/repos/asf/incubator/streams/streams-master-pom/trunk
+[5]: https://svn.apache.org/repos/asf/incubator/streams/trunk/
\ No newline at end of file