Ulysses

General => Off-Topic => Topic started by: Bite That Apple on August 18, 2013, 05:13:29 AM

Title: MySQL Multiserver Chat Idea
Post by: Bite That Apple on August 18, 2013, 05:13:29 AM
Hey, what's up ULX members, so do I have a question for you guys. Please give feedback on the idea:

So, without further ado, time to interest people who have multiple servers. My friend and I have created a MySQL chat system.
It's original purpose was to log chat for a web based thing (long story short: "That will be kept as secret as possible"), anyways it got more complex.

Now, this is my thing about this situation: I want to know if it will be any use the community, because it does has one bug in it, and I wasn't planning to fix it, though if the community finds it useful then I may give in and fix it to give to the entire ulx community.

Not only that, but I was going to keep this thing secret and have it as one of the tens to hundreds (being serious. I have a lot of free time, so these things happen a lot) of archived files of discontinued projects. Though, before I was going to move it there, I realized that I'm not going to make a garry's mod server ever again, and why leave this to sit in a sector in my hard drive forever, when maybe I might be willing to give it to the ulx community.

.. maybe one day when I have more time and care, I'll release more secret archived files..


So my last statement is:
If you think this might be a good idea and you would want it, then vote yes and leave a reply about it. If you have any questions about it, feel free to ask me.
Title: Re: MySQL Multiserver Chat Idea
Post by: Megiddo on August 18, 2013, 04:10:04 PM
Real-time multiserver chat using MySQL is not really a very good idea, but if it's something you think you can fix up in a few hours time, I know it has been requested on the forums before.
Title: Re: MySQL Multiserver Chat Idea
Post by: Bite That Apple on August 18, 2013, 04:42:27 PM
Real-time multiserver chat using MySQL is not really a very good idea, but if it's something you think you can fix up in a few hours time, I know it has been requested on the forums before.

Yes indeed it has been requested before.
http://forums.ulyssesmod.net/index.php/topic,5516.msg25146.html#msg25146

Yeah, I've been told this before to not use MySQL, instead use sockets or something like that, but there is a reason for what I wanted this to be MySQL

Also, it's not realtime. There's a three second pause, because it can't connect fast enough for real time.
Title: Re: MySQL Multiserver Chat Idea
Post by: Bite That Apple on August 19, 2013, 03:34:41 AM
I'm going to give this till next Monday. If not enough response happen for this to happen, then I'll close the thread and place the file in the archive.

End of Trail:
8/26/13
Title: Re: MySQL Multiserver Chat Idea
Post by: Organik on August 21, 2013, 06:13:36 AM
I suppose I'd be interested in this. Although I agree with Megiddo about MySQL being a bad solution to multi-server chat. I've been doing my best to avoid it and find something like sockets instead for this purpose. But for the ease of use.. I may give it a shot. And for my purpose.. I'd be using it for a server chat box on my community website. So maybe it won't be that bad.
Title: Re: MySQL Multiserver Chat Idea
Post by: Bite That Apple on August 21, 2013, 06:17:32 AM
I suppose I'd be interested in this. Although I agree with Megiddo about MySQL being a bad solution to multi-server chat. I've been doing my best to avoid it and find something like sockets instead for this purpose. But for the ease of use.. I may give it a shot. And for my purpose.. I'd be using it for a server chat box on my community website. So maybe it won't be that bad.

I don't like sockets. I haven't had much success with them. What ends up happening is that because it's realtime, it lags it or it expects the next message to fast.
Title: Re: MySQL Multiserver Chat Idea
Post by: Organik on August 21, 2013, 06:26:04 AM
This addon works great: http://facepunch.com/showthread.php?t=1256119

However, it doesn't work for my intended purpose yet. He included a basic PHP class with the addon, but it's limited to just sending messages to the server right now, and I don't have the technical know how on sockets to be able to write a receive PHP function.

But.. does this mean you'll release yours?  :D
Title: Re: MySQL Multiserver Chat Idea
Post by: Bite That Apple on August 21, 2013, 06:28:27 AM
This addon works great: http://facepunch.com/showthread.php?t=1256119

