Raised This Month: $ Target: $400
 0% 

Admin Call Plugin via php


Post New Thread Reply   
 
Thread Tools Display Modes
ajr1234
Senior Member
Join Date: Mar 2011
Location: Chicago, IL, U.S.A.
Old 03-04-2013 , 23:34   Re: Admin Call Plugin via php
Reply With Quote #21

For some reason I'm really enjoying this conversation lol.

A variety of applications use custom ports. Skype uses 443/80 (HTTP yes) as well as other custom ones, depending on the settings. AIM uses 5190. VMWare uses 902. WoW uses 3724. RTSP video 554. Steam switches off between 3478, 4380, 4379, 4380, 27000-27050. Email clients use numerous different ones. There's no reason pawn scripts shouldn't reserve a port for themselves as well. While you can easily stuff everything through the HTTP port and sort out the request, I prefer to use the SM socket extension along with a custom listen port on the server, but that's just me. If I ever wanted to expand on that simple !call script by, say, implementing more commands, a two-way chat system, single command responses, etc., my script base would be more easily expandable/scalable. I'm only thinking ahead-- it doesn't mean that I will ever end up adding those features. There have been numerous instances where I used sockets only to find out that I never needed them. Yet, there have been instances where I was glad to have used them. So yes, sockets may end up being "pointless and redundant," but may end up being beneficial as well. Anyhow, let's just move on. Who cares. I have a pharmacology and pathology exam this week and next week, respectively. Got to study.

Thanks for the debate. I enjoyed it! The end result... well, you guys certainly have a point. For this application, just using a HTTP request is indeed way simpler. If this application tends to grow... Then my idea may be better. Still, the part where I suggested that a single DB should be stored on the web server to avoid the need to set up replication doesn't change :p

Off topic, but Dr. McKay, are you a physician in real life? I'm in medical school currently, and I have a question I'd really appreciate help with if you have time later ^^
ajr1234 is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 03-04-2013 , 23:52   Re: Admin Call Plugin via php
Reply With Quote #22

Quote:
Originally Posted by ajr1234 View Post
Off topic, but Dr. McKay, are you a physician in real life? I'm in medical school currently, and I have a question I'd really appreciate help with if you have time later ^^
Nope. This is where the name comes from.
__________________
Dr. McKay is offline
Impact123
Veteran Member
Join Date: Oct 2011
Location: Germany
Old 03-05-2013 , 00:43   Re: Admin Call Plugin via php
Reply With Quote #23

I really don't understand why you point in the direction of sockets.
SourceMod provides an api for dbi, why wouldn'nt you consider to use this?.

Yours sincerely
Impact
__________________

Last edited by Impact123; 03-05-2013 at 00:45.
Impact123 is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 03-05-2013 , 02:01   Re: Admin Call Plugin via php
Reply With Quote #24

Quote:
Originally Posted by Dr. McKay View Post
only the most bad ass stargate series there was... pissed the movie never came out though....
Doc-Holiday is offline
ajr1234
Senior Member
Join Date: Mar 2011
Location: Chicago, IL, U.S.A.
Old 03-05-2013 , 02:19   Re: Admin Call Plugin via php
Reply With Quote #25

Quote:
Originally Posted by Dr. McKay View Post
Oh, I see. Haven't seen the series, but tempted to now.

Quote:
Originally Posted by Impact123 View Post
I really don't understand why you point in the direction of sockets.
SourceMod provides an api for dbi, why wouldn'nt you consider to use this?.

Yours sincerely
Impact
To avoid replication issues with multiple physical servers. The debate was about whether to use a custom port and listener or to just use a simple http request with sockets.
ajr1234 is offline
Doodil
Senior Member
Join Date: Mar 2012
Old 03-05-2013 , 03:50   Re: Admin Call Plugin via php
Reply With Quote #26

Quote:
Originally Posted by ajr1234 View Post
To avoid replication issues with multiple physical servers. The debate was about whether to use a custom port and listener or to just use a simple http request with sockets.
Thing is, if you use the database-interface of SourcePawn to directly connect the plugin on all of your gameservers to a single database, you won't have replication issues and you don't need sockets/http requests. There is no need to first call the webserver, which then calls the database and stores the information, when you can store the information directly from within the plugin.

For some reason it seems to me that you believe that every instance of a plugin can only store data in it's own database... which is not the case.
Doodil is offline
ajr1234
Senior Member
Join Date: Mar 2011
Location: Chicago, IL, U.S.A.
Old 03-05-2013 , 10:06   Re: Admin Call Plugin via php
Reply With Quote #27

No lol, that is not what I said. I am well aware that Pawn plugins can access other databases. I've made more than a dozen private plugins for money, so I believe I have a firm grasp on how the system works.

Summary:

Quote:
Pawn plugins (multiple game servers) -> Send data to web server -> web server stores it in central database -> Database accessible on website
The reason I suggest sockets is to avoid the need to set up remote querying on the SQL database (if the gameservers are on a different machine than the web server) and to keep DB management centralized (i.e. avoid managing the database on both Pawn and the website).
ajr1234 is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 03-05-2013 , 11:11   Re: Re: Admin Call Plugin via php
Reply With Quote #28

Quote:
Originally Posted by ajr1234 View Post
No lol, that is not what I said. I am well aware that Pawn plugins can access other databases. I've made more than a dozen private plugins for money, so I believe I have a firm grasp on how the system works.

Summary:



The reason I suggest sockets is to avoid the need to set up remote querying on the SQL database (if the gameservers are on a different machine than the web server) and to keep DB management centralized (i.e. avoid managing the database on both Pawn and the website).
I had something similar to this where s player could apply to the community and register a forum account from the game by typing a command with parameters.

I just queried the sql db from sm and updated the tables.

Then PHP to simply grab the info and sorry it via time stamp in an html table (custom vbulletin page)

Last edited by Doc-Holiday; 03-05-2013 at 11:12.
Doc-Holiday 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 22:40.


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