I'm working on rewriting the front-end (which is Django + Python + HTML + JS) in Go (making it Go + HTML + JS).
The reasons for doing so:
Django changes too often and we're on an old version, upgrading is horrible and 3rd party modules are likely broken
Django has had too many security issues (they have been patched but the regularity that they've occurred is a concern)
Django was originally chosen as it was hoped it would encourage people to contribute code, but they have not
Python isn't my primary language and I am wary of making changes
Go on the Microcosm API has been rock solid, performed brilliantly and has been pain free to keep constantly up to date
Go is easier to monitor
Go is my primary language and it is easier for me to make changes
What I'd like to do is simply replace the Django/Python bit with Go. Whilst leaving the HTML and JS alone right now, but obviously as the template language changes the HTML templates will need converting.
Eventually I'd like to merge in the API stuff... to give a single code base for everything, and yet it could still be deployed as separate front-end and back-end if needed.
I've got a working home page already done, laid out the skeleton of the project, and it's possible to spin it up and login to a site, view the home page as logged in and then log out.
I'm seeing some hugely impressive numbers too.
For a guest viewing the home page (generation time of HTML and sending over the wire to a local browser):
Django = ~450ms
Go = ~12ms
That's basically because I can control caching internally far better.
For a logged in user viewing the home page:
Django = ~600ms
Go = ~250ms
I should be able to get that faster... perhaps down to ~150ms... by running requests concurrently.
This is an FYI post... I'm going to update this thread with progress. Once converted I'll go back to adding features.
I'm working on rewriting the front-end (which is Django + Python + HTML + JS) in Go (making it Go + HTML + JS).
The reasons for doing so:
What I'd like to do is simply replace the Django/Python bit with Go. Whilst leaving the HTML and JS alone right now, but obviously as the template language changes the HTML templates will need converting.
Eventually I'd like to merge in the API stuff... to give a single code base for everything, and yet it could still be deployed as separate front-end and back-end if needed.
To this end, there's a new repo:
https://github.com/buro9/microcosm
I've got a working home page already done, laid out the skeleton of the project, and it's possible to spin it up and login to a site, view the home page as logged in and then log out.
I'm seeing some hugely impressive numbers too.
For a guest viewing the home page (generation time of HTML and sending over the wire to a local browser):
That's basically because I can control caching internally far better.
For a logged in user viewing the home page:
I should be able to get that faster... perhaps down to ~150ms... by running requests concurrently.
This is an FYI post... I'm going to update this thread with progress. Once converted I'll go back to adding features.