Futurecraft Forums

A forum dedicated to communication and innovation!
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in
Welcome, one and all, to the Futurecraft Forums!

Share | 
 

 Technical: Server to Server, Maintaining a sence order

View previous topic View next topic Go down 
Go to page : 1, 2  Next
AuthorMessage
ectrimble20
DEV
DEV
avatar

Posts : 441
Join date : 2011-11-07

PostSubject: Technical: Server to Server, Maintaining a sence order   Wed Dec 07, 2011 2:44 pm

Well I've discussed this in a number of other topics, figured its about time to get down to the brass tacts of what will be needed for a transport level for us to truly create the sense of a real universe without having to build a giant infrastructure to back it.

Now, Minecraft is programmed in Java, this we all know, and this will play in to our hands quite nicely as Java is a very universal and cross platform language. This is going to allow us to build in, or even hijack whats there, a socket level communication system that will allow us to transfer data from one server to the next. Thats all well and dandy as its a tried and true method by which client A connects to server A and they have their little party.

Now where we'll need to get a little innovative, at least from a Mod's point of view, is how we scale the universe.

By scale the universe, I mean how do we let Server A know that there's more to the universe than just it? There are two methods that I can think of, either A) use the forums to spread IP addresses around and let the users link their servers together, or B) build a server to act as a middle man for the process allowing a "map" of the universe to be constructed with a database.

Basically my concept would consist of a central database, the FC database if you will. It will consist of a couple tables, the main one being the registry. It would look like so:

[ID Server Name Server Address Max Connections Last Updated Verified Active Owner]

Doesn't have to be exact, just came up with that off the top of my head. But basically what this registry would allow us to do is control who's connected to the FC universe. A single server can be setup, but would have no way to directly communicate with the rest of the universe (the FC universe that is) without having a huge log of IP addresses that can change and become out of date. What I think the central registry would do for us, is allow us to keep everyone up to date, keep track of server status, keep stats of what servers are full and also, and this is what I think would be cool, would be to build a star map of the FC universe based on the time-zone of the server allowing us to say that server 283 cannot directly linke with server 223, you must past through server 134 to reach it. This would be a great way to build a sense of grandness to the universe.

Now how do we accomplish this? Well for one, we build Future Craft, then for two, we setup a server, I plan to setup a virtual environment as soon as I can get a mother board for my second box (kind fried the other one) to test this theory. From that point, building the communications in Java will take a bit of time, but wont be hard, getting it to work within Minecraft might be a bit of a challange, but we will prevail. We would want to get a static address, web URL, for the FC server and build that into our mod. An interface for the server setups would help as well to allow a user to automatically register their server with our system and allow us to automatically add them into the universe with some scripting on the server.

So thats my argument for a central FC server.

Anyway, thoughts and suggestions are always welcome. However, if you do not understand server-to-server communications, please, please, please, do NOT post dumb crap about how your spaceship should fly seamlessly through the universe, server to server and you don't understand why we need this extra stuff, I will delete/modify your post.
Back to top Go down
View user profile
roguenerd
Newbie
Newbie


Posts : 32
Join date : 2011-11-11

PostSubject: Re: Technical: Server to Server, Maintaining a sence order   Wed Dec 07, 2011 10:26 pm

Random Thought:
When a world is generated it should send how many diamonds are generated to the central server so if a server is using a dupe bug you would know.
Back to top Go down
View user profile
ectrimble20
DEV
DEV
avatar

Posts : 441
Join date : 2011-11-07

PostSubject: Re: Technical: Server to Server, Maintaining a sence order   Thu Dec 08, 2011 12:08 am

I'm thinking we can use a seed control, like when they register and do a "verify connection", pull the seed from their world and make sure there isn't a chain of duplicate seeds being spammed around. Good idea there rogue.
Back to top Go down
View user profile
Conscript Gary
Newbie
Newbie


Posts : 10
Join date : 2011-10-20

PostSubject: Re: Technical: Server to Server, Maintaining a sence order   Fri Dec 09, 2011 6:45 am

