[erlang-questions] Need advice on how to design a tagging web service

Matthew Wilson matt@REDACTED
Thu Sep 14 03:56:14 CEST 2006


I want to learn erlang and I'm trying to figure out if this project idea
might be a good one.

I want to write a network service that applications can use to support
user-supplied tags, like del.icio.us and flickr.

I need the service to be able to process *lots* of transactions.

clients of the service would do any of the following:

 * add a tag supplied by a user for a thing.

 * look up all pairs of (tags, things) that a given user has supplied.

 * look up all the tags supplied for any users for a given thing.

I'm thinking that the erlang service would sit in front of a database,
and the database would have this schema:

tags table: (tagid, tagname)
things table: (thingid, thingname)
users table: (userid, username)
gumbo table: (userid, thingid, tagid)

And here's how I'm thinking about designing the service:

One process periodically connects to the database and reads everything
out to a local in-memory cache.

Another process waits for client requests.  Any client request to get
data goes to the process with the in-memory cache to get results.

Meanwhile, any request to add data goes to another process that
accumulates these into a queue.

Yet another process pops elements out of that queue and then writes them
all to the database.

All comments are welcome.

Is this absurd?

TIA

Matt

-- 
A better way of running series of SAS programs:
http://overlook.homelinux.net/wilsonwiki/SasAndMakefiles




More information about the erlang-questions mailing list