Mesoscopic Bose-Hubbard model