3

I'm writing some application that will work in a background (windows service? maybe some application server?) Application receives some data, then it transforms/packs/optimizes in another thread and then in another thread it sends data to next server (using WebServices). There will be thick client (probably Swing) for monitoring whole process thru WebServices. All application will be written by my team (so there is no need to use complicated integration services). Application will be composed from loosely coupled classes (simple DI pattern), maybe JMS will be helpful ?

I'm wondering what technologies should I use. Tomcat? Glassfish? or maybe something lighter ? Spring server?

alan
  • 53
  • 3

2 Answers2

2

You doesn't need any application server. Keeping it as much light weight as possible is a good choice. My suggestion for you is to use a lightweight framework that supports DI, transformations, threading/seda and integration (invoking weservices) out of the box, so that you can concentrate on your application logic. The frameworks like Apache Camel, Mule etc are good candidates.

Aravind Yarram
  • 78,777
  • 46
  • 231
  • 327
  • Hi, I specified my application below, could you guide me for technologies/mechanisms/libraries that I should use ? – alan Dec 07 '10 at 14:54
  • I thought that I can put threads in Tomcat worker threads, and somehow spawn new threads when connection arrives. how to do that? should i create new Connector for Tomcat ? – alan Dec 06 '10 at 23:10
  • You should post follow up questions as responses. Anyways you no need to spawn any new threads if you are using tomcat. tomcat does that for you. – Aravind Yarram Dec 07 '10 at 00:07
  • It would be perfect if Tomcat can manage threads. All I need is to make Tomcat listen on some port (for example 45005) and spawn new thread for accepted connection and pass this connected socket to newly created thread. – alan Dec 07 '10 at 00:38
  • That is what Tomcat is meant for. It LISTENS for requests on a particular port (45005 in your case), when a client sends a request to that port then 1) tomcat accepts the request 2) picks a new thread from the pool 3) and then the picked thread calls your servlet. But I don't see this is what you need. Tomcat only understands HTTP or HTTPS. After reading through your posts, I am convinced you need Apache Camel or Mule. It would be better you specify at a high-level flow of your application and then I can provide more details to you – Aravind Yarram Dec 07 '10 at 00:59
  • I have application composed from few loosely coupled components (dependency injection pattern, all compoments written by me). First of them listens for connections, spawns new thread (serversocket.accept) receives data in proprietary format and then sends data to next component, next component transforms data (optimizes, creates some packages), and next component sends data further (probably using WebServices or WebDAV). Additionally I need to track/monitor whole application/process by external application placed on user computer (connected thru WebServices) – alan Dec 07 '10 at 09:18
  • Ok as I guessed all you need is Apache Camel. You first configure an endpoint (using the protocol of your choice http://camel.apache.org/message-endpoint.html) to listen for connections. You can configure thread pools for this endpoint so that you can service multiple clients simultaneously (http://camel.apache.org/camel-23-threadpool-configuration.html). then you define the components you have codded as processors. you can orchestrate the entire flow you have described just by simple configuration. And you also get the BAM out of the box. Buy Apache Camel in Action Book. – Aravind Yarram Dec 07 '10 at 15:36
0

Tomcat is not an application server. I have never heard of spring server.

here is a list of java application servers .

The most widely used are JBoss and Glassfish.

NimChimpsky
  • 46,453
  • 60
  • 198
  • 311
  • 2
    I wrote 'application server' purposely, because I'm not sure how this application should look like. I'm not creating 'jboss vs glassfish' thread, maybe both are much to heavy and cumbersome for my needs. That's why I'm asking, how to organize this app. – alan Dec 06 '10 at 14:33
  • Spring has it's own tomcat distribution, that's probably what he meant with Spring Server: http://www.springsource.com/products/tcserver – Sean Patrick Floyd Dec 06 '10 at 15:48