lubien / elixir-telegram-bot-boilerplate

A boilerplate for making telegram bots with Elixir and Nadia
MIT License
145 stars 20 forks source link

Publish as hex package #17

Open sascha-wolf opened 5 years ago

sascha-wolf commented 5 years ago

I think this project would benefit from being published as a hex package.

IMO the current structure is not fully suited for publishing just yet. For example the global nature of the poller and matcher would make defining multiple bots impossible. As a solution it might make sense to consider an approach similar to an Ecto.Repo where configuration lives for a certain repo which then gets supervised and takes care of it's processes.

What do you think? I'm maintaining two small libs already so I would be happy to assist.

lubien commented 5 years ago

I've actually started tinkering an pkg version of this app with some improvements over lessons learnt tho I don't think I can focus on this right now as I'm concurrently distributing time between some projects already.

But I can come back to this issue next month for sure.

sascha-wolf commented 5 years ago

If you do I think you should reconsider the send_message approach of spawning a task for each one.

Instead some kind of worker pool, for example using gen_stage, might be preferable.

HTTP connections are limited after all.

v0idpwn commented 5 years ago

Hacktoberfest project, @lubien? :grinning:

lubien commented 5 years ago

Hey that's a pretty good project. Wanna go for it?

v0idpwn commented 5 years ago

I'll do the best I can, but I'm no expert. :)