Remote Task Notifier

Introduction

RTN is a web-based client-server application used to “remotely” notify users of  new tasks. The client sends an update request to the server to fetch available notifications. Once fetched, these notifications are queued locally at the client side in order for the client to execute them one after the other and mark them “read” at the server side. The server application serves as a web-service to merely be able to query a central notification store for new (i.e. unread) notifications for a particular user.

The client application is supposed to periodically query the server side to be able to fetch new notifications.

Requirements

  • Client Application
    • PHP (5.3+)
  • Server Application
    • PHP (5.3+)
    • Apache Webserver 2+
    • MySQL (5+)
    • SMSTools (3.3+)

Usage

The client application is started from the command line either manually or periodically using a daemon (or service) using the following command:

path/to/rtn/root/php/php -f ../client/index.php

The server application can be reached by using the following URI:

http://yourserver/rtn/server?user=xyz&hash=xyz

It will return a JSON response using the following syntax:

{notifications : []}

The Client Application

The client application is a PHP script which can be easily executed from the command line a daemon or a special service. Once started, it checks its queue for existing notifications that have yet to be delivered to the user. Note that notifications are only removed from the queue if they are successfully delivered to the user, otherwise they remain in the queue and will be processed every time the queue is started again.

If no elements are in the queue the client application will automatically query the server application for unread notifications it can fetch to be delivered to the user. Every notifications fetched from the server application is put into the queue for later processing. Once all new notifications have been fetched the queue is run and the notifications are delivered to the user.

The Server Application

The server application serves as a web-service that can be queried for new notifications for a particular user. Once successfully fetched by the client application available notifications will be marked as “fetched” – thus making them unavailable for subsequent client-application fetch requests. Note that is it hereby the responsibility of the client application to return a response to the server application of the status of the transmission.

» Responsibility: entire design and implementation
» Programming languages: PHP, SQL, HTML, Batchscript
» License: commercial

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.