#Selfhosting?

1 messages · Page 1 of 1 (latest)

wraith mirage
#

Is the self-hosting of the bot available? I can't find its source

#

Mod description claims to be decentralized but also mentions a central communication server? Which part is correct?

pallid apex
wraith mirage
#

I see, good luck! Would love to use the mod once I can deploy all parts by myself

pallid apex
wraith mirage
#

For sure, having easy deployment for non-technical users is nice, tho I believe that does make the mod non-decentralized, basically like any other saas where factorio just acts like a client

pallid apex
pallid apex
# wraith mirage For sure, having easy deployment for non-technical users is nice, tho I believe ...

Hmm, I see what you mean and you're right.

For now, it works like a “traditional” SaaS, where Factorio acts as the client and a local agent acts as a bridge.

The term “decentralized” is vague and inaccurate in this case. A more accurate description would be an agent-based distributed architecture with a central control plane (but it's a little bit long aha ^^').

What I really meant is that the heavy tasks are executed locally and the installation remains simple and automated (thanks to the shell installer) for non-technical users.

Once the project is open-source, full self-hosting will be possible, but for now your description is accurate.

winter otter
# wraith mirage For sure, having easy deployment for non-technical users is nice, tho I believe ...

As a python dev, I only know of discord.py to implement discord stuff. But that's basically just a way to interface a discord bot/app with something.
Nothing prevents you from making your own discord bot yourself and tie it to a local client of your making. It's quite easy, in fact, although discord.py can be a bit painful sometimes.

The "hard" part is what the factorio mod part does. You cannot easily extract stuff from Factorio, so you have to serliaze it in a json, be it a log file you'll write, or just store it in memory, and plan for ways to get it from the rcon interface.

#

I've been doing a similar project on my own but dropped most of the discord functionalities because I didn't see who would want that (and focussed on the local service). The idea to have a microservice that is a local client just being the intermediary between the server using rcon interface and the discord bot makes sense. This way, you can use it with discord, but also many other things.

#

Meaning that the local client and the discord bot could be two entirely different projects.

#

Anyways, even tho (no offense intended) I don't see much use for such discord bot (as for now), that's a very cool study project because it involves all the parts most devs will face in their professional life. Making vastly different systems interact with one another through APIs that you can maintain is an excellent exercise.

wraith mirage
pallid apex
#

The API and API agent are not useful in this case.

As for extracting Factorio avents, FactoriCord may already be doing the extraction work in JSON files, so you just need to connect your own bot or any other interface.

#

In my case, I plan to add Factorio server management features from Discord (start, stop, restart, change save, change mod, status, etc.).

To do this, I need to open a secure websocket between the agent and the API (in order to be in real time).
As for Discord <-> Factorio chats, it will be the same thing: a websocket between the API and the agent + a Redis pub/sub between the API and the Discord bot.
Furthermore, with this deisng , I could add a web managment panel in the future.
This means that the suite would have two user interfaces, the bot and the panel, which interact with the API.

But for someone who wants to host everything, the agent and API are no longer useful, and the bot can handle the direct connection.
Unless you want to build the bot as an interface, in which case you need to think about an intermediary service to link Factorio and the bot.

pallid apex
winter otter
#

Well I could be interested in contributing in the future. As I said, I worked on (very) similar stuff recently but didn't publish it.
There is no real point providing the same service twice

#

I'm sure some people would appreciate the tool, I hope you didn't take offense of what I said. I decided myself to not pursue my similar project because I thought i'd be too niche, but that's my own opinion. What you are doing is cool nonetheless

pallid apex
# winter otter Well I could be interested in contributing in the future. As I said, I worked on...

If you want to contribute, you're welcome to do so ^^
I'll open contributions from June / July (after my exams).
As for the stack, I think it will be fine for you, as you say you're a Python developer.

  • Discord bot : Python (discord.py)
  • API agent : Python
  • Mod : LUA
  • API : PHP (Symfony)
  • Web panel : will be in React TS + shadcnui

The majority of the contributions to open source will be for self-hosting, so mainly the Python bot needs to be reviewed.