SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 15/02/2017, 08:13 PM   #21
[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)

Quote:
Originally Posted by Hiddos View Post
I'd love to read up more on this or even see a proof of concept, any tips?
I'll get my article finished soon and post it here (and on the discord channel too probably) which will talk about all the tech behind the idea and how to implement it.
__________________
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
Old 23/05/2017, 09:16 AM   #22
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 [HLF]Southclaw View Post
The article I'm writing is actually using Kubernetes for this task (similar to League of Legends and their Admiral orchestration backend) where a front facing load-balancer acts as the proxy and each server node lives inside a container inside the cluster. When you want to direct a player to a new world you simply tell the load-balancer to switch their connection to a new node.
Don't even need very fancy load balancer, simple linux and iptables tricks will be enough as a "load balancer"

http://forum.sa-mp.com/showthread.php?t=547052

Except what I experienced more often than not: "you are banned from this server".

Also have you looked at cpp_redis? could solve your cross-platform issue https://github.com/Cylix/cpp_redis .
__________________

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 23/05/2017, 09:53 AM   #23
[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)

I tried that originally but couldn't get it to compile (not a C++ dev) so I stuck with the simple header-only hiredis (lack of Windows support isn't really a problem for me, I just needed a redis connector asap). But I'm open to pull-requests! I was thinking of writing a separate windows version with the same Pawn API since a lot of people have asked me but I don't really have the time currently.

Regarding Kubernetes - yes it could be done with iptables but the "fancy" LB of Kubernetes abstracts away the complications (cluster networking is a nightmare!) it's overkill for SA:MP but it's just a fun little experiment!
__________________
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
Old 23/05/2017, 11:25 AM   #24
DRIFT_HUNTER
High-roller
 
Join Date: Oct 2009
Posts: 2,106
Reputation: 128
Default Re: Redis (cache, database and message queue)

Quote:
Originally Posted by [HLF]Southclaw View Post
I tried that originally but couldn't get it to compile (not a C++ dev) so I stuck with the simple header-only hiredis (lack of Windows support isn't really a problem for me, I just needed a redis connector asap). But I'm open to pull-requests! I was thinking of writing a separate windows version with the same Pawn API since a lot of people have asked me but I don't really have the time currently.

Regarding Kubernetes - yes it could be done with iptables but the "fancy" LB of Kubernetes abstracts away the complications (cluster networking is a nightmare!) it's overkill for SA:MP but it's just a fun little experiment!
Just wanted to check cpp_redis, and in releases changelog i found these:
Code:
Fix compilations on windows
That was 23 days ago (so ~1 May 2017)
__________________
Путин here,
Путин there,
Путин просто everywhere.


Any PM's that include question about any kind of help will be ignored.
Use appropriate boards for that
DRIFT_HUNTER is offline   Reply With Quote
Old 23/05/2017, 01:38 PM   #25
nGen.SoNNy
Gangsta
 
nGen.SoNNy's Avatar
 
Join Date: Sep 2009
Location: Romania
Posts: 993
Reputation: 65
Default Re: Redis (cache, database and message queue)

5 starts, i'm using it.
__________________
If i've helped you, please click
nGen.SoNNy is offline   Reply With Quote
Old 02/07/2017, 03:43 AM   #26
Skillet`
Big Clucker
 
Skillet`'s Avatar
 
Join Date: Oct 2012
Posts: 171
Reputation: 114
Default Re: Redis (cache, database and message queue)

I wanted to know if you're going to keep developing this plugin ?
Skillet` is offline   Reply With Quote
Old 02/07/2017, 09:11 AM   #27
[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)

Quote:
Originally Posted by Skillet` View Post
I wanted to know if you're going to keep developing this plugin ?
Yes, at the moment it serves all my needs but if you have any suggestions or requirements let me know!
__________________
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
Old 03/07/2017, 09:49 AM   #28
Kaperstone
High-roller
 
Kaperstone's Avatar
 
Join Date: May 2011
Location: Home
Posts: 3,111
Reputation: 562
Default Re: Redis (cache, database and message queue)

Quote:
Originally Posted by [HLF]Southclaw View Post
Yes, at the moment it serves all my needs but if you have any suggestions or requirements let me know!
I had numerous questions regarding missing functionilities but as I see on the tests script, they do exist but just not listed above.

Code:
Redis_Exists(Redis:client, key[]);
Redis_Connect(host[], port, auth[]); // missing auth[]

But it do not have SSL connection capabilities as I see.

Are there going to be callbacks to catch errors and lost connection?
OnRedisConnectionLost()
OnRedisError()
Would be nice to catch them for error ouput and reconnect.
__________________
Kaperstone is offline   Reply With Quote
Old 03/07/2017, 05:51 PM   #29
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
But it do not have SSL connection capabilities as I see.
https://redis.io/topics/security

Quote:
Data encryption support

Redis does not support encryption. In order to implement setups where trusted parties can access a Redis instance over the internet or other untrusted networks, an additional layer of protection should be implemented, such as an SSL proxy. We recommend spiped.
Also, http://antirez.com/news/96

Quote:
The Redis security model is: “it’s totally insecure to let untrusted clients access the system, please protect it from the outside world yourself”. The reason is that, basically, 99.99% of the Redis use cases are inside a sandboxed environment. Security is complex. Adding security features adds complexity. Complexity for 0.01% of use cases is not great, but it is a matter of design philosophy, so you may disagree of course.
__________________

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, 05:37 AM   #30
Kaperstone
High-roller
 
Kaperstone's Avatar
 
Join Date: May 2011
Location: Home
Posts: 3,111
Reputation: 562
Default Re: Redis (cache, database and message queue)

Quote:
Originally Posted by Gamer_Z 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. (out of the machine)
Which in other words, it is an external code which runs and accepts requests.

How to make it functional, is a mystery to me.

And the other article you linked to is only half true in my opinion, I genuinely have a disbelief in the use case of SSL, as Redis features a pub/sub functionality which is widely used by many, yes maybe the storage itself is mostly used for local purposes, but the pub/sub is usually used to communicate over the internet with other registered machines.

Besides that, most of the scripters on samp won't use it because most of the time they can get around with normal arrays and Redis is just something unique and new that needs to be learnt first to understood the benefit of it.

SSL connection is available on other branches and so I thought maybe this plugin could provide one by itself.

I myself, want to expend my server from a single machine to multiple one to decrease the stress on one machine and maybe start to experiment with data flow over the network (What has been commented before on the thread)

The subject is interesting, but samp has a strange nature to attract people who try to tickle, play and sniff your data.
__________________
Kaperstone 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:43 PM.


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