However, it doesn't work for my intended purpose yet. He included a basic PHP class with the addon, but it's limited to just sending messages to the server right now, and I don't have the technical know how on sockets to be able to write a receive PHP function.

But.. does this mean you'll release yours?  :D


I don't know yet. I've been going over the thing again, and it appears that there's a lot wrong with the chat. I'll have to check something again, I just need to fix the last received ID, then it will be working
Title: Re: MySQL Multiserver Chat Idea
Post by: Organik on August 21, 2013, 01:00:26 PM
Well, take your time. Since you say you have a lot of it anyways. :D

I don't need it anytime soon anyways.
Title: Re: MySQL Multiserver Chat Idea
Post by: Megiddo on August 21, 2013, 07:35:30 PM
What ends up happening is that because it's realtime, it lags it or it expects the next message to fast.

That's not how sockets work. If programmed properly, it should be waiting on system interrupts for data, which would cause zero lag.
Title: Re: MySQL Multiserver Chat Idea
Post by: rainbow Dash on August 23, 2013, 10:08:58 PM
if it uses MySQL, it would start filling up a database fast full of text. So how does it handle that?

And how does it handle special characters?
Title: Re: MySQL Multiserver Chat Idea
Post by: Bite That Apple on August 24, 2013, 06:05:35 AM
if it uses MySQL, it would start filling up a database fast full of text. So how does it handle that?

And how does it handle special characters?

It was made to delete any message ID that is past 50, and only stores the last 50 messages. Special characters just don't get inserted.

I'll give an example on how it done, off the top of my head. So most likely did it wrong.
Code: [Select]
local tb = {a,A,b,B,c,C,1,2,3}
local checker = string.explode(tb,",")
local abc = string.find(text, checker)
if abc == true then return end
Title: Re: MySQL Multiserver Chat Idea
Post by: rainbow Dash on August 25, 2013, 01:40:51 AM
I see. What sort of transfers are we talking about aswell? Can it like do one way connections, or elaborate setups where certain servers can hear others and some cannot, or is it just "Everyone can hear everyone"? or can that be configured?
Title: Re: MySQL Multiserver Chat Idea
Post by: Bite That Apple on August 25, 2013, 11:44:07 AM
I see. What sort of transfers are we talking about aswell? Can it like do one way connections, or elaborate setups where certain servers can hear others and some cannot, or is it just "Everyone can hear everyone"? or can that be configured?

Everyone can hear everyone. There is a little identify variable though when each server talks.
I.E. If Server {A} talks, then when Server {B} is listening to it, it will display "{A} Player Name: text"
Title: Re: MySQL Multiserver Chat Idea
Post by: rainbow Dash on August 28, 2013, 03:13:33 AM
Ahh... I see.

Well, I think this is a really good mod for those with large communities (or those who wish to monitor stuff from a test server huehue)



*edit: Please refrain from using swear words.*
Title: Re: MySQL Multiserver Chat Idea
Post by: rainbow Dash on October 20, 2013, 11:14:07 PM
So uh, any chance this has been finished?
Title: Re: MySQL Multiserver Chat Idea
Post by: Bite That Apple on November 08, 2013, 10:56:53 PM
So uh, any chance this has been finished?


Finished... oh god no...
Though, I've sent almost three years on this idea, and I started making it a year ago, with the help of some people who understand MySQL better than I do.  I've made some amount of progress on this, and I'll be linking a video shortly. It still has some issues, in all because it's mysql and not sockets... because sockets suck :p

