[MMO] Centrifugo

[MMO] Centrifugo 2.3.1

No permission to download

kick

Well-known member
kick submitted a new resource:

[MMO] Centrifugo - Integration with scalable real-time messaging server.

Adds integration with Centrifuge.
Centrifugo is a self-hosted service which can handle connections over a variety of real-time transports and provides a simple publish API. Centrifugo integrates well with any application – no need to change an existing application architecture to introduce real-time features. Just let Centrifugo deal with persistent connections.
Great performance
Centrifugo is built in Go language with some smart optimizations inside. It has good performance – test...

Read more about this resource...
 
You can immediately use the ready-made package for centos there already in rpm format. The centrifuge itself is one file that is enough to run. Does not require the installation of the go language and not only.
Once you have placed on the server, you can create an individual user or whatever you like.
Now you need to move the Centrifugo binary to the /usr/bin directory:
mv centrifugo /usr/bin
Then run config generation
./centrifugo genconfig
After that, correct the configuration and add the following lines:
JSON:
"anonymous": true,
"client_anonymous": true
Next, create a daemon
Code:
cat >/lib/systemd/system/centrifugo.service <<'EOL'
[Unit]
 Description=Centrifugo Websocket Server
 After=network.target syslog.target
 [Service]
 LimitNOFILE=30000
 ExecStartPre=/usr/bin/centrifugo checkconfig --config /etc/centrifugo/config.json
 ExecStart=/usr/bin/centrifugo --config /etc/centrifugo/config.json --admin
 ExecReload=/bin/kill -HUP $MAINPID
 ExecStop=/bin/kill -SIGTERM $MAINPID
 TimeoutStopSec=5
 KillMode=control-group
 RestartSec=2
 Restart=always
 SyslogIdentifier=centrifugo
 [Install]
 WantedBy=multi-user.target
 Alias=centrifugo.service
EOL
Run the following commands:
systemctl daemon-reload
systemctl start centrifugo && systemctl enable centrifugo
You can check by simply using the following command:
systemctl status centrifugo
Most importantly, do not forget to specify your domain in the centrifuge configuration of the allowed_origins section.
 
Last edited:
Does this support gRPC or only HTTP?
Centrifuge itself supports it, but the add-on only works with HTTP only. This was done in order not to install additional extensions and even allow it to be used on shared hosting, just by installing the centrifuge as a node on the server.
In general, gRPC and protobuf in PHP, it seems to me, wrote some kind of penal battalion, i.e. employees who were actually punished for something, so there is an appropriate level of quality:
For example, the support for proto2 was simply commented out there if (proto == "proto2"). Or https://github.com/protocolbuffers/protobuf/pull/8130 ticket - broke uint32 on x84-64. Or https://github.com/grpc/grpc/issues/23833 - deadlock inside gRPC because no one checks the results of functions. But my favorite case is this - I had to specially add (rather crutch) support for fork () to the gRPC module. The authors said they didn't expect this code to be used in languages that have fork(). The code is written in C 🤦‍♂️.
 
kick updated [MMO] Centrifugo with a new update entry:

2.2.2

Add cli command: mcgo-centrifugo:info
Generate jwt token for subcription

We pass the token that we generated. Also, if an empty string is passed and you do not need to generate tokens every time for guests, specify in the setting
JSON:
"anonymous": true
"client_anonymous": true
If you are using our add-ons, then you must remove these options from the configuration. Because they are no longer relevant.
If you are using the live threads add-on...

Read the rest of this update entry...
 
Any successful installation?
I installed successfully on XF 2.2.9, but add-on 2.2.1. Don't have time for updating to 2.2.2.
My users partially dissatisfied: add-on scrolls forcibly to the last message right while reading the thread/conversation always
 
What's the tested amount of concurrent users on this? Is this the most Scalable live content addon on xenforo? Most of the other ones seem to be for medium sites only.
 
Back
Top Bottom