make metadata storage pluggable

make the port configurable