streams-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Danny Sullivan <dsulliv...@hotmail.com>
Subject Repository Layer Update
Date Thu, 08 Aug 2013 20:29:27 GMT
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"         }     ] } 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message