7 ms·
Hi, very interesting project! Two meta-question: 1) how was your experience of changing the code from Python to Go, did it feel ok or have you had major headac
by UserRights 11y ago
Hi, very interesting project! Two meta-question:
1) how was your experience of changing the code from Python to Go, did it feel ok or have you had major headaches?
2) Why didn't you choose Elixir, there are already massively scalable messaging servers in Erlang and it looks like the best choice for a project like this?
Thanks!
- FZambia 11y agoHi! 1) It was very interesting and challenging sometimes. I remember several difficulties during migration: many usages of interface{} values at first stages which then be replaced with more strong types, several possible races which Mr Klaus Post (https://github.com/klauspost https://github.com/klauspost) helped to find, he also noticed at some problems in code style and channel buffer overflow problem. But the greatest part of this migration is that I don't need anymore think "Is library I use non-blocking or not?" as Go's built-in concurrency allows to use all libraries written for language. And also after Tornado it's great to have tools to inspect active goroutines. I also personally don't like how many locks I use at moment - I hope to refactor several parts of code to use channels for synchronization. 2) Elixir is great, but unfortunately I had no experience with it - just read several articles. Centrifugo is not massively scalable at moment - it does not support Redis cluster yet - this is an area for investigating. So now it is limited to Redis throughput and suites well for small or medium projects. So the answer here: Erlang is absolutely great for software like this but I have chosen a language in which I could implement all that needed in a reasonable time. Go has also its unique features so at moment I am pretty happy that I started migration.
- d_luaz 11y agoIt would be great if you write of blog post about your experience in migrating Centrifugo from Python to Go.
- UserRights 11y agoThank you very much for your answers. Like d_luaz I would like to suggest to write a blog post about your ups and downs with the migration journey, would be absolutely interesting! Have a nice jump into the coming week!