Raised This Month: $12 Target: $400
 3% 

Gameserver Chat to Browser


Post New Thread Reply   
 
Thread Tools Display Modes
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 07-21-2016 , 05:08   Re: Gameserver Chat to Browser
Reply With Quote #31

Quote:
Originally Posted by Yeradon View Post
I like your discussion guys, but i guess you got way to much into detail.
I also like your participating in the discussion:

Quote:
Originally Posted by Yeradon View Post
But it's definitely not the best way to do it.
Claiming some things are not the best, are "bad practice", ... - but still, you don't explain exactly how you would do it, assuming that you should do it (even though you mention a few ways)...

Interesting.

Quote:
Originally Posted by Yeradon View Post
There two things left to say about the saigns website. First, you don't know how they are getting their logs into that database. Second, there is the problem with the private data. I know that America isn't really worrying about it, but saving the chat log and publishing it (without the usere's permission) is illegal here in Europe.
If you are posting your phone numbers, your name, your address in a Facebook group or page, which everyone can access, then it is your own problem.

Same goes with the game server's "chat", as that is public and everyone can read it in-game. Only kind of privacy setting you have there would be to switch team.

Neither Facebook groups/pages nor the game server chat's are "private messaging".

If you are posting your stuff at public places, and expect things to remain private - then something must be wrong with you.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
Yeradon
Junior Member
Join Date: Feb 2016
Old 07-21-2016 , 06:19   Re: Gameserver Chat to Browser
Reply With Quote #32

@Arkaar
If you want to use sockets, I recommend using an async runtime such as nodejs. If you want to use PHP there is a good documentation at php.net.

@arne
I told you why it is a bad practice and what would be good practice. What you want to use is up to you.

Also I am not intrested in a discussion about data privacy, because youre clearly not into that. But there is one hint: A game chat is definitly not a public chat. There was a intresting discussion about privacy at Glizer. Its a global ban system for Minecraft. I don`t want to explain the details, but google will help you with that.
Yeradon is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 07-21-2016 , 07:50   Re: Gameserver Chat to Browser
Reply With Quote #33

Quote:
Originally Posted by Yeradon View Post
@arne
I told you why it is a bad practice and what would be good practice. What you want to use is up to you.
Well, your text didn't clearly state which exact way you would be using.

Quote:
Originally Posted by Yeradon View Post
Also I am not intrested in a discussion about data privacy, because youre clearly not into that. But there is one hint: A game chat is definitly not a public chat. There was a intresting discussion about privacy at Glizer. Its a global ban system for Minecraft. I don`t want to explain the details, but google will help you with that.
I'm not interested in a such discussion either.

We all have opinions about different things, and you are more than welcome to have yours.

But honestly, if you are shouting at a place where there are several other people, even people you don't know and you're still expecting the things you shout out about to remain private, then something is definitely wrong with you.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
Deathknife
Senior Member
Join Date: Aug 2014
Old 07-21-2016 , 07:58   Re: Gameserver Chat to Browser
Reply With Quote #34

Quote:
Originally Posted by Yeradon View Post
Limiting a port to a certain ip isn't to hard. It also wont cost you a lot of ressources. Sending a database query for each chat entry will. If i would like to dos attack your server, i would just spam the chat (You have Anti-Spam for the chat).
Sending a database query for each chat entry won't cost you a lot of resources. I think sourcemod has about ~50queries/second limitation, which is more than enough. I'm pretty sure sourcemod has anti spam in chat built in, so that really isn't an issue.


Correct me if I'm wrong here, but with PHP, you can only create a socket and it only lasts when it's getting executed(before sending the content of the page), so that wouldn't really work for chat.
__________________
Deathknife is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 07-21-2016 , 08:35   Re: Gameserver Chat to Browser
Reply With Quote #35

Quote:
Originally Posted by Deathknife View Post
[...] Correct me if I'm wrong here, but with PHP, you can only create a socket and it only lasts when it's getting executed(before sending the content of the page), so that wouldn't really work for chat.
Incorrect. Socket work exactly the same way as in any language. It will wait for a data to be received. BUT in other languages (C# for exemple) you can do multi thread and keep listening for data in a specific thread, that's why it doesn't freeze your program. I don't think PHP handle mutlti threading. That's why it can't be done (smoothly) with PHP only. NodeJS is required and this bother me a lot.

EDIT : Just noticed pthreads
__________________
Want to check my plugins ?

Last edited by Arkarr; 07-21-2016 at 08:42.
Arkarr is offline
Yeradon
Junior Member
Join Date: Feb 2016
Old 07-21-2016 , 08:42   Re: Gameserver Chat to Browser
Reply With Quote #36

No I didn`t cause that wasn't my intention. I just wanted to point out why this might feel to be a 'bad practice' for arkarr. As I said the `best practice` way would be a centralized api the gameservers could query. This api could save the logs into a database and update the chat client. That has nothing to do with how I would do it.

Its not a point about if something is wrong with me or not. I would not declare a gameserver chat as save for privacy. It is simply the law which is restricting this. Thats why I said its illegal. Short example: You give your bank account details to a stranger. He publishes them. Another stranger takes your money. Now the first stranger can call you a retard for giving him this information. But still he was not allowed to publish them and will get sued for that. I hope you got my point now.

No it doesn't cost a lot of ressources in practice, but compared to a socket request it is more. Yes sourcemod got this limitations. I mentioned that because of arnes comment:
Quote:
Yes, and you will waste your game server's precious CPU and memory resources, on processing things that are technically irrelevant for the game server to process, meaning that there will be fewer resources available to provide quality servers to your gamers.
Yes you can listen to sockets using php. But since php isn't async you can not react to requests directly. Here is a quote from php.net:
Quote:
A maximum of backlog incoming connections will be queued for processing. If a connection request arrives with the queue full the client may receive an error with an indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, the request may be ignored so that retries may succeed.

Last edited by Yeradon; 07-21-2016 at 09:09.
Yeradon is offline
Yeradon
Junior Member
Join Date: Feb 2016
Old 07-21-2016 , 08:43   Re: Gameserver Chat to Browser
Reply With Quote #37

Arkarr what bothers you about nodejs?

Last edited by Yeradon; 07-21-2016 at 08:46.
Yeradon is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 07-21-2016 , 08:56   Re: Gameserver Chat to Browser
Reply With Quote #38

Quote:
Originally Posted by Yeradon View Post
Arkarr what bothers you about nodejs?
Not everybody is able to install NodeJS because they don't have a dedicated machine for them, but just gameserver.
__________________
Want to check my plugins ?
Arkarr is offline
Yeradon
Junior Member
Join Date: Feb 2016
Old 07-21-2016 , 09:05   Re: Gameserver Chat to Browser
Reply With Quote #39

Nor will everyone have a socket and thread able php installation (This features are deactivated by many webhosts). I as a private programmer wouldn't give a shit. Don't use php for smth it isn't made for. If people want to use certain features they will find a way. It really isn't to hard to setup a nodejs env and it can be done for free.

Last edited by Yeradon; 07-21-2016 at 09:19.
Yeradon is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 07-21-2016 , 09:13   Re: Gameserver Chat to Browser
Reply With Quote #40

Quote:
Originally Posted by Yeradon View Post
Nor will anyone have a socket and thread able php installation (This features are deactivated by many webhosts). I as a private programmer wouldn't give a shit. Don't use php for smth it isn't made for. If people want to use certain features they will find a way. It really isn't to hard to setup a nodejs env and it can be done for free.
Oh well... if you think so. I'll do it the NodeJS way then.
__________________
Want to check my plugins ?
Arkarr is offline
Reply



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

Forum Jump


All times are GMT -4. The time now is 15:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode