| 1 |
README.txt |
README.txt |
| 2 |
============ |
============ |
| 3 |
$Id: README.txt,v 1.1 2008/09/18 02:56:44 t0talmeltd0wn Exp $ |
$Id: README.txt,v 1.2 2008/09/25 06:45:41 t0talmeltd0wn Exp $ |
| 4 |
|
|
| 5 |
The XMPP Server module for Drupal provides a realtime server, written in |
The XMPP Server module for Drupal provides a realtime server, written in |
| 6 |
PHP, which communicates to clients over the XMPP protocol, using Drupal as a |
PHP, which communicates to clients over the XMPP protocol, using Drupal as a |
| 20 |
|
|
| 21 |
4) Run the file 'run.sh' to start the server. |
4) Run the file 'run.sh' to start the server. |
| 22 |
|
|
| 23 |
|
|
| 24 |
|
CONTRIBUTION NOTES |
| 25 |
|
==================== |
| 26 |
|
|
| 27 |
|
The XMPP Server module was built using Drupal's hooks/callbacks system, which |
| 28 |
|
makes it easy to extend the protocol that it supports with contrib modules. |
| 29 |
|
However, there are certain things that developers must be aware of when |
| 30 |
|
developing modules to add functionality to XMPP. Reading this section can save |
| 31 |
|
lots of headaches. |
| 32 |
|
|
| 33 |
|
First of all, the XMPP Server is a realtime service. Optimally it will never |
| 34 |
|
be restarted. Though it is possible, Drupal was not designed to operate in |
| 35 |
|
this manner. Take a look at the function user_access(). A feature of this |
| 36 |
|
function is to cache permissions that have already been retrieved in a static |
| 37 |
|
variable. This is a performance benefit in a page load on a website, and a bug |
| 38 |
|
in a realtime service. When developing contrib modules, know what code is |
| 39 |
|
being executed in the realtime service, and make sure that any data that is |
| 40 |
|
cached in this manner is reset every time you make a call. |
| 41 |
|
|
| 42 |
|
Secondly, avoid reusing code between the website and the XMPP server. This is |
| 43 |
|
not a hard-and-fast rule, but it will help save confusion. Some things simply |
| 44 |
|
aren't functional in the context of the server vs. the website. |
| 45 |
|
drupal_set_message(), for example, will do nothing in the server context. |
| 46 |
|
Likewise, attempting to retrieve a client from the website will fail because |
| 47 |
|
the clients do not exist in the context of a page load. Know the API, and know |
| 48 |
|
the proper way of sending data back and forth between the website and the |
| 49 |
|
server. |
| 50 |
|
|
| 51 |
|
|
| 52 |
AUTHOR/MAINTAINER |
AUTHOR/MAINTAINER |
| 53 |
=================== |
=================== |
| 54 |
~Sean Edwards <edwards AT notsorandom DOT com> |
~Sean Edwards <edwards AT notsorandom DOT com> |