Yes. Mnesia meets your requirements. However, as you said, a tool is good when someone who uses it understands it in detail. We used mnesia on a distributed authentication system , and so far we have not encountered any problem. When mnesia is used as a cache, it is better than memcached, for one reason "Memcached cannot guarantee that you write, you can read at any time due to memory problems and issues" (follow here ).
However, this means that your distributed system will be built on Erlang. Indeed, mnesia in your case is superior to most NoSQL cache solutions because their systems are Eventually consistent . Mnesia is consistent because network availability can be ensured through the cluster. For a distributed caching system, you donโt need a situation where you read different values โโfor the same key from different nodes, so the mnesia sequence is convenient here.
Something you should think about is that it is possible to have a centralized memory cache for a distributed system. This works as follows: your RABBITMQ server is running and is available to AMQP clients on each node cluster. Systems communicate through the AMQP interface. Since the cache is centralized, consistency is ensured by the process / system responsible for writing and reading from the cache. Other systems simply place the key request on the AMQP message bus , and the system responsible for the cache receives this message and responds with a value.
We used Message bus Architecture using RABBITMQ for a recent system that included integration with banking systems, an ERP system, and a public online service. What we built was connected to merge all this together, and we are glad that we used RABBITMQ . There are many details, but we did to come up with a message format and a system identification mechanism. All systems must have a RABBITMQ client to write and read messages from the bus. Then you will create a read Queue for each system so that the other system writes its requests to this queue, whose name inside RABBITMQ matches the system that owns it. Then, later, you should encrypt messages passing through the bus. As a result, you have systems connected to each other over a long distance / between states, but with an efficient network you wonโt believe how quickly RABBITMQ connects these systems. Anyway, RABBITMQ can also be grouped, and I must tell you that it is Mnesia , which provides RABBITMQ (which tells you how good mnesia can be).
Another thing is that you need to read and write a lot of programs until you feel comfortable.
source share