Alternative methods for storing in Application Server

2

Good Afternoon Personal, I would like some suggestions for alternative ways of accessing data on an application server, more specifically a JBoss 6. It occurred that I have an application hosted on a JBoss 6 and I need from time to time to retrieve stored data in BD or file (as the amount of data is not very large I am currently using the file reading solution). However, frequent reading of the file and / or query to the DB, besides consuming memory, also affects the performance of the system. Did they know of any alternative way of reading the data? For example, some way to keep data read from BD / file in memory (Cache)? Just by clarifying, the reading to the file / BD is done from time to time, for example every 2 hours, and it is necessary that a web project has information available at all times. Any suggestion ?  Just to be aware, the web project in question is this one: link Result of a project of mine about 8 months of development, feel free to suggestion regarding it.

Thank you.

    
asked by anonymous 17.09.2014 / 21:48

1 answer

2

Cache in memory is quite common. You can use tools like:

  • Memcached : used by Youtube and Wikipedia. It works with several platforms and not just Java. It is independent of an application server.

  • Apache Java Cache Systems : Java implementation of an in-memory cache system

  • EhCache : Another Java implementation maintained by a company that offers other related products if you need more capacity. / p>

In general, all such caching systems work on one or more servers in a distributed fashion. They are processes (programs) the part that the application accesses via communication between processes or some other protocol configurable.

Java implementations can also be placed embedded in the application, however this will lose the advantage of data distribution and durability in case of application restart.

Another alternative is to use an in-memory database, such as MariaDB , a MySQL fork .

p>

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 of tables, such as MEMORY storage engine . With this, you can create an in-memory database to cache the data and also take advantage of the same queries used in the "normal", persistent disk tables.

    
17.09.2014 / 22:15