So, you jump to another server, you're connected there, all is good.
What happens when you disconnect? The way servers work in minecraft as-is, if you reconnected to your original server afterward, what would happen? Would you spawn in the depths of space without inventory (all of that having been transferred) and die?
Perhaps have servers running the mod keep track of any and all outbound transfers, taking them off the list as returns happen. Say Steve connects to server A, warps to server B, disconnects, then joins server A again. A would have player "Steve" listed as 'transported to server B' and shunt him along. If server B isn't available for whatever it could just deny him I suppose.
Though that raises the question, what if a server goes down? Will the middleman server keep a log of transfers in case something happens while away from your ome server?
Not to be a downer, but better to look at these kind of things and account for them early.
Back to top Go down
View user profile
ectrimble20
DEV
DEV
avatar

Posts : 441
Join date : 2011-11-07

PostSubject: Re: Technical: Server to Server, Maintaining a sence order   Fri Dec 09, 2011 10:02 am

Gary, thats why I posted this, for suggestions and for people to point out the loop holes before any of this is actually built.

You're ideas are actually very good. However, the main problem with the middle man server keeping player information is the over head. I don't want to have a huge database storing inventory information and various other details, but because of the reasons you listed, it might be a nessessity. I think you're idea for making a player as "AFS" or away from the system would be a good idea, so when they reconnect to server A, server A can check the middle man server and see that the player hasn't checked back in and would then be able to respawn the player. I can see a lot of loop holes in it just from my perspective, like how do we see what a player did previously on another server? What if the player went to planet B and mined a ton of new materials but on his way back server B went offline. Because we do not directly check with the servers we would have no way to know what the player had in his inventory when the server went down. In addition, if the server comes back up and the player jumps again from server A, this has the potential to create a duplicate away record unless we can build in some logic to remove the oldest etc.

So, in summary, I know there are a ton of little details that have to be ironed out, so if you see something not discussed that you feel should be brought up, please, by all means, post away. You won't catch flak from me.
Back to top Go down
View user profile
roguenerd
Newbie
Newbie


Posts : 32
Join date : 2011-11-11

PostSubject: Re: Technical: Server to Server, Maintaining a sence order   Fri Dec 09, 2011 7:52 pm

Maybe when someone closes out MC when they're in a different system it just sends a copy straight to the players "home" server that stores a copy of their inventory.
Only problem with this is someone could

  • Travel to a server
  • Get a bunch of stuff
  • Log off
  • Have the server owner shut down the server
  • Log back in, warped to "home" server with full inventory thus safely and cheaply transporting stuff


Which leaves me to my other idea, just dealing with it.
What happens now if you play a bunch of MC online and the server goes down?
You don't play MC on that server.
So why should that be different for FC?

I think it would be good for someone to have a determined "Home" server too, an admin would add them to their server's "Resident" list like a whitelist, so they have a respawn point.
Back to top Go down
View user profile
fr0stbyte124
Super Developrator
Super Developrator
avatar

Posts : 1835
Join date : 2011-10-13

PostSubject: Re: Technical: Server to Server, Maintaining a sence order   Fri Dec 09, 2011 8:50 pm

So this idea about introducing locality between star systems, I kind of like it but how would you handle one of the servers going down and cutting off the path?

Space should be easier to run and store than planets, so it ought to be possible for other servers to pick up the slack. We could make it to where heavenly bodies are observable in-system without their respective servers being up. Not sure what to do if you are stuck planet-side though.
Back to top Go down
View user profile
roguenerd
Newbie
Newbie


Posts : 32
Join date : 2011-11-11

PostSubject: Re: Technical: Server to Server, Maintaining a sence order   Sat Dec 10, 2011 6:27 pm

So if a server went offline people could still get into the system and observe the planet?

Might be a problem because an offline server would be vulnerable to have people camp right above the planet and when it went back online it would be attacked before it could get its defenses back up. Maybe there could be a "no fly" zone

