UML + some UI

Peter Korsten EMAIL HIDDEN
Wed Apr 15 22:15:30 CEST 2009


2009/4/15 Tony Hardie-Bick <tony at entity.net>

> Recognising complexity (it has some very recognisable symptoms, even down
> to the
> way people talk about what they're doing, verbs, intonation, everything),
> is
> part of pruning the possibility tree and preparing the ground for a good
> solution. Simplicity is a wonderful goal; in code, electronics, maybe
> everything
> (music, surely), and choosing a simple solution, or waiting until a simple
> solution appears, is also a part of complexity management.
>

At work, I'm to write a server application that sends and receives SMS
messages,possibly tens of thousands at the time. Obviously, sending out
12,000 messages from one application must not interfere with sending one
message with a password reminder (which must be nearly instantaneous).

We've been talking about it, coming up wioth a design, ditching it, until we
ended up with just a single, giant table for all incoming and outgoing
messages. Configuration will be largely in the database, to enforce
referential integrity. Making sure that transactions work properly ensures
that you can cluster the application without a problem.

If one or more new messages come in, the application starts a new thread for
each destination (which means a pool of connectiins to the SMSC, the SMS
server). In each of those threads, the relevant messages are loaded from the
database, and they are being sent to a thread pool (a Java 5 feature), the
size of the thread pool being the size of the SMSC connection pool for that
destination.

So we have one event starting one or more threads, each of those threads
starting a number of threads themselves.

So there are dozens of threads running, but the whole thing can be described
in two UML activity diagrams.

I thinlk it's actually a pretty simple design - and that's the sort of
design I prefer.

- Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.music-bar.org/pipermail/music-bar/attachments/20090415/f7575172/attachment-0001.html>


More information about the music-bar mailing list