You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@streams.apache.org by Danny Sullivan <ds...@hotmail.com> on 2013/08/08 22:29:27 UTC

Repository Layer Update

As it stands, the code in the cassandra branch receives activitystrea.ms formatted json and saves the object in the repository. The distributeToSubscribers method now runs on a timer that fires every 30 seconds (which will be configurable) and essentially adds all activities from the repository to every subscriber. Unfortunately, the distribute to subscribers method doesn't have a concept of time so every 30 seconds all activities get re-added. To solve this, I'd like to add a lastUpdated field for each subscriber that will allow the ActivityAggregator to select all activities that take place after the lastUpdated property of each subscriber object. I'm interested to see if anyone has any input about setting up the application this way. Otherwise I will try that implementation and we can start talking about merging the repository branch with trunk.
Danny 
This is the subscriber registration json for the updated subscription process:
{     "authToken": "token",     "@class":"org.apache.streams.osgi.components.activitysubscriber.impl.ActivityStreamsSubscriptionImpl",     "activityStreamsSubscriptionFilters": [         {             "@class":"org.apache.streams.osgi.components.activitysubscriber.impl.ActivityStreamsSubscriptionCassandraFilterImpl",             "query": "select * from Activities"
         }     ],     "outputs": [         {             "output_type": "http",             "method": "post",             "url": "http.example.com:8888",             "delivery_frequency": "60",             "max_size": "10485760",             "auth_type": "none",             "username": "username",             "password": "password"         }     ] }