Maybe an online-offline ship transition could work like this:






  • When a ship switches systems a copy of it is saved on the previous server and the central FC server is notified of the transition, the players that moved (so it has an up-to-date registry of who is where), and the co-ordinates of the ship and of the players
  • A players inventory is constantly synchronized with their home server
  • If the server goes offline the neighboring servers take the load (See pic)
  • If the shutting down server had time to relay the co-ordinates, current layout, and the inventory of players/ships to the servers taking the load skip the next step
  • If the server abruptly crashes the central FC server finds where the latest copy of the ship (stored when it crossed a boundry) is saved (based off the log of the central FC server) and the inventories are pulled from the player's home servers (that had been kept up-to-date) and the ship is teleported to the co-ordinates where it last crossed a boundary and the players are teleported to where they where during the transition


The only problem with this is that if two ships where in a fight when the server crashed the damage would be reversed, the only way I can think of getting around this is if the last transition world was notified of every single change to the ship, which I think would be too much.

As for players on the planet, they just can't connect till the servers back up, unless the other server is down for longer than a few days then they get teleported to their home world with their latest inventory that was backed up.
Back to top Go down
View user profile
ectrimble20
DEV
DEV
avatar

Posts : 441
Join date : 2011-11-07

PostSubject: Re: Technical: Server to Server, Maintaining a sence order   Thu Dec 29, 2011 4:09 pm

Revising the dead topic since I've been working on this.

Ok, so here's my plan on how this is all going to work.

Basically I'm going with my original middle-man server (MMS from this point on) idea.

The server will be a database transaction host, it will not think (outside of processing queries), only take data and return data. All the thinking will be done by the Server itself.

Built into the Server will be a 15 min timed tick. This tick will automatically update every player on the server with the MMS and update their records. This will ensure that we have a current copy of the players inventory, location, damage, and anything else I choose to store.

Upon logging in, the inventory the user has from the servers last known save will be checked against the inventory of the last known location. This will improve redundancy, especially for server crashes. The stored inventory is not to allow players to transfer inventory from 1 server to the next by logging in and out of servers. There will be a special transport hook built into our "move from server to server" functionality that will handle transportation of goods between servers.

Once in place the transport hook will be the only means by which to move items from one server to another. This will prevent players from logging into server 1, mining/taking/crafting items, logging out and logging into server 2 with the items. They will still retain their items on server 1, they will just have a blank inventory when they log into the new server. What the hook will allow them to do is take their items that they mined/gathered on server 1, then using a transportation means (a ship/teleporter/whatever) move the items to another system. Once they log into the new system, the hook will have uploaded their "moving inventory" to a table just for this task. Once they log into server 2, server 2 will then gather the list, and create the list in the users inventory. This will allow for a free trade system to operate by allowing players to take goods crafted at one location and transport them to another for trade/sale/construction/etc.

Another possibility will be a "universe market place". I haven't done enough work on the system to see how feasible this will be, but my basic idea is the same as the transportation level transfers, only it will allow a player to place an item in the market and mark it as for sale. The market will then remove the item from said world. Once other users access the market, it will poll the MMS's market table and they'll be able to see what items are available, allowing them to buy the item from the other user, creating the item in their inventory and removing whatever they trade for it from theirs. If we make a form of currency, this will be more viable as a barter system wont work well like that. Again, this is just in the planning stages.

The primary goal of the MMS setup will be to support the transportation level of the mod, giving it an almost MMO feeling without the need for a huge network of servers.

Once question I saw earlier was the question of how do we keep track of when a server is online/offline and what do we do if the server crashes?

Answer to #1 is simple, we build a hook to monitor online/offline status, basically insert a flag and set it to "on" when the server starts up, and reverse, set it to off, when the server shuts down.

Answer to #2 is also simple. Nothing. Because we're not building a giant interconnected server setup, losing a single server isn't our problem, its the servers operator that is responsible for that. What the MMS will be there to do is to handle what the servers are not designed to handle, mainly the transportation of players and items between servers.

