I don’t know what to say, for some reason now it works just fine… I’m starting to think the problem was somewhere on our server side, but of course the server guy says everything is just fine, but we all know that until I’ll show him hard evidence of something wrong he’ll go on saying it’s fine…
Aside from that point, I would still love to know how I can see the log messages generated by noobhub for future use
well, make sure that in file node.js verbose is set to true, and then rerun server
$ nodejs node.js
it will print debug output straight to stdout, there you will be able to spot if smth is wrong.
also, one of the developers had such case: he was using forever.js to run Noobhub. foreverjs was writing all output to text file logs, and verbose was set to true by default. his server ran out of space and Noobhub could not start (foreverjs actually, Noobhub doesnt rely on filesystem).
Well, seeing as of right now I’m only in the testing phase of the project, our server shouldn’t have a problem with the size of the log, we had log files generated by other projects that were 10 gigs in size. yes, it managed to kill our server in the end, but I don’t think we’re there yet.
Again, I’m must be missing something in the whole process, since in the node.js file, which I will call “the server” from now on so we’ll know what I’m talking about, I see no where a refrence to “stdout”… the only thing there is is this function that writes the log:
does that means the log would be written only while the console php file is run? or there is no connection to one another?
Since what I’m trying to debug is not the php client, but my corona client, where are the log lines for connections coming from corona are being saved?
I’m sorry I’m so hard headed about this issue, but I’ve never dealt with this type of service before I don’t know my left from right…
Hey there again overtorment, good news!! I was able to battle this out with the server guy, he was “kind” enough to give me permissions to view the server space where the script was run and then, finally, get access to the log file, I’m sorry this took so long, but that guy is impossible, can’t have him killed, yet… too much power in one persons hands, always a recipe for trouble.
Any way, since I wasn’t able to get direct access to the log file until now (he set up an auto system which took my modified node.js file from a specific folder and copy it to the right place, closed the old process, and started the new one, it’s a drag…), what I have done it a type of “internal/external” log, where if a specific user connects, lets call him “admin”, then any message or connection being passed to the hub makes the hub send the admin any information I may need, like who the message from, to, their socket status, if exist and so forth, which helped for solve the problem I had, which was a simple lowercase/uppercase problem, like most problems in life…
Thanks again for all the help and the great work you’ve done on this code.
No modification is needed for Noobhub at all. If you want to know how it works, read the server’s source code, Im proud I fitted it in ~50 lines. Also, google for Publish / Subscribe paradigm.
As always, I recommend following readings on multiplayer networking:
First of all, this is amazing and just what I was looking for, thanks for the hard work overtorment.
I was able to run node.js from terminal in OSX and communicate with the sample app running on the corona simulator, but when I try to test on an actual device and send data to the server running on my mac I get nothing. Also worth noting, I’m as green as they come when it comes to networking. Any idea what I could be doing wrong?
Is there a way to modify Noobhub myself so that UDP is also supported?
I am using it for a real-time multiplayer game, I have not tested with 3G or 4G LTE yet but feel that in some cases I will need it. This research paper mentions TCP is a lot slower for mobile networks if its not WiFi: http://www.hindawi.com/journals/ijcgt/2009/530367/. The research paper is from 2009, and I don’t know if the TCP used in testing had “no-delay”, or whether or not Node.js can tackle a lot of these speed issues and technology has improved since to make the difference between TCP and UDP somewhat closer.
I haven’t gotten around to testing the latencies for myself yet since I am in China at the moment and my server is in Seattle, so the results would not be desirable any way.
“Once somebody needs to find a gaming partner, he posts a message to the lobby channel, like, ‘who_wants_to_play’.
Every client on lobby who is up for a game, answers ‘i_wanna_play’.”
How if some clients get in to the lobby after the hosts sent ‘who_wants_to_play’? How can they join the host?
I would imagine that a list of games would be visible in the lobby channel that are available for joining, but that might require modification in Noobhub? Or maybe a timer.performWithDelay function that continually publishes “who_wants_to_play” in the channel until the game is officially closed from additional players joining?
I’d like to know the answer as well.
And overtorment, if you can advise on what sort of topics I can read up on to better understand how Noobhub works, that would be much appreciated
No modification is needed for Noobhub at all. If you want to know how it works, read the server’s source code, Im proud I fitted it in ~50 lines. Also, google for Publish / Subscribe paradigm.
As always, I recommend following readings on multiplayer networking: