0

I need to store binary data gathered via HTTP very fast.

I have a client sending data via HTTP to a server that stores the stuff into a database table. Ingredients: Java 1.5, Tomcat 5.5, Hibernate 3.0, SQL Server, jTDS JDBC drivers.

I do not want the clients to wait, so I'm detaching any business logic and just queuing up the stuff for later processing.

How can I make the data storing more efficient?

Do I gain some time:

  • using different versions (es. "use tomcat 6" or "use Java 7")?
  • changing configurations (es. "disable debug mode in Tomcat" or "use the -Dblazingfast" Java option)?
  • swapping components (es "use JBoss, not Tomcat")?
  • using different programming tecniques (es. "use while loops instead of for loops")

Shall I use a cache as ehcache? Shall I ditch Hibernate and use JDBC? Is there anything configurable enough that I can use instead of my custom servlet?

Thanks in advance, any hint appreciated.

Manrico Corazzi
  • 11,299
  • 10
  • 48
  • 62

1 Answers1

1

If writing to disk is OK then you could do as suggested here. On a side note, instinctively I think byte array should be faster to handle than a String.

Community
  • 1
  • 1
posdef
  • 6,498
  • 11
  • 46
  • 94
  • I don't have any prejudice as to where writing the data as long as it's fast enough. As for the byte array vs. String... it was just a contrived example, but I take the advice. – Manrico Corazzi Dec 19 '11 at 17:10
  • I have not done any timings myself, but I used the same suggestion I linked to above. Otherwise I hope it works out fine in the end... :) – posdef Dec 19 '11 at 21:11