Server <-> Client architecture.
Hi. I have plenty experience in Java, but none in Java networking. The only thing I did for deployment was a web-service, but what I need to do now, is a Server <-> Client[~5] application.
I don't want step-by-step guides on this, just some recommendations regarding architectures I should use. Basically what I need is an server containing a DNA database which publishes a service method that allows the clients to input certain DNA sequences, do the matching, and returning information about the micro-organisms discovered.
What would I need to implement such a system?
Thanks!
PS: For experienced users, I also need to be able to evaluate the performance with PEPA and use some multi-core architecture in parallel with this (like JOMP or JPPF).
application context
Re: Server <-> Client architecture.
Quote:
What would I need to implement such a system?
Depends upon a bit the details of the requirements, and where the data is stored. Overall, for an application server you could use something like Tomcat or JBoss, depending upon what you need (web services, beans, etc...) Another thing to consider is what sort of data you are dealing with: you don't mention the algorithm, as a BLAST requires a special blast formatted database file while a pairwise Smith-Waterman or multiple pairwise alignment does not - either way you might consider using a database (look into the BioSQL schema). Where and how you provide this service is another question - it could simply be a service (like a servlet) or through Enterprise Beans - the latter provides a more tiered approach. You may also need to install 3rd party tools (for example the NCBI toolkit) which adds another layer of complexity. Look into J2EE design patterns, as these might help you get an understanding of server side architectures.
Re: Server <-> Client architecture.
Hi. First of all, thanks for your answer.
Now, for the algorithm I'll be using a pairwise matching (either N-W or S-W). With the 2nd pair queried from a Database (probably Oracle, not huge). At this point, I'm intending to deploy the app as a stand-alone application, which listens for connections from multiple clients using TCP via sockets.
The interesting feature I'm trying to implement now, is the option to run the algorithms on multiple-core depending on the CPU, or even to use the GPU for "vectorial" operations.
I should have mentioned that this is mainly an educational project, for college, and the actual functionality (eg. a full documented database) do not count so much. Is about the features and architectures we're using.
After it's done I'll post the source code and documentation so anyone could learn something from it :)
application context
Re: Server <-> Client architecture.
Based upon your description, if you haven't considered this already, your might consider having the server maintain a thread pool and request queue. Each incoming request gets placed into the queue, and the worker threads process each request in turn. If there is nothing left in the queue, the threads can wait (when something is placed into the queue the threads can be notified). This gives you control over how many processes run at a given time, and allow you to run multiple requests in parallel. BioJava has implementations of these algorithms already, but if you are required to write them yourself I would say don't peak (I've never been a fan of Biojava, but it comes in handy sometimes). If your requirement is to do pairwise alignments of all sequences in the database to find the top hits, this is exactly what the BLAST algorithm excels at (pairwise algorithms don't scale well, and doing many against a database of sequences is exactly what blast does, only orders of magnitude faster)