Keep in mind this is also just what we have planned for Alpha release. Once I can get my stuff working and can test out more and better features, I'm sure we will find further usefulness for the MMS.
Back to top Go down
View user profile
Laibach
General
General
avatar

Posts : 2024
Join date : 2012-01-23
Age : 66
Location : Frozen Fields

PostSubject: Re: Technical: Server to Server, Maintaining a sence order   Mon Jan 23, 2012 2:06 pm

Well, i'm pretty new here, and i was going to suggest the MMS if you hadn't already, but i was also thinking that some servers would be full, and couldn't support the information a ship/player entering it would create, so maybe a second server or something would be used to generate a simple "empty" space world were you would end up if the server rejected your connection attempt

basically, if you tried to go the the earth and the "server" rejected you, you would be sitting somewhere near the moon, and then be able to return to your original server

I hope that helped something!


(edit) this area would be really boring, and would be shared for all rejected connection. it would really just be a aesthetic transition, or something
Back to top Go down
View user profile
ectrimble20
DEV
DEV
avatar

Posts : 441
Join date : 2011-11-07

PostSubject: Re: Technical: Server to Server, Maintaining a sence order   Mon Jan 23, 2012 9:16 pm

The server will have checks on it for players online and capacity and hopefully I'll build in some redundancy for when player A connects as player B is connecting to fill the server, but I'll work that crap out once I have a working model.
Back to top Go down
View user profile
Keon
Lord/Lady Rear Admiral 1st
Lord/Lady Rear Admiral 1st
avatar

Posts : 3075
Join date : 2012-01-17
Location : Hahahaha.

PostSubject: Re: Technical: Server to Server, Maintaining a sence order   Mon Jan 23, 2012 11:02 pm

Alright, my take on things.
1: Jumpgates are easy. Just hack into the connect to server methods, and you can live with the dirt background for now.
2: No space is easy too. If all a server has to do is hoast a solar system of 9 or so worlds, each small sized, that's easy.
3: Overflow and crashing servers: If you overflow a server, that is a problem. Also, crashing a server to defend your land is a problem. I think the only solution possible is to have the planet explode. All the people are kicked into space or the nearest server, with or without a spaceship. This does pose the problem of just lag bombing servers to kill them.
4: How to do space: This all depends on how much money we can make for a server and how many play on it. If it is feasible to host everybody, single server is the way to go. If not, then you have two options:
A: Difficult code to seamlessly overlap servers without load time
B: No interstellar space, just in solar system. Jumpgates are the only way to inter-server travel
Back to top Go down
View user profile
TinkerPox
Newbie
Newbie
avatar

Posts : 198
Join date : 2012-01-19
Age : 17
Location : (Tacokingbob)

PostSubject: Re: Technical: Server to Server, Maintaining a sence order   Mon Jan 23, 2012 11:04 pm

Keon wrote:
Alright, my take on things.
1: Jumpgates are easy. Just hack into the connect to server methods, and you can live with the dirt background for now.
2: No space is easy too. If all a server has to do is hoast a solar system of 9 or so worlds, each small sized, that's easy.
3: Overflow and crashing servers: If you overflow a server, that is a problem. Also, crashing a server to defend your land is a problem. I think the only solution possible is to have the planet explode. All the people are kicked into space or the nearest server, with or without a spaceship. This does pose the problem of just lag bombing servers to kill them.
4: How to do space: This all depends on how much money we can make for a server and how many play on it. If it is feasible to host everybody, single server is the way to go. If not, then you have two options:
A: Difficult code to seamlessly overlap servers without load time
B: No interstellar space, just in solar system. Jumpgates are the only way to inter-server travel
what will happen to the servers if they blow up?
Back to top Go down
View user profile
The Schmetterling
DEV
DEV
avatar

Posts : 3123
Join date : 2011-08-31
Location : I'm a butterfly.

PostSubject: Re: Technical: Server to Server, Maintaining a sence order   Mon Jan 23, 2012 11:17 pm

