Push Messaging

1
In the development of an application for academic purposes we want to use push messaging to notify users when a new request comes in. This particularly in the mobile version of the application. In Mendix we could not found any way to support this functionality. In the app store there is also no clear application which supports this function. Can anyone help me how to implement this functionality?
asked
3 answers
1

Hi Sander,

We've implemented 'push' in a chat widget.

What you have to do:

  • Write a simple custom client widget that executes a request to a microflow.
  • In that microflow you create an infinite loop with a wait of e.g. 100MS per iteration.
  • In each iteration you check a table (better is a Java HashMap for in memory checks) for new messages.
  • If you, quitte the loop and return return the messages. The client widget has to process the feedback given from the server and has to start a new request.

The principle used here is the so called long-polling request. For our chat implementation it works great.

Furthermore you have to consider the following: timeout in the microflow loop. That will prevent threads from running forever and also will prevent that the connection will be dropped. A best practice value for this is about 2-3 minutes.

It's a pretty technical job, you have to implement a Mendix widget. I hope this helps and so: goodluck!

answered
0

In our application the main screen shows all the notification to the user. This is just a normal grid where all the messages are stored and some big numbers on top about the number of open messages and a tab with all the old messages. As soon as the users opens the message we mark the message as read and update the unread numbers. And since this is the standard form when a user logs in this will always be seen first by the user. You can even use this to also send mail messages to the user notifiying the user that there are new messages for the user.

Regards,

Ronald

answered
0

Sander, I'm not sure reverse ajax (or some implementation of it) is possible in Mendix. Most solutions will use some polling technique (loop) that checks for messages.

I developed an app with a module and widget for some of my apps. You can take a look and see if it looks like what you need.

http://picpaste.com/pics/NotificationsWidget-MPoFpm0c.1386687160.png

answered