If anyone has any advice for me, I would greatly appreciate it. I'm trying to write a program in Go, with a goal to keep it modular.
It's basic goal is to do two things:
1. Gather data from a public API and cache it in a database, occasionally refreshing this data.
2. Communicate with certain chat services as a bot, accepting queries for data and, for some of the info, sending notifications via those bots when there is a status change.
My idea was to split it into three portions.
1. API: a Golang library for the specific API I am tracking. I've actually done this already.
2. Engine: uses my API library to get data, store it in a database. Also accept queries from the Clients below to return data (e.g. is ___ online right now?) then send back what the Client should send to its service (e.g. Discord or IRC). Also, it needs to keep track of status changes (e.g. ___ has just gone offline, tell the IRC Client to send a message saying that).
3. The Clients: ...
I guess, I'm just trying to figure out how I could have multiple of these bot handling programs communicate with one backend for it.
Ideally, this would all be using a Go embedded database instead of some external db like MongoDB.
Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.