Alternative Methods for Application Server Storage

Asked

Viewed 178 times

2

Good Afternoon Staff, I would like some suggestions for alternative ways of accessing data on an application server, more specifically a Jboss 6. It happened that I have an application hosted in a Jboss 6 and need to from time to time recover data stored in BD or file (as the amount of data is not very large I am currently using file reading solution). However, frequent reading of the file and/or consultation of the BD, besides consuming memory, also affects the performance of the system. Would they know any alternative way to read the data ? For example, any way to keep the data read from BD/file in memory (Cache)? Just to clarify, the reading to the/BD file is done from time to time, for ex every 2 hours, and it is necessary that a web project has the information available at all times. Any suggestions ? Just for the record, the web project in question is this one: http://allinyourhandsweb.com Result of a project of mine of about 8 months of development, feel free to any suggestion related to it.

Thank you.

1 answer

2

Memory caching is quite common. You can use tools like:

  • Memcached: used by Youtube and Wikipedia. Works with several platforms and not only Java. Independent of an application server.

  • Apache Java Cache Systems: Java implementation of a memory cache system.

  • Ehcache: another Java implementation, maintained by a company that offers other related products if you need more capacity.

In general, all these cache systems work on one or more servers in a distributed way. Are processes (programs) the part that the application accesses via communication between processes or some other configurable protocol.

Java implementations can also be embedded in the application, but this loses the advantage of data distribution and durability in case of application reboot.

Another alternative is to use a database in memory, such as Mariadb, one Fork mysql.

Mysql has different mechanisms that you can use to manage tables, for example, Innodb and Myisam. Each mechanism has different characteristics, capabilities and constraints.

Mariadb extends these features and has other Engines tables, such as the MEMORY Storage engine. With this, you can create a database in memory to cache the data and still enjoy the same queries used in "normal" tables, persisted on disk.

  • Thank you very much for the reply, utluiz. I tried to start the implementation using "Apache Java Cache Systems", however when climbing jboss I noticed an error related to Transactionmanager. You’d have an idea what it could be ?

  • @rbertani This is very generic. It is easier for transaction error to be linked to database configuration. I suggest you post another question here in the OS with configuration details and with the code snippet (method or class) where the error occurs, plus the error stacks. Hug.

  • Dude, I’ll try to implement using "Memcached", it seemed like a better solution. Anyway, if I discover the error in the JCS put here. Thanks for the support.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.