otm:the_matching_of_causal_sequences:example1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
otm:the_matching_of_causal_sequences:example1 [2011/06/27 06:21]
aspectscript
otm:the_matching_of_causal_sequences:example1 [2012/02/06 19:22] (current)
aspectscript
Line 1: Line 1:
 ====== Analyzing Tweet Popularity ====== ====== Analyzing Tweet Popularity ======
  
-The following example shows two independent Web applications that constitute a social network application. A user can publish a tweet and this tweet can be retweeted by the other user because both users follow each other. A repeated tweet (the same string) and retweet are not  analyzed.+The following example shows two independent Web applications that constitute a social network application. A user can publish a tweet and this tweet can be retweeted by the other user because both users follow each other. A OTM distributed stateful aspect observes and counts each retweet of a user
  
 <html> <html>
Line 51: Line 51:
 </code> </code>
  
-Finally, the definition and deployment of the entity (**tm**that analyzes the popularity of tweets is:+Finally, the definition and deployment of the **sAspTweetPopularity** stateful aspect that determines the popularity of tweets is:
 <code javascript> <code javascript>
-var tm = {+var sAspTweetPopularity = {
     kind: AFTER,     kind: AFTER,
-    seqExp: countRetweet,+    sequence: countRetweet,
     advice: function(jp, env){     advice: function(jp, env){
         addPopularity(env.idT, env.counter);         addPopularity(env.idT, env.counter);
Line 61: Line 61:
     spawn: newPosts     spawn: newPosts
 }; };
-deploy(tm);+WeCa.OTM.deploy(sAspTweetPopularity);
 </code> </code>
  
 Go [[otm/the_matching_of_causal_sequences|the parent Web page]]. Go [[otm/the_matching_of_causal_sequences|the parent Web page]].
  • otm/the_matching_of_causal_sequences/example1.1309166502.txt.gz
  • Last modified: 2011/06/27 06:21
  • by aspectscript