Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Website <-> Plugin Connection #1

Open
Sandertv opened this issue Sep 10, 2017 · 14 comments
Open

Website <-> Plugin Connection #1

Sandertv opened this issue Sep 10, 2017 · 14 comments
Assignees

Comments

@Sandertv
Copy link
Member

The first big task we'll have to work on is the main connection between the website and the plugin.

Step 1
The client enters their server on the website, with the server address and the server port. This could be returned as base64_encode ( serverAddress ':' serverPort). The web page should then return that string to the user as their personal server key. This string should also be saved in order to check if a request is valid later.

Step 2
The client installs the DynMapPMMP plugin on their server, and configures the config.yml with the personal server key given above.

Step 3
The plugin should do some basic checks whether the given personal server key is valid, and attempt to make a connection to the website using sockets. If no connection could be made, the plugin should be disabled.

Step 4
When the website receives a socket, the website should validate the personal server key given. If the personal server key is one that has been saved, the request is valid; It should create a new web page which can then be further used in the future.

@Sandertv
Copy link
Member Author

@HimbeersaftLP feel free to push straight to the master branch if you're making changes gradually by the way, it makes things a bit easier.

@xZeroMCPE
Copy link

Self-hosted website or? collaborate more.

I may be able to assist fully on this project.

@Sandertv
Copy link
Member Author

Sandertv commented Sep 13, 2017

I don't have the complete image yet, I think it's best to host the website as a single instance so the end user has to do like nothing to get their map working. I don't have a lot of experience with this though, so I'm not sure what is the best approach yet.

@Sandertv
Copy link
Member Author

It's mostly the website part that I'm not great at. Basic CSS + HTML and a bit of Javascript is how far I get with that, some help on that would be greatly appreciated of course. HimbeersaftLP is helping with that as well.

@xZeroMCPE
Copy link

@Sandertv Oh so like this:

capture

Or did I comprehend it wrong?

@Sandertv
Copy link
Member Author

I'm not really sure if it should be hosted locally per person or hosted on one main website yet.

@xZeroMCPE
Copy link

Each has their cons and pros.

@Sandertv
Copy link
Member Author

True, hosted locally is a lot easier for us, we won't have to store a lot, but hosting one instance is easier for the end user.

@xZeroMCPE
Copy link

True, therefore, the plugin can come with its own web server. Just like DynMap does. Players can navigate to it through a certain port ex: example-ip:2500 etc (ports, of course, can be customized through config).

@Sandertv
Copy link
Member Author

Yeah exactly, that does make life a lot easier as we can separate the actual website from the dynamic map.

@Sandertv
Copy link
Member Author

I'll be pushing a rather large commit in a second which'll have the basic code for creating a proper map with a way to do it even when chunks aren't loaded.

@xZeroMCPE
Copy link

Alright.

@Sandertv
Copy link
Member Author

Okay I personally think having the client's machine host the DynMap page is the best idea. That way we won't have to worry about running out of storage space for anything, and we could even have the info website hosted by GitHub if we'd do so.

@xZeroMCPE
Copy link

Yeah definitely.

@Sandertv Sandertv self-assigned this Sep 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants