Discussion:
[prosody-dev] Question about session storage
Joshua Riffle
2018-03-12 20:48:48 UTC
Permalink
I am considering Prosody for an XMPP project and need the ability to run
Prosody in parallel instances as a micro service that supports XMPP as a
service. I have done at least enough basic Google searching to tell
'horizontal scaling' is not really supported but it has possibly been on
the roadmap for several years.

I am attempting to avoid modifying core parts of Prosody or at least
perform a very light touch on it to support this parallel setup. With my
superficial understanding of Prosody I think I may be able to do the
following (per 0.10.0):

Modify lines 222-224 of prosody:

function init_global_state()
prosody.bare_sessions = {};
prosody.full_sessions = {};
prosody.hosts = {};

To implement some kind of metatable session handler that overloads 'index'
and 'newindex' per http://www.lua.org/manual/5.2/manual.html#2.4

and uses an interchangeable implementation that connects to memcached or a
database that is centralized to hold serialized sessions.


1. If I do try to decentralize the values in these Lua tables does it stand
a chance of being enough shared information for my Prosody instances to
handle user sessions?

2. Is this kind of change in-line with Prosody's road map and architecture
or is there something else going in the 'horizontal scaling' department on
that don't know about?
--
You received this message because you are subscribed to the Google Groups "prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prosody-dev+***@googlegroups.com.
To post to this group, send email to prosody-***@googlegroups.com.
Visit this group at https://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.
Loading...