Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
otm:the_matching_of_causal_sequences:example1 [2011/06/27 09:22] aspectscript |
otm:the_matching_of_causal_sequences:example1 [2012/02/06 23: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). | + | 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. |
| < | < | ||
| Line 51: | Line 51: | ||
| </ | </ | ||
| - | Finally, the definition and deployment of the entity (**tm**) that analyzes | + | Finally, the definition and deployment of the **sAspTweetPopularity** stateful aspect |
| <code javascript> | <code javascript> | ||
| - | var tm = { | + | var sAspTweetPopularity |
| kind: AFTER, | kind: AFTER, | ||
| - | | + | |
| advice: function(jp, | advice: function(jp, | ||
| addPopularity(env.idT, | addPopularity(env.idT, | ||
| Line 61: | Line 61: | ||
| spawn: newPosts | spawn: newPosts | ||
| }; | }; | ||
| - | deploy(tm); | + | WeCa.OTM.deploy(sAspTweetPopularity); |
| </ | </ | ||
| Go [[otm/ | Go [[otm/ | ||