Workflow management system in Erlang/Mnesia?
Tue Jan 25 11:05:22 CET 2000
On Tue, 25 Jan 2000, Bud P. Bruegger wrote:
bud>I came across Mnesia and Erlang these days and got the impression that it
bud>may be a cool environment to implement an open source, web-based,
bud>distributed, fault-tolerant workflow management system that we intend to
bud>use as the basis for a laboratory management system. I'm writing this
bud>message in the hope to get feedback on whether Erlang/Mnesia is a good
bud>choice for this and whether my expectations are realistic.
bud>My current idea is to implement a distributed database and most of the
bud>business logic in Erlang/Mnesia while using one to several java application
bud>servers (Enhydra) for the presentation layer that serves HTML to standard
bud>Some concrete questions I have include the following:
bud>* does Erlang/Mnesia sound like a good solution for this problem in
Yes, I think so.
bud>* how resource hungry is Erlang (RAM, processor); is it realistic to run
bud>such an application on a cluster of small machines (Intel PCs under Linux)
bud>much rather than some few super servers?
This type of application should work well on a cluster of small machines.
I'm currently running an Erlang-based web server on my machine (a 500MHz
UltraSPARC 10 with 512 MB RAM). The web server is ticking along nicely
without affecting my normal work. Currently it takes up 37 MB RAM (same as
my Netscape browser, BTW), but that is mainly indicative of it's peak
requrirement so far. My web server app has peaked at 100 MB RAM useage
while HTML-izing a very large source code file.
Basically, a typical Erlang application uses a fairly conservative amount
of memory, but certain operations are resource hungry. The Erlang garbage
collector then compacts the heap, but it is a good idea to have enough
virtual memory to handle peaks of maybe (...highly application
dependent...) 100 MB for your type of application.
Currently, my largest table in mnesia contains 124,000 records.
bud>* is there a way to foresee the bandwidth and latency requirements such an
bud>application would put on the network? Would it run decently on 10Mbit
bud>Ethernet, 100Mbit switched, etc.
Assuming your 10MB Ethernet is not already strained, it should work well, I
think, but given the chance, I'd go for 100MB switched -- why chance it?
bud>* would it be possible to handle small text notes and descriptions
bud>with Mnesia (multi line text fields) or is this a datatype that
bud>Mnesia does not handle well?
Mnesia takes any type of data. Small text notes is hardly a problem.
Just bear in mind that character lists in Erlang use up 8 bytes per
character. One way to get around this (but don't worry about if you don't
have tons of data) is to convert the text notes to binary objects.
Personally, I use atoms instead of lists in my 120K-record cross-reference
table, because it contains lots of fully qualified file names. This means
that I convert each file name using list_to_atom(Filename).
Given that atoms are never removed, this is a risky proposition, so don't
do it unless your "name space" is finite.
bud>* and finally, is there a potential to find people in the Erlang
bud>community who are interested in collaboration in such an open
bud>source project or is the community mostly limited to telephony
Yes, I'm interested for one. Even the telecom community has a need for
workflow applications. ;)
If your workflow application needs RDBMS-like features, check out the rdbms
Ulf Wiger, Chief Designer AXD 301 <>
Ericsson Telecom AB tfn: +46 8 719 81 95
Varuvägen 9, Älvsjö mob: +46 70 519 81 95
S-126 25 Stockholm, Sweden fax: +46 8 719 43 44
More information about the erlang-questions