pull_requests: 567367834
This data as json
id | node_id | number | state | locked | title | user | body | created_at | updated_at | closed_at | merged_at | merge_commit_sha | assignee | milestone | draft | head | base | author_association | auto_merge | repo | url | merged_by |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
567367834 | MDExOlB1bGxSZXF1ZXN0NTY3MzY3ODM0 | 3446 | open | 0 | Add support for servers to periodically communicate with external services | 563 | Hey all, I was talking about something I've built with @LtRipley36706 the other day and he thought other devs would be interested in seeing a PR so here it is: It would be really interesting if ACE servers could communicate with external services. There's been a ton of discussion about _how_ to do this, going back to https://github.com/ACEmulator/ACE/issues/718. Providing an HTTP API is a really powerful idea but presents a ton of problems such as rate limiting, running read-only replicas of the database, and so on. A lighter weight and simpler approach is to have ACE servers _send_ any information to external services periodically. The biggest downside here is that the feature only works if the external service stays available. What I've done here is created a new `*Manager` class called `HeartbeatManager` that based on code that already existed in ACE that sends a JSON payload to a configurable HTTP endpoint at a configurable interval. Think [webhook](https://en.wikipedia.org/wiki/Webhook). The immediate thing ACE servers could do with this is broadcast whether the server is up and how many players are online to services such as https://treestats.net. People are very interested in how many players are on each server but the TreeStats way of tracking [server populations](https://treestats.net/player_counts/) requires players on each server to run my Decal plugin. And even then, the temporal resolution of the population data depends on how many players are running the plugin. With my system here, ACE servers could send their `OnlineCount` to TreeStats at intervals and we'd all have much better data to look at. Some notes: 1. This PR isn't done, I'm having some issues figuring out default values in the config 2. The payload is hardcoded to send `WorldName` and `OnlineCount` but I think we could find some easy way to let users configure the Manager to send more info such as any config properties (xp rate, pk/npk, etc) or even information obtained from database queries such as total characters. 3. This type of approach could even be used to send webhooks to Discord servers, Google Sheets, etc 3. I'm open to another name. Maybe even `WebhookManager` What do you all think? I'm open to both thoughts on the concept as well as specific comments on the PR. | 2021-02-04T06:18:53Z | 2021-02-09T00:23:06Z | ba6b69b64db09829c7d198ce7d83d19326b63737 | 1 | 52fb5cb89ccef5304f6b9f3b3ef00acefd226843 | 9b1086786f619f11383bb16737c63acc2ce5ba8b | CONTRIBUTOR | 79078680 | https://github.com/ACEmulator/ACE/pull/3446 |
Links from other tables
- 0 rows from pull_requests_id in labels_pull_requests