{"action":"created","issue":{"url":"https://api.github.com/repos/KeenSoftwareHouse/SpaceEngineers/issues/357","labels_url":"https://api.github.com/repos/KeenSoftwareHouse/SpaceEngineers/issues/357/labels{/name}","comments_url":"https://api.github.com/repos/KeenSoftwareHouse/SpaceEngineers/issues/357/comments","events_url":"https://api.github.com/repos/KeenSoftwareHouse/SpaceEngineers/issues/357/events","html_url":"https://github.com/KeenSoftwareHouse/SpaceEngineers/issues/357","id":95784497,"number":357,"title":"Cross-server object cluster send/receive","user":{"login":"zrisher","id":1958130,"avatar_url":"https://avatars.githubusercontent.com/u/1958130?v=3","gravatar_id":"","url":"https://api.github.com/users/zrisher","html_url":"https://github.com/zrisher","followers_url":"https://api.github.com/users/zrisher/followers","following_url":"https://api.github.com/users/zrisher/following{/other_user}","gists_url":"https://api.github.com/users/zrisher/gists{/gist_id}","starred_url":"https://api.github.com/users/zrisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zrisher/subscriptions","organizations_url":"https://api.github.com/users/zrisher/orgs","repos_url":"https://api.github.com/users/zrisher/repos","events_url":"https://api.github.com/users/zrisher/events{/privacy}","received_events_url":"https://api.github.com/users/zrisher/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-18T03:36:07Z","updated_at":"2015-07-18T04:38:25Z","closed_at":null,"body":"In order to accomplish travel between servers a la [the forum feature request](http://forums.keenswh.com/threads/teleportation-between-servers.7362708/) and as partially enabled by #320, we need to be able to send clusters of objects between them. Think of this basically as jump drive, but from a location on one server to a location on another.\r\n\r\nIt could be accomplished in game in many different ways: move to one edge of the map and go to an \"adjacent\" sector on another server, use a warp gate, or simply select coords in a different sector in the jump drive. But that's a discussion for another thread.\r\n\r\n**I would like to discuss the technical implementation of sending objects between servers**, because I'd like to work on it and am hoping to gather feedback on the best way to do so / collaborate with others. In private discussions with some of the other server owners, I've found that the implementation is a hotly-debated topic, so I wanted to open it here for a larger discussion.\r\n\r\nI believe there are two major things that need to be in sync for this to work properly:\r\n* The receiving server must have the same faction relations for the players that are moving (and of course references to the players themselves)\r\n* The available block definitions (via mods) are similar enough that *enough* of the objects can be replicated in the receiving server that the player would be OK with any loses. Or they could be identical.\r\n\r\nI also think **we should leave the discussion of the best way to sync faction relations and object definitions to a separate issue**. I've found people have very different ideas of the best ways to do this, most of them revolving around external processes. So let's assume SE will eventually offer a way to do this that everyone's happy with or the servers are already in sync courtesy of admin actions. Again, I think this is a big puzzle so @Tyrsis was right to approach it a piece at a time.\r\n\r\n**Here are the things I think we would need for this to work:**\r\n\r\n1. A function for the origin server to check ModAPI for permission to send the *objects* and *players* to a specific *ip/dn*, then send the objects and player info to the receiving server \r\n2. A function for the receiving server to parse the request, check if its allowed via ModAPI and if enough slots exist for those players, then send a response back to the origin server with information on whether it was approved or denied and why denied if so. If your ModAPI authorization allows partially compatible travel (destination is missing some definitions), even an affirmative message would include some useful info for the player. The destination server would cache the objects being sent (probably ref'd by an ID sent with the response) and hold the necessary player slots open for a specified timeout\r\n3. A function on origin server to receive the results from 2, provide the player with info, and then allow them to confirm the send if allowed\r\n4. A function on the origin server to tell the destination to prepare the travel and to locally make the players connect to the new server. And perhaps play the jump effect\r\n5. A function on the receiving server to spawn in the objects (possibly after waiting for those players to connect). And possibly display the jump end effect\r\n\r\nCommunication - I believe this is completely possible using the existing SteamSDK library/class. We would need to create some new serializable records.\r\n\r\nAuthorization - leaving final say up to ModAPI on the destination server allows people to configure this however they like and still have full control over what's getting into their server. Most common would probably be defining a pool of allowed ips. In this way, admins could set up groups of servers that are solely run by them with exactly the same mod lists, or you could have many different server owners allowing their players to move between with various mod lists and choose themselves if they were OK with the import. They're very different and I've heard from people that are looking for both, but either would be completely possible with this implementation.\r\n\r\nI think this allows you do do anything you'd want with cross-server object sending but is still flexible enough that admins and mod maintainers have the final say over what's allowed and how syncing is accomplished.\r\n\r\nPlease let me know your thoughts, concerns, suggestions for implementation both high-level and technical, etc.\r\n"},"comment":{"url":"https://api.github.com/repos/KeenSoftwareHouse/SpaceEngineers/issues/comments/122483301","html_url":"https://github.com/KeenSoftwareHouse/SpaceEngineers/issues/357#issuecomment-122483301","issue_url":"https://api.github.com/repos/KeenSoftwareHouse/SpaceEngineers/issues/357","id":122483301,"user":{"login":"zrisher","id":1958130,"avatar_url":"https://avatars.githubusercontent.com/u/1958130?v=3","gravatar_id":"","url":"https://api.github.com/users/zrisher","html_url":"https://github.com/zrisher","followers_url":"https://api.github.com/users/zrisher/followers","following_url":"https://api.github.com/users/zrisher/following{/other_user}","gists_url":"https://api.github.com/users/zrisher/gists{/gist_id}","starred_url":"https://api.github.com/users/zrisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zrisher/subscriptions","organizations_url":"https://api.github.com/users/zrisher/orgs","repos_url":"https://api.github.com/users/zrisher/repos","events_url":"https://api.github.com/users/zrisher/events{/privacy}","received_events_url":"https://api.github.com/users/zrisher/received_events","type":"User","site_admin":false},"created_at":"2015-07-18T04:38:25Z","updated_at":"2015-07-18T04:38:25Z","body":"Well that's exactly what this is, a set of functions called solely via the ModAPI to enable this functionality."}}