Space will only be interplanetary, not interstellar. This
will solve the problems you mentioned. Jumpgates and Stargates will work in
similar ways, select destination, enter gate, transfer server, load, and
reappear at other end. Hyperspace will just have the long waiting period between
the "enter" and "reappear" phase, were the ship is being
stored on a separate, isolated, world (which they are anyway, with Copernicus)
on the original server (or the destination server, it depends on what Ectrimble
decides is best), only having the appearance of moving, although not actually doing
so.


Does all that make sense?
Back to top Go down
View user profile
xanex21
Newbie
Newbie


Posts : 131
Join date : 2012-01-21
Location : Between the Delta and Alpha Quadrant (trexies)

PostSubject: SSP?   Thu Jan 26, 2012 5:51 am

Will it be easy to go into space in SSP? Could you describe how going to space will be done in SSP?

On another note imagine the 128 block to be portal block to space. And when you get into your ship and fly to 128, the portal treats your ship as the player. May be you can trick the portal into thinking the ship is a player. Just another suggestion.

My question still stands of course.
Back to top Go down
View user profile
fr0stbyte124
Super Developrator
Super Developrator
avatar

Posts : 1835
Join date : 2011-10-13

PostSubject: Re: Technical: Server to Server, Maintaining a sence order   Thu Jan 26, 2012 3:20 pm

It's not a portal.
Back to top Go down
View user profile
xanex21
Newbie
Newbie


Posts : 131
Join date : 2012-01-21
Location : Between the Delta and Alpha Quadrant (trexies)

PostSubject: Re: Technical: Server to Server, Maintaining a sence order   Thu Jan 26, 2012 4:48 pm

I know its not a portal, but for the sake of making things easier, i suggested it. Of course you could create a world where there are 2048 blocks high, there are already mods for editing world heights, but i think space should be separate world so you can put more stuff in, even though space is well.. space.
Back to top Go down
View user profile
Laibach
General
General
avatar

Posts : 2024
Join date : 2012-01-23
Age : 66
Location : Frozen Fields

PostSubject: Re: Technical: Server to Server, Maintaining a sence order   Thu Jan 26, 2012 4:57 pm

xanex21 wrote:
I know its not a portal, but for the sake of making things easier, i suggested it. Of course you could create a world where there are 2048 blocks high, there are already mods for editing world heights, but i think space should be separate world so you can put more stuff in, even though space is well.. space.


that what I assumed you were going to do, but a smooth transition would be amazing *drool*
Back to top Go down
View user profile
The Schmetterling
DEV
DEV
avatar

Posts : 3123
Join date : 2011-08-31
Location : I'm a butterfly.

PostSubject: Re: Technical: Server to Server, Maintaining a sence order   Thu Jan 26, 2012 5:42 pm

xanex21 wrote:
Will it be easy to go into space in SSP? Could you describe how going to space will be done in SSP?

On another note imagine the 128 block to be portal block to space. And when you get into your ship and fly to 128, the portal treats your ship as the player. May be you can trick the portal into thinking the ship is a player. Just another suggestion.

My question still stands of course.



That is the most N00b-ish statement I've ever seen. To
answer your bleeding obvious questions: yes it will be easy, exactly the same
as in SMP.
Now, to your suggestion: space will be a seamless transition from the
atmosphere to space. No portals necessary. We will be using methods from the
Cubic Chunks mod to increase the world height to 10 km underground and 20km
into the atmosphere.
Back to top Go down
View user profile
fr0stbyte124
Super Developrator
Super Developrator
avatar

Posts : 1835
Join date : 2011-10-13

PostSubject: Re: Technical: Server to Server, Maintaining a sence order   Thu Jan 26, 2012 5:44 pm

That much, huh.
Dang. I was thinking like, 1km.
Back to top Go down
View user profile
xanex21
Newbie
Newbie


Posts : 131
Join date : 2012-01-21
Location : Between the Delta and Alpha Quadrant (trexies)

PostSubject: Re: Technical: Server to Server, Maintaining a sence order   Thu Jan 26, 2012 5:46 pm

