Live data from Hacker News

Docker, Django, Traefik, and IntercoolerJS: My go-to stack for building a SaaS

simplecto.com

31–40 of 347 posts

Re: Docker, Django, Traefik, and IntercoolerJS: My go-to stack for building a SaaS

#31
post #26

Can anyone answer why python is a choice anymore instead of i.e. golang for saas applications like this? I previously worked heavily with ruby and I cannot imagine building beyond >1000 LoC in interpreted, dynamically typed languages. Aside from developer familiarity which trumps all other points. It's also significantly easier to dockerize a generated binary from golang or rust, etc. Some of my worst docker headache…

It's more Django than Python specifically. Does Go (genuinely) have something to match?

> Does Go (genuinely) have something to match?

To the extent of django or rail's maturity and features, likely not, although I don't know what features you use django for. I guess this answers my question to an extent.

Last time I worked with golang I used gin and xorm, but there were some things I had to manually do. That being said, I find rails to be an enormous beast that provides a lot of things that one may or may not need.

In my experience, working with golang and rust, which are compiled and statically/strongly typed have saved me headaches and time even with having to hand-roll some features.

Re: Docker, Django, Traefik, and IntercoolerJS: My go-to stack for building a SaaS

#32

Can anyone answer why python is a choice anymore instead of i.e. golang for saas applications like this? I previously worked heavily with ruby and I cannot imagine building beyond >1000 LoC in interpreted, dynamically typed languages. Aside from developer familiarity which trumps all other points. It's also significantly easier to dockerize a generated binary from golang or rust, etc. Some of my worst docker headache…

> I cannot imagine building beyond >1000 LoC in interpreted, dynamically typed languages

Many have imagined and built valuable stuff in interpreted, dynamically typed languages before you, by being more focused on overall structure and making sure it's strict and resilient. One really doesn't have to search far for successful applications that are certainly way beyond 1000 LoC and still iterate pretty quickly for their size.

> significantly easier to dockerize a generated binary from golang or rust

Not sure the verboseness of either golang or rust would be worth it if you compare it with python. If you're just launching, your focus should not be on performance or how easy it is to dockerize but to figure out who your user really is. Scaling and deployment issues will happen much further down the road, and iteration speed is more important in the beginning as you have many changes. Your architecture needs to reflect this too, and dynamically typed languages (arguably) makes it easier to change things, as long as you know what you're doing.

But together with that, you are eventually gonna have to start leveraging more languages, as you have programmers working on different levels of the overall architecture. Some fit for some tasks, and when it comes to quickly launching and iterating on SaaS businesses, dynamically typed languages are a pretty good fit.

In the end, I don't really think dynamic/static typing is the most important consideration, that's such a small part of what you have to think about overall.

Re: Docker, Django, Traefik, and IntercoolerJS: My go-to stack for building a SaaS

#33

Can anyone answer why python is a choice anymore instead of i.e. golang for saas applications like this? I previously worked heavily with ruby and I cannot imagine building beyond >1000 LoC in interpreted, dynamically typed languages. Aside from developer familiarity which trumps all other points. It's also significantly easier to dockerize a generated binary from golang or rust, etc. Some of my worst docker headache…

What's the Django/Rails equivalent in Go? The value from Python isn't Python itself (though it might be easier to write in - trading off reliability for ease of use compared to a compiled language) but the ecosystem. Fully-featured frameworks such as Django, Rails, etc give you lots of functionality out of the box which is very valuable especially at the early stages of the project where performance isn't a concern y…

"(though it might be easier to write in - trading off reliability for ease of use compared to a compiled language)"

I find the "ease" is overstated compared to time spent debugging issues in production, but that is a separate discussion.

See my comment in the sister thread about the django/rails equivalent.

Re: Docker, Django, Traefik, and IntercoolerJS: My go-to stack for building a SaaS

#34
post #22

I like the simplicity of the asynchronous tasks. The author mentions it's just a sleep and he isn't kidding: https://github.com/simplecto/screenshots/blob/master/src/sho... Of course, this only really works when you're not worried about multiple workers for the same "queue", etc. Still, simplicity is key -- don't build for scale just because you think you might be there in X years. I like your style!

Thanks for the kind words. I should update the part about the queues. I started using this pattern for SKIP LOCKED and it works well for multiple workers (search engine crawlers).

https://www.2ndquadrant.com/en/blog/what-is-select-skip-lock...

And implemented in Django:

https://docs.djangoproject.com/en/3.1/ref/models/querysets/#...

Re: Docker, Django, Traefik, and IntercoolerJS: My go-to stack for building a SaaS

#35

Can anyone answer why python is a choice anymore instead of i.e. golang for saas applications like this? I previously worked heavily with ruby and I cannot imagine building beyond >1000 LoC in interpreted, dynamically typed languages. Aside from developer familiarity which trumps all other points. It's also significantly easier to dockerize a generated binary from golang or rust, etc. Some of my worst docker headache…

Django drives the choice here. Batteries included, huge community support, and AMAZING documentation. Half the software I write is from stackoverflow. LOL I dont see dockerizing as a problem. Once copied out from my template I never think about it. I do admit that familarity with the underlying Image OS (Debian in this case) makes debugging / fussing about a non-issue.

For local development that debian container is fine but for production you want something small like scratch or alpine. The fewer binaries in the container, the better and more secure.

This is one of the benefits of golang. You compile it into a binary and copy just the binary into your scratch container. Maybe it is 20MB in size.

Re: Docker, Django, Traefik, and IntercoolerJS: My go-to stack for building a SaaS

#36

