Jxmpp-bot: User management

Now, when Syslog subsystem is ready it’s time to create user-management subsystem

Let’s see use-case skecth.


First of all we need to manage bot’s users. By management I mean the ability to remember visitors (users) of each room where bot is present. If new user has joined chat-room it’s jid and nickname should be automatically added into bot’s local database and he should be treated as new registered user will null permissions and privileges. Later administrator can grant to him more rights.

Each user can join and leave chat-room many times per day. This is what we call visit. We need the ability to monitor user visits. This way you can ask bot to show how many visits we made by user johndoe@xmpp.org, when was his last visit and how many time he spent in chat-room (both totally, weekly, monthly, daily etc).

Of course there should be a set of methods to clean up (purge) visits using criteria. For example we might want to purge all visits information older then two months ( a week, a day etc) or all visits of specified user. Besides manual cleaning there should be an option to enable automatic cleaning.

Managing chat rooms. There should be the ability to view chat-room stats. E.g. how many new visitors we there last day (week, month etc). What is the current list of all chat-room users. Who was the most active user of room. This is mostly service layer.

Chat messages management. There should be an ability to store chat-room messages (e.g. conference log). Administrator can enable logging and disable whenever he or she wants. It is a top priority to allow sophisticated methods of filtering messages before they are saved into database.

For example administrators must have an ability to specify users, whose messages should or shouldn’t be logged. Those filters are the subject of further discussion.

Storing logs is only a part of logging functionality. There should be an ability to retrieve logs back. Not everyone can view chat-room logs, but only a user(s) with enough rights and permissions. There should be also a set of filtering abilities.

For example administrator might want to see all logs for past hour or what was written by specified user(s). This is also the subject of further discussions.

One Response to “Jxmpp-bot: User management”

  1. Repository pattern « Tillias's Blog Says:

    […] Here you can read more about database schema which we will use in this post. Finally take a look at layered architecture concept of our app. […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: