Vines is a scalable XMPP chat server, using EventMachine for asynchronous IO.
This gem is inspired by another mongo storage for Vines: vines-mongodb.
And provides more:
- Use MongoMapper to model Resources.
- Use BOSN ObjectID to id a resource instead of using a JID. This makes integration with frameworks like Rails much easier.
- Test with real Mongodb, instead of Mock, this makes it more flexible to develop and extend
This storage has few assumptions:
- User is identified by his BSON id and user name, keyed by _id and user_name respectively.
- User can use _id@domain and user_name@domain as jid to login.
$ gem install vines vines-mongomapper
$ vines init wonderland.lit
$ cd wonderland.lit && vines start
Add the following configuration block to a virtual host definition in
the server's conf/config.rb
file.
storage 'mongomapper' do
host 'localhost', 27017
host 'localhost', 27018 # optional, connects to replica set
database 'xmpp'
tls true
username ''
password ''
pool 5
end
$ bundle install
$ bundle exec rspec spec
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
- Sawyer ZHANG [email protected]
Vines is released under the MIT license. Check the LICENSE file for details.