owenthereal / godzilla

Godzilla is a ES2015 to Go source code transpiler and runtime
https://github.com/jingweno/godzilla
MIT License
1.48k stars 31 forks source link

Create Rational #8

Open AustinHunt opened 7 years ago

AustinHunt commented 7 years ago

Please explain the reason this is useful.

bmcminn commented 7 years ago

As a web developer, it would be useful for the scheduled reporting module in my Express app to leverage a compiled langauge (eg: Golang) as JS is pretty slow at this type of work in large data sets. The service I work on has 1500+ users and their nightly reporting jobs already takes 5-30 minutes in Node; though this is also poorly optimized legacy code prior to me inheriting the codebase.

Instead of rewriting my whole analytics module in Golang, I can break out my analytics module and transpile its Golang counterpart and deploy where needed.

I personally see this as more of a stopgap in my workflow to get things done while still learning the ins and outs of Golang proper,

joseluisq commented 6 years ago

In my opinion, godzilla could be useful if you want to reuse JS packages or apps but in native compiled code (Go binary). Although, if you have possibility to migrate your slow JS app, writing it entirely in Go. In the end, you will have a single Go binary that it can run faster than slow-interpreted JS and deploy it anywhere easily.