MUnique / OpenMU

This project aims to create an easy to use, extendable and customizable server for a MMORPG called "MU Online".
https://munique.net
MIT License
709 stars 305 forks source link

WEB API #125

Closed MarioGK closed 4 years ago

MarioGK commented 5 years ago

Is there any web api planned? In the Launcher project i will need some information like latest version, news and maybe server statistics like amount of online players and etc so that they can be displayed.

If there is none planned i would recommend using ASP.NET Core so that it can be hosted on Linux servers, and if there is no one wanting to do it i can start the working on the project as well.

sven-n commented 5 years ago

Hi, yes I have plans for an API, but unsure how to put it into the current project structure. The AdminPanel already has some basic APIs with ASP.NET Core, but they’re meant for the (internal) server administration interface. A public API should probably live in a separate asp.net core project.

sven-n commented 4 years ago

I think I have a basic idea how to add a public API to the project. I'm thinking about an internal "service bus" or SignalR hub where all server components can exchange their data/state. Plugged to that, we could have the AdminPanel, which is available for internal use, and another asp.net core project which is also connected to these internals, but exposes just the required public data through an API. Basically, OpenMU is already ready to support such an architecture, because the "Servers" are already decoupled, and the interfaces for the communication between them are pretty basic. I'll try to make it happen as soon as I have more time to think this through :-)

MarioGK commented 4 years ago

@sven-n Great idea, cant wait for the API so i can resume the Loader/Launcher project.

sven-n commented 4 years ago

I experimented a bit and I think the easiest way for now is a separate asp.net core project which can be hosted on the same process but another port (e.g. 80 and or 443), which can then be used by the launcher, a website or other things.

For now, this api project will just get its data objects like the admin panel - through dependency injection. In a later stage we can inject implementations which talks to an internally used API.

I hope this looks like a plan :)

sven-n commented 4 years ago

Hey, I started to implement a simplistic API and are thinking about the initially required data and functionality.

Stuff planned:

Stuff I see out of scope:

Did I miss something? What are your thoughts?