Can anyone answer why python is a choice anymore instead of i.e. golang for saas applications like this? I previously worked heavily with ruby and I cannot imagine building beyond >1000 LoC in interpreted, dynamically typed languages. Aside from developer familiarity which trumps all other points. It's also significantly easier to dockerize a generated binary from golang or rust, etc. Some of my worst docker headache…

> I cannot imagine building beyond >1000 LoC in interpreted, dynamically typed languages

That would include Ruby, Python, PHP, and JS. GitHub, Shopify, Wordpress, Instagram, Pinterest, Reddit, significant parts of Netflix (Node), Facebook, just off the top of my head.

And you can’t imagine writing > 1000 LOC of a startup SaaS product in any of them? Really?

Re: Docker, Django, Traefik, and IntercoolerJS: My go-to stack for building a SaaS

#37
post #26

Earlier quoted context omitted.

It's more Django than Python specifically. Does Go (genuinely) have something to match?

> Does Go (genuinely) have something to match? To the extent of django or rail's maturity and features, likely not, although I don't know what features you use django for. I guess this answers my question to an extent. Last time I worked with golang I used gin and xorm, but there were some things I had to manually do. That being said, I find rails to be an enormous beast that provides a lot of things that one may or…

It’s often better to have something you may not need than have not something you may need, especially for projects you intend to grow, iterate on, and possibly pivot. If my experience has taught me anything, I can never assume what I don’t need in the future. Most features come with Django and Rails almost for free (the only downside being some additional deployment size), so why not.

Re: Docker, Django, Traefik, and IntercoolerJS: My go-to stack for building a SaaS

#38

Can anyone answer why python is a choice anymore instead of i.e. golang for saas applications like this? I previously worked heavily with ruby and I cannot imagine building beyond >1000 LoC in interpreted, dynamically typed languages. Aside from developer familiarity which trumps all other points. It's also significantly easier to dockerize a generated binary from golang or rust, etc. Some of my worst docker headache…

> I cannot imagine building beyond >1000 LoC in interpreted, dynamically typed languages Many have imagined and built valuable stuff in interpreted, dynamically typed languages before you, by being more focused on overall structure and making sure it's strict and resilient. One really doesn't have to search far for successful applications that are certainly way beyond 1000 LoC and still iterate pretty quickly for the…

That is a double edged sword. Sure, that dynamically typed language of python or ruby might be quick to develop on but they often contain a lot of surprising bugs.

Compilers catch a lot of bugs before your software is in production.

Re: Docker, Django, Traefik, and IntercoolerJS: My go-to stack for building a SaaS

#39
post #26

Can anyone answer why python is a choice anymore instead of i.e. golang for saas applications like this? I previously worked heavily with ruby and I cannot imagine building beyond >1000 LoC in interpreted, dynamically typed languages. Aside from developer familiarity which trumps all other points. It's also significantly easier to dockerize a generated binary from golang or rust, etc. Some of my worst docker headache…

It's more Django than Python specifically. Does Go (genuinely) have something to match?

Never used it but there's a port/clone of Django in Go called Beego (https://beego.me/).

Re: Docker, Django, Traefik, and IntercoolerJS: My go-to stack for building a SaaS

#40

Can anyone answer why python is a choice anymore instead of i.e. golang for saas applications like this? I previously worked heavily with ruby and I cannot imagine building beyond >1000 LoC in interpreted, dynamically typed languages. Aside from developer familiarity which trumps all other points. It's also significantly easier to dockerize a generated binary from golang or rust, etc. Some of my worst docker headache…

> I cannot imagine building beyond >1000 LoC in interpreted, dynamically typed languages Many have imagined and built valuable stuff in interpreted, dynamically typed languages before you, by being more focused on overall structure and making sure it's strict and resilient. One really doesn't have to search far for successful applications that are certainly way beyond 1000 LoC and still iterate pretty quickly for the…

"If you're just launching, your focus should not be on performance or how easy it is to dockerize but to figure out who your user really is."

I agree here but I should note that my main focus is spending less time debugging errors at runtime and in production, and avoiding errors in the first place. This is primarily why I use rust.

"Not sure the verboseness of either golang or rust"

Verbosity has nothing at all to do with implementing good, robust code. You could do it in python, rust, or another language. With certain languages you don't have to spend time writing guard code because it's handled natively by the compiler, type system, or both.

" dynamically typed languages (arguably) makes it easier to change things,"

They make it easier to change things, not necessarily correctly. With modern IDEs refactoring is not an issue.

"Many have imagined and built valuable stuff in interpreted, dynamically typed languages before you, by being more focused on overall structure and making sure it's strict and resilient. One really doesn't have to search far for successful applications that are certainly way beyond 1000 LoC and still iterate pretty quickly for their size."

I am aware of this, but I can't help but wonder if they would be able to iterate much more quickly knowing that the compiler and type system eliminate entire classes of bugs. Sure, you might be able to get to running code a little bit faster, but if you have to spend time guarding it and debugging runtime errors... is it really faster?

===

There seems to be this mindset that being fledgling startup means no time for silly things like types or compilation, etc, only iteration. If one actually does their market research and figures out who their users are and what they want, one should be able to iterate just as quickly in i.e. golang or another compiled language with a healthy ecosystem.

I have not worked at a FAANG company or a company even remotely the size of those companies, but I have created and maintained somewhat large ruby on rails codebases. Debugging runtime errors became my bane, especially when I could not guarantee that the persons writing the ruby code were following modern practices (or any practices at all). Not that I think compilers are perfect, but they -do- catch so many errors, some of which may have made it into runtime.

Post reply on HN