This is from the Datatable. So you can get an idea of how it works.
(http://i.imgur.com/VH1efIz.png)
(http://i.imgur.com/dmRucla.png)

These are some links here, you can watch me test around the thing. If you can, somehow try to watch the videos at the same time, though mute Server #1 because it has me talking and stuff. Also has a song that shouldn't be placed on this forum, so sorry :(
SERVER #1 - http://youtu.be/h_JPoKR7mVM (http://youtu.be/h_JPoKR7mVM)
SERVER #2 - http://youtu.be/1PRsFrv7SnE (http://youtu.be/1PRsFrv7SnE)
Title: Re: MySQL Multiserver Chat Idea
Post by: sabo on November 09, 2013, 04:55:16 AM
Looks really interesting, good job so far!

Are you able to use commands over multiple servers? Because if one does !slay * in one server it would slay all in all other servers <.< which might not be such an good idea ;_;
Title: Re: MySQL Multiserver Chat Idea
Post by: Decicus on November 09, 2013, 05:01:15 AM
This looks quite interesting, nice work!

Are you able to use commands over multiple servers? Because if one does !slay * in one server it would slay all in all other servers <.< which might not be such an good idea ;_;
Seems like this is possible, and that may cause issues in the future.
Title: Re: MySQL Multiserver Chat Idea
Post by: Bite That Apple on November 09, 2013, 01:26:24 PM
Looks really interesting, good job so far!

Are you able to use commands over multiple servers? Because if one does !slay * in one server it would slay all in all other servers <.< which might not be such an good idea ;_;

Well no. If you were watching carefully, you would notice you type !gslap... and it's only the commands that are listed in here. Though this thing requires ULX anyways, so if you don't have ulx then it won't work.

I couldn't remember (if their is a way to do it anyways) the way to just use console commands, but I remembered ULX has that there, so I just used it.

(http://i.imgur.com/5tk42jA.png)
Title: Re: MySQL Multiserver Chat Idea
Post by: Decicus on November 09, 2013, 02:18:33 PM
Ah, fair enough. I didn't actually notice that. Thanks for verifying.
Title: Re: MySQL Multiserver Chat Idea
Post by: Megiddo on November 09, 2013, 02:33:12 PM
Nicely done!
Title: Re: MySQL Multiserver Chat Idea
Post by: Bite That Apple on November 09, 2013, 02:51:01 PM
Ah, fair enough. I didn't actually notice that. Thanks for verifying.

You are welcome. I also just remembered it was game.ConsoleCommand("\n"). So now I remember... anyways yeah.

Nicely done!

Thanks.


 I hope to be done by the end of the year. It still has some minor bugs, but I'm working them out. Anyone have any other suggestions to more commands I should add?
Title: Re: MySQL Multiserver Chat Idea
Post by: Bite That Apple on November 09, 2013, 07:39:21 PM
Anyone here REALLY good with any of the following:
Arithmetics
Mathematics
MySQL
???



I need some advice on something here for my addon.
Title: Re: MySQL Multiserver Chat Idea
Post by: Bite That Apple on November 30, 2013, 02:20:21 AM
So I'm almost done with it now, 99.8% glitch free now. The garry's mod addon part is finished, now I'm finishing the dumb steam open id part. Having a redirect issue now, as I don't really know how Open ID works or know too much php, it may take me a little longer than expected. You can see what public version of my Garry's Mod webchat part of the multiserver chat addon.

http://thetriworlds.com/dev/chat/ (http://thetriworlds.com/dev/chat/)
IF YOU DO DECIDE TO LOG IN, AFTER YOU CLICK THE LOGIN BUTTON ON THE STEAMCOMMUNITY.COM WEBSITE, YOU WILL NEED TO CLICK THIS LINK AGAIN AS IT DOES NOT REDIRCT YOU TO THE SAME PAGE FOR WHATEVER REASON.

So if your page looks like this after you successfully logged in, you did it correctly
(http://puu.sh/5xB7d/e9202d4336.jpg)
Title: Re: MySQL Multiserver Chat Idea
Post by: Megiddo on November 30, 2013, 07:43:33 AM
Very nice, Chaos!

Does the web chat auto-refresh?
Title: Re: MySQL Multiserver Chat Idea
Post by: Bite That Apple on November 30, 2013, 10:27:01 AM
Very nice, Chaos!

Does the web chat auto-refresh?

Yes, because mysql is better for websites, and much better for chat systems (if you're going to use them like that), then it will auto refresh every second. The garry's mod one does every 3 seconds or it would crash. One thing that does not auto refresh is if you were to change your name while the website chat has been loaded...

Just that darn redirect issue remains.