SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Thread Tools Display Modes
Old 04/07/2017, 01:47 PM   #31
Gamer_Z's Avatar
Join Date: Jun 2009
Location: Eindhoven, NL
Posts: 3,607
Reputation: 1360
Default Re: Redis (cache, database and message queue)

Originally Posted by Kaperstone View Post
I did read the redis security article before posting,
I do have poor understanding of proxies, but as I understood it's a layer on the same machine, which redis fires requests to, the proxy then has a function to create an trusted SSL connection and send it over the internet.

How to make it functional, is a mystery to me.
You are correct in how it works, so basically you connect to a proxy on the samp server machine, which connects to the proxy deamon on the redis server machine, which in turn connects to your redis server. The connection between the proxy client and daemon is encrypted.

Maybe the following article can help you set it up:
Gamer_Z is online now   Reply With Quote
Old 04/07/2017, 11:06 PM   #32
[HLF]Southclaw's Avatar
Join Date: Apr 2009
Location: England
Posts: 4,690
Reputation: 1242
Default Re: Redis (cache, database and message queue)

What I'm doing is exposing my server data through an API rather than connecting things via Redis. Yes, it is used as a pub/sub but I really don't agree with Redis being used that way as it's extremely lacking proper message queue features and there are much better solutions out there. I think connecting two applications with ephemeral/trivial events on the same machine is fine (it's probably the fastest and simplest solution I could throw together in a night too tbh) but exposing a database outside the machine just introduces a whole other world of issues.

If you do want pub/sub, it might be worth using a more solid solution and just having a microservice sit between the broker and the game server which translates between Redis events and more resilient broker messages with SSL. I actually started writing a RabbitMQ plugin but my C++ is so rusty that I gave up and stuck with the simple Redis header-only include!

In terms of features: yes, I do actually need to implement some better connection handling code - right now, if the connection drops there's no way the AMX can know about it so I think an event is probably the best way to go. I was working on an automatic reconnection with exponential backoff but I think that would be best left up to the user.

If you do have any solid suggestions though, feel free to drop an issue on the repository and when I get some free time I'll do another feature update.
Masterlist Alternative - Add your server today!

Contact me:
My discord:

I have limited internet right now so expect periodic inactivity!
[HLF]Southclaw is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Redis cache and message queue plugin for SA:MP [HLF]Southclaw Discussion 2 06/02/2017 05:47 PM
Using Redis Misiur Discussion 3 11/08/2014 09:17 PM
Moderation Queue Syncro Screenshots and Videos 1 07/05/2014 11:57 AM
Queue iJumbo Discussion 13 06/08/2013 08:29 AM

All times are GMT. The time now is 11:50 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.