gCn - global CALCnet2

A forum where you can announce your awesome project(s).

Moderator: MaxCoderz Staff

User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

I think he meant that you would write your own serving software to run from your 'own' server. At least, thats what i would do.

You have any progress reports on this kerm?
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
KermMartian
Calc Wizard
Posts: 549
Joined: Tue 05 Jul, 2005 11:28 pm
Contact:

Post by KermMartian »

I do indeed. The host client and the server connection has been debugged, I've done some more research on the bit-level protocol for the CALCnet2 part of it. I might need to talk to a few link experts though...
Image Image Image
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

Kerm, a few questions...

I'm not in the mood to sign up for your forum, and it permits anonymous posting, so I'm asking them here.

Why do I see Java code and C++ code in your FTP (http://cemetech.net/gCn/) both implementing the host/client software? And what's all this talk about headers? Just open a connection to the server, and output the headers yourself if you can't get a library to do it for you :? Besides, I wouldn't use headers to send information if I were you. I'd just send my request to the PHP script with GET or POST, and return the answer by echo'ing it to the clients. That would be a crappy setup, but the best you can do with a server that's not your own I guess...

Now I think of it, PHP also has some functions to setup a TCP connection:
http://nl3.php.net/manual/en/ref.sockets.php

Still, I'd find some people with proper servers to host this for you, so you can just run some (C) crontab. C++ is good for the host/client, Java = evil...

And I stick to my statements that you're not going to pull this off on the calc level, and that this will be too slow for games :)
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
gangsta
Sir Posts-A-Lot
Posts: 171
Joined: Wed 12 Oct, 2005 10:46 pm

Post by gangsta »

i am on his forum...i can post them there 4 u...
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

Don't think that'll be neccessary. He'll swing by sooner or later, and I'd rather have the discussion here than on his sluggish forum.
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
User avatar
kv83
Maxcoderz Staff
Posts: 2735
Joined: Wed 15 Dec, 2004 7:26 pm
Location: The Hague, Netherlands
Contact:

Post by kv83 »

The only thing what ' could ' work is a online TBS game, where you move your units every day, and post your code to a PHP page. At the end of the day you'll get an update as code, which you can etner in your calc, what happened that day. But online with calcs? No-way
Image
CompWiz
Calc King
Posts: 1950
Joined: Thu 13 Oct, 2005 1:54 pm
Location: UB

Post by CompWiz »

Why couldn't it work real time? Even if there is a slight delay, it wouldn't make all that much difference for a lot of games. All this has to do is send the tiny calc output, and recieve the input. The things it is sending and recieving are so small that it should be able to work pretty quickly.
In Memory of the Maxcoderz Trophy Image
User avatar
KermMartian
Calc Wizard
Posts: 549
Joined: Tue 05 Jul, 2005 11:28 pm
Contact:

Post by KermMartian »

Timendus wrote:Kerm, a few questions...

I'm not in the mood to sign up for your forum, and it permits anonymous posting, so I'm asking them here.

Why do I see Java code and C++ code in your FTP (http://cemetech.net/gCn/) both implementing the host/client software? And what's all this talk about headers? Just open a connection to the server, and output the headers yourself if you can't get a library to do it for you :? Besides, I wouldn't use headers to send information if I were you. I'd just send my request to the PHP script with GET or POST, and return the answer by echo'ing it to the clients. That would be a crappy setup, but the best you can do with a server that's not your own I guess...

Now I think of it, PHP also has some functions to setup a TCP connection:
http://nl3.php.net/manual/en/ref.sockets.php

Still, I'd find some people with proper servers to host this for you, so you can just run some (C) crontab. C++ is good for the host/client, Java = evil...

And I stick to my statements that you're not going to pull this off on the calc level, and that this will be too slow for games :)
These are some very good points, but points I have addressed since I last posted here nonetheless. :)
1. gCn is the dev directory; gcn is the frontend dir
2. you see c++ because I decided to go ixnay on Java and try C++ instead for reasons such as using tilp. Java didn't seem like a good option in the long run
3. Sending stuff via headers IS how you post - the POST data is sent in the headers.
4. I'm doing a bit of rewriting of the backend; Kllrnohj and I chatted and decided to modify the underlying schema a bit. Now instead of doing all communications tasks, each current running host can ALSO act as a server; it's a bit more complex than that, but that's the basic idea.
Image Image Image
lloydkirk1989
Calc Wizard
Posts: 680
Joined: Wed 22 Dec, 2004 5:37 am
Location: West Palm Beach,FL
Contact:

Post by lloydkirk1989 »

Cool, so this going to be like X-box live for calcs.:lol: Not to offend kerm, but even if you could get this to work, which it won't, it would be very limited in what it could do. So I don't realy get the point, but if you're doing this for personal satisfaction or to get featured on engadget, no one is stopping you.
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

KermMartian wrote:These are some very good points, but points I have addressed since I last posted here nonetheless. :)
Don't worry, I (obviously) read your forum. Nothing escapes my attention ;)
1. gCn is the dev directory; gcn is the frontend dir
I know, I said "in your FTP". The dev nonsense is more interesting than the frontend, and besides http://www.cemetech.net/gcn / http://gcn.cemetech.net/ gives a 404.
2. you see c++ because I decided to go ixnay on Java and try C++ instead for reasons such as using tilp. Java didn't seem like a good option in the long run
Of course not. Java can't interface with the hardware, it requires your users to install the JVM, and it's awfully slow. A scriptkiddie could have told you that.
3. Sending stuff via headers IS how you post - the POST data is sent in the headers.
Ah, stupid me :) Still, there's nothing difficult about opening up a direct connection and manually sending out the headers.
4. I'm doing a bit of rewriting of the backend; Kllrnohj and I chatted and decided to modify the underlying schema a bit. Now instead of doing all communications tasks, each current running host can ALSO act as a server; it's a bit more complex than that, but that's the basic idea.
You'll still need a central server to host the directory of servers. You're not going to pull this off with PHP Kerm :) You'll need all the speed you can get to compensate for the propagation delays, and using VM's and scripting languages isn't helping in that sense. Besides, no offense, but your server is one of the slowest I've ever seen. It takes ages to load even the smallest files.