Dr. Mackeroth wrote:
xanex21 wrote:
Will it be easy to go into space in SSP? Could you describe how going to space will be done in SSP?

On another note imagine the 128 block to be portal block to space. And when you get into your ship and fly to 128, the portal treats your ship as the player. May be you can trick the portal into thinking the ship is a player. Just another suggestion.

My question still stands of course.



That is the most N00b-ish statement I've ever seen. To
answer your bleeding obvious questions: yes it will be easy, exactly the same
as in SMP.
Now, to your suggestion: space will be a seamless transition from the
atmosphere to space. No portals necessary. We will be using methods from the
Cubic Chunks mod to increase the world height to 10 km underground and 20km
into the atmosphere.

It may have been noobish but all this talk of servers and SMP, id think you guys would focused SMP, so i had to ask. 10 km translate into how many blocks?
Back to top Go down
View user profile
fr0stbyte124
Super Developrator
Super Developrator
avatar

Posts : 1835
Join date : 2011-10-13

PostSubject: Re: Technical: Server to Server, Maintaining a sence order   Thu Jan 26, 2012 5:47 pm

lol!
Back to top Go down
View user profile
Laibach
General
General
avatar

Posts : 2024
Join date : 2012-01-23
Age : 66
Location : Frozen Fields

PostSubject: Re: Technical: Server to Server, Maintaining a sence order   Thu Jan 26, 2012 6:54 pm

xanex21 wrote:
Dr. Mackeroth wrote:
xanex21 wrote:
Will it be easy to go into space in SSP? Could you describe how going to space will be done in SSP?

On another note imagine the 128 block to be portal block to space. And when you get into your ship and fly to 128, the portal treats your ship as the player. May be you can trick the portal into thinking the ship is a player. Just another suggestion.

My question still stands of course.



That is the most N00b-ish statement I've ever seen. To
answer your bleeding obvious questions: yes it will be easy, exactly the same
as in SMP.
Now, to your suggestion: space will be a seamless transition from the
atmosphere to space. No portals necessary. We will be using methods from the
Cubic Chunks mod to increase the world height to 10 km underground and 20km
into the atmosphere.

It may have been noobish but all this talk of servers and SMP, id think you guys would focused SMP, so i had to ask. 10 km translate into how many blocks?



XD

do you know what kilometer means? or how big a block is?
kilo, 1000, meters, meters,
Back to top Go down
View user profile
xanex21
Newbie
Newbie


Posts : 131
Join date : 2012-01-21
Location : Between the Delta and Alpha Quadrant (trexies)

PostSubject: Re: Technical: Server to Server, Maintaining a sence order   Thu Jan 26, 2012 7:03 pm

First of all i know what a kilometer is, second i dont know the conversion from blocks to Kilometers. Thats why i ask how many blocks is 10 km. I live in a world of blocks in minecraft not kilometers. There are no S.I units in minecraft only blocks to me.


Last edited by xanex21 on Thu Jan 26, 2012 8:25 pm; edited 1 time in total
Back to top Go down
View user profile
Keon
Lord/Lady Rear Admiral 1st
Lord/Lady Rear Admiral 1st
avatar

Posts : 3075
Join date : 2012-01-17
Location : Hahahaha.

PostSubject: Re: Technical: Server to Server, Maintaining a sence order   Thu Jan 26, 2012 7:13 pm

1 meter is standard for blocks.
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: Technical: Server to Server, Maintaining a sence order   

Back to top Go down
 
Technical: Server to Server, Maintaining a sence order
View previous topic View next topic Back to top 
Page 1 of 2Go to page : 1, 2  Next
 Similar topics
-
» could not connect to selenium rc server
» Getting error when i run selenium script in Eclipse, please help
» we are renting with dedicated server co-lo in USA & UK
» VPS with relay server based PC2Phone & mobile dialer at $499
» ..::Dedicated server Rent With Voip Switch::..

Permissions in this forum:You cannot reply to topics in this forum
Futurecraft Forums :: Development :: Idea Center-
Jump to: