Ideas for web applications with external input and real-time notification

I am creating a web application that will receive various events from external sources and quickly provide the user with the opportunity for further actions. I want to use Ruby on Rails for a web application. This project is an internal development project. I would prefer simple and easy-to-use solutions for rapid development over highly reliable and complex systems.

What should he do

The user has a web application open in his browser. Now the phone is ringing. The phone call is registered with the PBX monitoring daemon. In this case, through the Asterisk manager interface. The daemon sends the available information (remote extension, local extension, call direction, channel status, start time, end time) in some way to the web application. The user then receives a notification of the phone call event. Now the user can work with it. For example, by entering a summary or by mapping a call to a customer profile.

The duration from the first event on the PBX (for example, creating a new channel) to the pop-up notification in the browser should be short. Given the fast network, I would like to be within two seconds. Individual pieces of event information are created asynchronously. A local extension can be supplied separately from a remote extension. The user can enter a summary before the call ends. End time, new status, etc. Will be displayed on the interface as soon as one side hung up.

The PBX monitor is just one data source. There will be more monitors, such as email or a request through a web form. Monitoring daemons will not necessarily run on the same host as the database or web server. I do not see that the application will serve thousands of registered users or simultaneous requests in the near future. But out of a project, 200 users, perhaps roughly the same number of events per minute, should not be a scalability issue.

How do i do

, . ? ? , ? ? ? JS ?

: , , , HTTP Push, XMPP .. , : ActiveMQ, Starling Workling, Juggernaut Bosh.

, ? , , XML JSON Rails, .

, :)

.

+3
3

Java Flash, , Comet ?

http://en.wikipedia.org/wiki/Comet_%28programming%29

, -, Rails , RESTful- Rails- . - , curl libcurl . Rails JavaScript Comet - , Flash Java.

+1

, : Push, . , n * , db/queue. ActiveMQ , , , , .

Flash (Juggernaut , ) Java. ( Flash/Java), ; , .

+1

Perhaps http://goldfishserver.com might come in handy. It provides a simple API for pushing notifications to your web pages. In short, when your data is updated, send it (some payload data) to the Goldfish servers and your client browsers will be notified with the same data.

Disclaimer: I am a goldfish developer.

0
source

Source: https://habr.com/ru/post/1712726/


All Articles