An Alternative For DataStore OnUpdate?

Since OnUpdate is broken I need an Alternative, we all do.

You can read the Bug Report Here

Non of the Staff has Replied to the Bug Report Thread so I have no clue what’s going on, if it would be fixed or not.

So I decided to use an Alternative, but I have no idea how so I’m asking

It would probably be something like using HTTPService, I have no idea

I want to Detect when there is an Updated Place Version

This is what the Code would look like if OnUpdate is working

-- PlaceVersion DataStore On Update Event + Update Async --
		local Current_PlaceVersion = game.PlaceVersion
		if RunS:IsServer() then
			local GameDataStore = DataStoreService:GetDataStore('Name','PlaceVersion')
			-- Update Async
			GameDataStore:UpdateAsync("PlaceVersion", function(Old_Value)
				local New_Value = Old_Value < Current_PlaceVersion and Current_PlaceVersion or nil
				return New_Value			
			-- On Update
			local Connection; Connection = GameDataStore:OnUpdate("PlaceVersion", function(New_PlaceVersion)
				if Current_PlaceVersion < New_PlaceVersion then

What I do, and it’s a bit ugly, is I have a pastebin that just says the version number of the game. Whenever I want to update the version, I just edit that pastebin. On all games, every regular interval, it checks the raw text of that pastebin.

1 Like

Using DataStores for this generally isn’t very performant if you have a large number of servers, but if you have a small number of servers I would recommend just using a polling loop and GetAsync. How OnUpdate works internally is by a batched get polling loop, so performance is not much worse by simply doing a GetAsync request yourself every 60 seconds.

If you need this to scale to a large number of servers then I would recommend using your own external server and have your game update the version on that and request the current version in that same manner you were using datastores.

1 Like