SA-MP Forums

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

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

Quote:
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: https://www.digitalocean.com/communi...n-ubuntu-16-04
__________________

Do not contact me for private help, please stop wasting your time trying to offer me a job
(Especially if you cannot pay the market rate for a developer)
If you are looking for scripters/mappers/staff/whatever look here
The only help I offer is my occasional reaction on the public forums
Gamer_Z is offline   Reply With Quote
Old 04/07/2017, 11:06 PM   #32
[HLF]Southclaw
High-roller
 
[HLF]Southclaw's Avatar
 
Join Date: Apr 2009
Location: England
Posts: 4,645
Reputation: 1231
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.
__________________
PSA: I changed my username everywhere to "Southclaws" (including GitHub!)

Contact me:
My discord: dc.southcla.ws

Scavenge and Survive 2017 is coming soonish...
[HLF]Southclaw is offline   Reply With Quote
Reply

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 10:59 PM.


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