Hello all,
I wanted to have all the powerful Twitter tools in ESME, too, without
bloating the core. Fortunately, there's already a concept unique to
ESME, which makes a lot possible- actions.
The actions engine is simple, but very powerful. There's a *test
condition* and an *action* to be run. I recently realized that many of
the ad-hoc Twitter tools could be implemented in ESME if the limits of
tests and actions are pushed a bit. Introducing hooks to different
ESME events could bring many benefits to this messaging platform.
*Hooks* that could be added to the test conditions:
-someone followed me
-someone unfollowed me
-I logged in
In addition, *regular/scheduled events* could be test conditions as
well. Maybe not a full-blown cron alternative, but at least:
-every N minutes
-at a specified time
There are many *actions* that could be included, as well, but so far
let's start with one- fetching all messages from a *feed*, checking
out which ones are unique from the messages in one's inbox and posting
them in the user's current timeline.
Let me give some *combinations* of these as examples to whet your
appetite:
-every 30 minutes, fetch new entries from my blog and post them in my
timeline
-every 5 minutes, fetch new entries from my Twitter feed (that's what
I started from, look where I got)
-when someone follows me, send me an email
-when I log in, post a message "Hello everyone!"
-at 12 AM tomorrow, post a delayed message
This is something which several different *tools* are trying to
accomplish for Twitter- Twitterfeed (for posting blog headings),
TweetLater(for delayed messages & follower autoreply),
identi.ca/
Twitter/
ping.fm/whatever cross-post bridges.
My current proposal for hooks/timed tests *syntax* is:
-"hook=login"
-"hook=follow"
-"hook=unfollow"
-"every=5 min"
-"at=12 AM" or "at 200810011200" (something flexible along the lines
of GNU "at")
Since we already have an HTTP POST action with a similar syntax, the
feed action syntax could be:
-"atom:http://..."
-"rss:http://..."
So, what does everyone think? Is it trying to stretch ESME to areas it
wasn't meant to fulfill? Is it too complicated? Or do you think that
these simple building blocks are flexible enough to create complex
behavior? Do you believe that this is a feature, which could make a
difference for ESME and distinguish it from the rest of the social
messaging applications?
I currently have a proof-of-concept version, which includes login,
follow and unfollow hooks and an atom feed fetch action. I'm sure many
things could be improved in my current design, so you could make a big
difference with your comments.
I'm eagerly awaiting your feedback.
Best Regards,
Vassil Dichev
P.S. If someone is interested in *implementation* details, I decided
to include the MailboxReason as an argument to the test function and
created a LoginReason, FollowReason, UnfollowReason, etc. Not sure if
it was designed to work like that, but seems the best way to integrate
my solution in the current design.
P.P.S. Eventually, *expansions* in different actions/hooks could be
created, like "%t: %100c... at %p" in the atom action could generate a
message with the title, up to 100 characters from the content and the
published date at the end. There might be also *parameters* for
actions and hooks, for instance something like "hook=follow following
> 5000 & updates < 5" would generate a hook for dealing with spammers,
who have followed more than 5000 people including you, but have less
than 5 updates to contribute.
With this off my chest, I can go to a short vacation till the end of
the week. I'll gladly reply to any suggestions and opinions when I'm
back and the concept has matured a bit