On Sun, Jan 07, 2007 at 09:47:29PM -0000, deech_99 wrote:
> > You're a bit vague on essential details like what database(s) you're
> > querying and what GUI system you'll be using, so it's hard to go any
> > further and say whether this is a good use of OCaml and/or threads.
>
> At this prelim stage I am thinking of using Sqlite and Labltk (is
> there a better GUI library in ocaml?). I have not started coding and I
> am a complete Ocaml beginner although I have studied Haskell.
Okayyyy. SQLite is a fine choice of database, but (AIUI) it's not the
sort of database which needs a server, so I'm not sure in what sense
such a database can be queried or can become unavailable. It's just a
file on a disk, so it's either there or it's not there. To simply
serve files from a remote machine it might be worth looking at
installing a web server / WebDAV server.
As an alternative to labltk you might consider lablgtk2, which is
based on the Gtk+ library / widget set. On the other hand, labltk is
simpler.
> The threading question came up because while scouring Google trying
> understand the pros and cons of Ocaml I came across a post saying that
> Ocaml threads did not support GC and therefore Ocaml should not be
> used for application with any kind of concurrency.
This is only an issue if you want multiple OCaml threads to be doing
something CPU intensive at the same time (typical example: number
crunching application on an SMP machine). If the threads are mainly
sleeping, as yours will be, there is not an issue.
> The client/server application I plan to write basically serves up
> medical images. These images use a protocol called DICOM for
> communication. In addition to the green/red light GUI feature I want
> to be able to load images in the background etc.
Again, multiple threads will be fine in this context since they will
mostly be blocked waiting for network reads.
For rending JPEGs you have many options. One which I sometimes
recommend is to run an external 'djpeg' command; this converts the
image into PPM format which is trivially parsed inside the program.
> The solutions that exist so far(including commercial) are written in
> Java and are very inefficient.
>
> I am exploring Ocaml because of it's language shootout benchmarks,
> multi-paradigm model (read no monads) and readability.
>
> Thanks for the support. Given your prompt and knowledgeable responses
> are typical I feel much more confident about using the language.
--
Richard Jones
Red Hat UK Limited
.