GochoMugo / tgfancy

A Fancy, Higher-Level Wrapper for Telegram Bot API
MIT License
184 stars 16 forks source link

Add fanciness: Virtual Hosting (to host multiple bots on same port) #9

Closed ohenepee closed 7 years ago

ohenepee commented 7 years ago

Using node-http-proxy from nodejitsu would be awesome!

GochoMugo commented 7 years ago

Are we responsible for creating the multiple bots?

ohenepee commented 7 years ago

Yes!!

GochoMugo commented 7 years ago

So, basically this would entail the library spawning a new process for each of the bots, automatically configure the master process to proxy to these new child processes, and manage these children like any decent process manager i.e. restart failed process etc.

We might decide to integrate a process manager, such as PM2 or forever, and use a proxy library for that. But don't you think it is too much work and effort on the part of the parent process. I would highly suggest that you use dedicated utilities, such as NginX for proxying, PM2 or Docker for process management, etc. Such utilities are focused on providing their respective utilities in a depth that I do not believe this library would be able to achieve.

Is this feature really really necessary. I think it is nice fanciness but too expensive for our taste :wink:. Otherwise, thanks for your interest in this feature.

ohenepee commented 7 years ago

Well, one part I think and love about frameworks is not to over-configure and not to be over-dependent.. I mean its always better to have a single tool for everything, than NodeJS, Docker, NginX :(

GochoMugo commented 7 years ago

And I agree a better user experience may be offered by a framework, until you want to switch one of the inner component with a better one.

Sorry, if you are hoping for a complete solution with tgfancy, you will not find it here. Sorry. Closing this now.