I am working on an instant messaging app and i am using Ejabberd as an application server for message forwarding and offline storage, roster, user profile ,but i am very confuse about database selection, since Mnesia is only used for small data set, which database would recommend to use as a Offine storage providing high scalablity low latency, fast read/ write? Is couchbase or couchDB is right choice ?
Couchbase or CouchDB are not supported by ejabberd but you have plenty of good alternative storage for large databases: MySQL, Postgres, Riak.
You can even use different type of backends for different type of data to suit the specific needs of your project.