[MOD 1.1] Kafkatorio - live updating web map POC

Topics and discussion about specific mods
Post Reply
fredthedeadhead
Inserter
Inserter
Posts: 28
Joined: Mon Oct 18, 2021 6:13 pm
Contact:

[MOD 1.1] Kafkatorio - live updating web map POC

Post by fredthedeadhead »

I've been working on a proof-of-concept mod for a live updating web map. You'll be able to see your Factorio server from a browser, and see who's online and what they're building!

You can view the first iteration here: https://factorio.adamko.dev/

Image

If you want to try it out yourself, then connect to the server (the server address is factorio.adamko.dev). It will live update to show players, their positions, and the terrain tiles they've placed. So log on and place some concrete tiles - it should update within a minute.

I'm working on showing ore and buildings - I expect that will be available in the next week or so.

I'm also tidying up the code base so it's shareable. I don't have instructions for deploying your own map at the moment, as it's hardcoded for a single instance and it's not easy to set up. But for server admins all that is required is redirecting the Factorio server logs to a Kafkatorio server. For example, here's my Factorio server docker-compose.yml

Code: Select all

version: "3.9"

services:

  factorio-server:
    image: factoriotools/factorio:1.1.61
    ports:
      - "34197:34197/udp"
    logging:
      driver: syslog
      options:
        syslog-address: "tcp://localhost:12034"
        syslog-format: "rfc5424"
And that's it!

I'm really excited about sharing this. I've been working on it for a few months. So if you have any questions, please ask! I'd love to talk about it.

fredthedeadhead
Inserter
Inserter
Posts: 28
Joined: Mon Oct 18, 2021 6:13 pm
Contact:

Re: [MOD 1.1] Kafkatorio - live updating web map POC

Post by fredthedeadhead »

I've just updated the server with a new version - 0.8.0!

https://factorio.adamko.dev/

Image

Now buildings and ore is shown on the webmap. I've also significantly improved performance!

I'd appreciate it if anyone could give it a test (direct connect to the server at this address: factorio.adamko.dev)

The next step is to make this available for general server hosting.

User avatar
Sanqui
Factorio Staff
Factorio Staff
Posts: 268
Joined: Mon May 07, 2018 7:22 pm
Contact:

Re: [MOD 1.1] Kafkatorio - live updating web map POC

Post by Sanqui »

This is incredibly cool! I love web maps like this. The map being live is impressive by iteslf, but it might also be cool to have a slider to view the timelapse of changes.
ovo

fredthedeadhead
Inserter
Inserter
Posts: 28
Joined: Mon Oct 18, 2021 6:13 pm
Contact:

Re: [MOD 1.1] Kafkatorio - live updating web map POC

Post by fredthedeadhead »

Sanqui wrote:
Wed Jul 20, 2022 10:34 am
This is incredibly cool! I love web maps like this. The map being live is impressive by iteslf, but it might also be cool to have a slider to view the timelapse of changes.
Thanks!

A timeline is definitely possible! (making a platform that would allow for that sort of flexibility was my intention). All the raw data exported from Factorio (by the mod) is stored in Kafka, which keeps it ordered. All it needs is some clever Kafka Streams definitions to window the data, and then successively aggregate the windows. The harder part is developing a UI for that slider... I'm not a frontender!

User avatar
Sanqui
Factorio Staff
Factorio Staff
Posts: 268
Joined: Mon May 07, 2018 7:22 pm
Contact:

Re: [MOD 1.1] Kafkatorio - live updating web map POC

Post by Sanqui »

fredthedeadhead wrote:
Wed Jul 20, 2022 5:35 pm
A timeline is definitely possible! (making a platform that would allow for that sort of flexibility was my intention). All the raw data exported from Factorio (by the mod) is stored in Kafka, which keeps it ordered. All it needs is some clever Kafka Streams definitions to window the data, and then successively aggregate the windows. The harder part is developing a UI for that slider... I'm not a frontender!
Sounds great, I love that you're already storing all of the data! For a simple UI solution, I think you might be able to just use the range input element. Add a change event hook and you've got an interactive slider!
ovo

fredthedeadhead
Inserter
Inserter
Posts: 28
Joined: Mon Oct 18, 2021 6:13 pm
Contact:

Re: [MOD 1.1] Kafkatorio - live updating web map POC

Post by fredthedeadhead »

I've got a big update!

The Kafkatorio servers can now handle data from multiple Factorio servers at once. This means that I only need to have one instance of the Kafkatorio backend servers running, which can handle data from multiple Factorio servers.

I've also published the source code, including some instructions on how to get Kafkatorio running.

https://github.com/adamko-dev/kafkatorio/

Be warned that everything is still *very* rough around the edges.

Post Reply

Return to “Mods”