Move to Golang? #706
Replies: 18 comments
-
Is it worth setting up a discord or slack for this project for discussions and sharing or do we want to keep it all inside github? |
Beta Was this translation helpful? Give feedback.
-
I have one in the README if you'd like to have faster communication in there. I think this will be good to serve as somewhat of an audit as well for those who don't join. |
Beta Was this translation helpful? Give feedback.
-
I haven't used Go so I don't have any input as far as pros/cons, but I'll say I'd be interested in working in a Go codebase from a learning perspective. |
Beta Was this translation helpful? Give feedback.
-
If you want to replace puppeteer, this project could be a more powerful choice: https://github.com/go-rod/rod |
Beta Was this translation helpful? Give feedback.
-
I like the idea in order to gain performance and less resource consumption. About the cons regarding to build problems, we should release binaries for each platform, so will be easy for the end user to run the app. To avoid possible problems in regression we should write unit/integration tests. I don't have a lot of experience in go but this will be a good opportunity to learn go in depth. |
Beta Was this translation helpful? Give feedback.
-
Done relatively easy with Go build toolkit. Never got it to work with Node.js using pkg |
Beta Was this translation helpful? Give feedback.
-
I'd prefer sticking with node/JS. The cons you have listed don't seem to outweigh the pros. The pros themselves aren't even that substantial:
Cons:
|
Beta Was this translation helpful? Give feedback.
-
That being said, ultimately I believe that the biggest factor should be where you want to take this project. This a much larger factor than any of the pros/cons that 3rd parties have listed. If you want the widest userbase, Golang. |
Beta Was this translation helpful? Give feedback.
-
All very valid and fall under this category to me.
That makes me feel better 😄 Very thoughtful feedback, @benw25. I appreciate your input. |
Beta Was this translation helpful? Give feedback.
-
I'd like to point out that there are libraries like pkg which allow you to distribute a single executable which can still use outside resource (e.g. config file). Your users wouldn't need to download Node or any dev tools as they get bundled as needed. The downside is that the executable size is ~100MB. |
Beta Was this translation helpful? Give feedback.
-
Yeah, I played with |
Beta Was this translation helpful? Give feedback.
-
@jef Great idea, the only downside I see is that typescript / node is widely used with many more opportunities to have more people contribute. Alternative idea; could move the app to electron and just make it simply configurable for people, should reduce the noise on "why its not working on my machine". Thoughts? |
Beta Was this translation helpful? Give feedback.
-
You know, to go along with the electron idea, a simple SQLite database linked to a form with all the possible options could eliminate the need for a .env file. Or, if you wanted to go even lighter (though likely not faster), a simple fs read/update of a JSON file with the user's settings could do the same thing. Just set that options page as the first thing a user sees and then put a little settings icon somewhere to open it again. I'm not sure how far you want to go with this, but the JSON route would also make it pretty trivial to update the options with a simple API query if functionality is added or changed. It would be pretty cheap to host just the settings endpoint somewhere too, especially if it was getting pinged once per user/per day, it likely wouldn't go over a free tier of many hosting sites like Heroku, and it could probably run on a free tier AWS EC2 server. |
Beta Was this translation helpful? Give feedback.
-
Great point. By now, I think we will stick with TypeScript. I also believe this is the main reason why this project has grown to this size.
I don't have any experience with this, but would be awesome for packaging.
I'm actually working on this right now! It's all YAML based and requires no config at a minimum. Currently it should work with all the configuration outside of store related stuff. Eventually, I'd like to create a server that would add contributed links through a simplified view and go through approval that way. Basically meaning that streetmerchant can either use local config files or pull from an API. So you're basically right on par with where I think the next best move is! Look out for the branch |
Beta Was this translation helpful? Give feedback.
-
@jef I can't find the branch, is it normal? |
Beta Was this translation helpful? Give feedback.
-
I haven't published it yet. I will post again when I do! |
Beta Was this translation helpful? Give feedback.
-
oh ok sorry. thx |
Beta Was this translation helpful? Give feedback.
-
Published. Know that it is instable and has no documentation on how to use yet. I'll continue to work on it. Thanks! From here, let's keep this issue related to golang. Otherwise, feel free to browse https://github.com/jef/streetmerchant/issues/1217 and add issues to it. |
Beta Was this translation helpful? Give feedback.
-
Description
There are many reasons why we would either stay with TypeScript or move to Golang. I want to describe a few pros and cons and leave this up to discussion.
Pros
Cons
I'd like to get some feedback and if enough contributors are fans of this, perhaps we'll start refactoring.
I already have some refactoring in mind for stores, but I'd like to hold off on that if we decide to move to Golang.
Beta Was this translation helpful? Give feedback.
All reactions