A key component to agile delivery is feedback in the form of realistic product metrics. If there is any empirical approach to the project then the project should have started with some pre-defined metrics in mind. Deploying a product without thinking through the metrics used to improve the product is kind of like running a race without timing yourself. You will never know if you succeed or not.
Mendix is great at providing a platform with the capabilities of getting your product to the market faster than traditional means of software delivery. Mendix as a platform is capable to delivering these types of metrics – it’s up the the Business Engineer to make sure they include the logic when developing the system.
One such metric that yields an idea of the success of the system is the number of users active on the system over a period of time.
A simple Microflow, shown below, runs a scheduled event that will save that information for you. Reflection of the saved information through a report will show the product owner of the system
how many users are using the system and when.
Finding out how many users are on the system at a given time can be determined through the following steps:
Step 1 – Determine the Session Timeout Setting
Establish what the time is on your “session expire setting”. You can determine that through the configuration settings on your project within your modeller (Project Settings > Configuration > Custom Tab). If no ‘SessionTimeout’ name has been set then the default will be 600000 milliseconds.
Step 2 – A Microflow to Retrieve the Active Users
Create a microflow to retrieve the number of logged in users at the same time. That can be done by retrieving the System.Session entities where the LastActive attribute is newer than the current time minus the SessionTimes variable. The results are saved within a ‘UserMetrics’ entity for data crunching.
Step 3 – A Scheduler to Regularly Pull the Numbers
The frequency of the check is a requirement set out by how often the product owner / stakeholder would want to measure the user numbers. That frequency is set within a scheduler which calls the above Microflow accordingly.
Step 4 – A Business Friendly Display of those Numbers
The last step would be to display those numbers in a business friendly manner. While many enterprises could try to accomplish this through the use of their BI teams, those BI teams, however, could be constrained by the same frustrating bottlenecks so many IT departments face. The presentation of the data through the Mendix app itself might be the quickest resolution. We decided to use the built in reporting functionality to present a graphical view of the data:
Measuring the number of users through the system itself starts to give your product owner / stakeholder the power to understand how to adapt the system features to users needs. It gives them the empirical numbers to, from that point, make effective change on top of Mendix’s already rapid development platform.