Closed rudde0 closed 5 months ago
Have you had a look at 2.4.0? It's written to support multipaper so it logs everything in the database continuously to ensure that multiple servers can pull from the database. It does use inter-server communication via MultiLib to keep servers in sync when things like a new island is made on one of them.
Am I need to use MultiPaper?
I'm using BentoBox 2.4.0-SNAPSHOT-b2624 on my Purpur server and there aren't any synchronization unless the things I do IslandsManager#saveAll() and IslandsManager#load() in certain places. Also I can't load/save players via API.
Adding the following. I recommend you read the JavaDocs for them.
PlayersManager#loadPlayer(UUID uuid)
PlayersManager#savePlayer(UUID uuid)
IslandsManager:
public Optional<Island> loadIsland(String uniqueID)
public static CompletableFuture<Boolean> saveIsland(Island island)
Is your feature request related to a problem?
Hey there,
I'm working on multi-server instance by my own and I need several methods to sync data accross the servers.
Main problem is, specific islands can't be fetched from db and can't uploaded to db whenever I want. I know
IslandsManager#saveAll()
exists but incremental operations might be more performant. My second problem is syncing cached data of player.Describe the solution you'd like.
I need some methods to handle:
IslandsManager#saveIsland(Island island);
IslandsManager#loadIsland(Island island);
PlayersManager#save(UUID playeruuid);
PlayersManager#load(UUID playeruuid);
Describe alternatives you've considered.
Also listed versions of island management would be nice:
IslandsManager#saveIslands(Set<Island> islands);
IslandsManager#loadIslands(Set<Island> islands);
Agreements
Other
Please consider to expanding the API with those methods.