What is the right way to make a server-client game?

I have expericence working on multiplayer games and I understand most basic concepts. We used Photon with p2p Host-client connection, so one “host” player was handling all the "server "game logic. Now I have a project with custom networking and a server set up on Java. It was fine passing calls to it but now I need to do AI and for it to be controlled by server, the server basically needs to know the game, the map, etc, I need a Unity Instance to do bot logic. I know there’s a Unity Dedicated server thing, but I never used it. Would that work with Java server, or would it have to replace it then? Do I need to use Unity Services to use dedicated server? Are there other solutions?

Hello, first of all you don’t have to use Unity Services to use a dedicated server. You can create/purchase your own custom server and then upload your server code. As I understand it, the problem lies in the communication between server and clients. I think it depends on whether you just need to retrieve data or create a first-person shooter, for example. If you’re already building your game in Unity, it would be easier to just create a dedicated server build and upload that. Also, if you want to scale in the future, the server shouldn’t have the whole map and everything as this will just use up unnecessary resources. If I misunderstood something, please correct me.