Activity stream - extending Rails app data model / database

Frederik Ramm frederik at remote.org
Sun Jul 15 20:56:36 BST 2012


Hi,

On 15.07.2012 18:51, Paweł Paprota wrote:
> So I have done some more thinking with the activity stream and came up
> with two options for general approach to the implementation:
>
> https://wiki.openstreetmap.org/wiki/User:Ppawel/ActivityStream#Technical_design
>
> What do you think about those options? Maybe you see some other ones?
> Personally I like the flexibility of extending the data model, it also
> decouples activities from the actual data but I don't have enough
> context (like database server load etc.) to judge whether this is
> acceptable.

I don't think that having activity objects is a good idea because that 
would require modifying each process that generates them; e.g. every 
time someone writes a blog entry you'd generate an activity record, 
every time someone joins, etc.etc.

Generating activities on the fly seems the better approach to me, but 
that of course requires more resources and we wouldn't like every user 
to have an RSS feed that is queried every five minutes - or if we had, 
we'd have to run that on a database mirror and not on the main database.

That's one of the overall weak points of this whole "social" thing, at 
least as far as I am concerned. I view it as something non-essential and 
it might be nice to have for some users but it must not take away 
resources from the actual reading and writing of geo objects which is 
the core purpose of our database.

Ideally, I would like to see everything that an "activity stream server" 
needs exported through something like our database diffs, so that the 
load on the database server is minimal, and a *different* server can 
pick up all these pieces and combine them into an activity picture.

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00'09" E008°23'33"





More information about the rails-dev mailing list