If your serious with this, my advice is to write a simple C program (less is more ;)) for the backend and give that to some people with high end servers/connections. Let the client (C++ is alright) attempt to connect to those servers in a preset order, that'll keep the network as centralized as possible. That's the easy part. Once you've got that up and running you have to interface between the C++ client and a calculator (you can forget about connecting more than one calc to a client) in such a way that it's actually useful. So you'll need to write a browser, an IM client, mods for every game you want to be able to play over the Internet...

All of that is doable, but it's a LOT of work, it's going to be SLOW, and hardly anyone is going to use it because it's freaking pointless when you're sitting behind a computer :)

Anyway, it's an ambitious project, and I'm curious to see how far you'll get with it.

Edit@CompWiz:
I was typing a very long reply about the structure of the Internet and all the neccessary steps to get something from your PC to mine, and then I accidentally pressed Ctrl+W instead of Ctrl+T. You'll have guessed that I use Firefox... :(

Anyway the gist of it is that the size of a packet doesn't matter...
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
User avatar
KermMartian
Calc Wizard
Posts: 549
Joined: Tue 05 Jul, 2005 11:28 pm
Contact:

Post by KermMartian »

Timendus wrote:
KermMartian wrote:
1. gCn is the dev directory; gcn is the frontend dir
I know, I said "in your FTP". The dev nonsense is more interesting than the frontend, and besides http://www.cemetech.net/gcn / http://gcn.cemetech.net/ gives a 404.
Thanks for the heads-up. :) Edit: I have no problems with it... :? Could it have something to do with non-logged-in users...?
Timendus wrote:
3. Sending stuff via headers IS how you post - the POST data is sent in the headers.
Ah, stupid me :) Still, there's nothing difficult about opening up a direct connection and manually sending out the headers.
That's what I thought, but elfprince and Kllrnohj seemed to be having trouble figuring out how...
Timendus wrote:
4. I'm doing a bit of rewriting of the backend; Kllrnohj and I chatted and decided to modify the underlying schema a bit. Now instead of doing all communications tasks, each current running host can ALSO act as a server; it's a bit more complex than that, but that's the basic idea.
You'll still need a central server to host the directory of servers. You're not going to pull this off with PHP Kerm :) You'll need all the speed you can get to compensate for the propagation delays, and using VM's and scripting languages isn't helping in that sense. Besides, no offense, but your server is one of the slowest I've ever seen. It takes ages to load even the smallest files.

If your serious with this, my advice is to write a simple C program (less is more ;)) for the backend and give that to some people with high end servers/connections. Let the client (C++ is alright) attempt to connect to those servers in a preset order, that'll keep the network as centralized as possible. That's the easy part. Once you've got that up and running you have to interface between the C++ client and a calculator (you can forget about connecting more than one calc to a client) in such a way that it's actually useful. So you'll need to write a browser, an IM client, mods for every game you want to be able to play over the Internet...

All of that is doable, but it's a LOT of work, it's going to be SLOW, and hardly anyone is going to use it because it's freaking pointless when you're sitting behind a computer :)
Well, the CALCnet2 part of it ( the Cn in gCn) is supposed to allow up to 253 calcs to connect together at once, but if not, it would still be cool. We shall see.
Image Image Image
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

KermMartian wrote:Edit: I have no problems with it... :? Could it have something to do with non-logged-in users...?
I guess so, it still 404s on me.
Well, the CALCnet2 part of it ( the Cn in gCn) is supposed to allow up to 253 calcs to connect together at once, but if not, it would still be cool. We shall see.
We shall see indeed (:mrgreen:) :P
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
User avatar
KermMartian
Calc Wizard
Posts: 549
Joined: Tue 05 Jul, 2005 11:28 pm
Contact:

Post by KermMartian »

Timendus wrote:
KermMartian wrote:Edit: I have no problems with it... :? Could it have something to do with non-logged-in users...?
I guess so, it still 404s on me.
Well, the CALCnet2 part of it ( the Cn in gCn) is supposed to allow up to 253 calcs to connect together at once, but if not, it would still be cool. We shall see.
We shall see indeed (:mrgreen:) :P
Well, Iunderstand your skepticism, and I'm getting a bit skeptical myself. The trick is probably gonna be the electronics of the network more than the software...
Image Image Image
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

Some hints :):
It is possible in theory, and with very simple hardware. And I think I posted my theory somewhere on this board. But nobody has been able to do it yet. Granted; not many people tried, but still, this is not child's play.
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
User avatar
KermMartian
Calc Wizard
Posts: 549
Joined: Tue 05 Jul, 2005 11:28 pm
Contact:

Post by KermMartian »

Searching...
http://joepnet.com/hosted/maxcoderz/php ... networking - Never completed

Ah, you mean this? http://timendus.student.utwente.nl/docs/multi-user.doc
I've read that long ago and actually incorporated some of the general ideas like cascading checks.
Image Image Image
Post Reply