News for hackers. Stuff that matters.
Re:Startup CTO – Premature Scaling by bpicolo on Monday May 08, 2017 @08:58AM (#14291080)
One of the big ones: For a small startup, granular microservices are often very premature, and will slow you down rather than speed you up.
Re:Startup CTO – Premature Scaling by curun1r on Monday May 08, 2017 @01:06PM (#14293473)
The "how" really matters when deciding between microservices and a monolith. For instance, pumping out a bunch of Lambda/API Gateway web endpoints that back a static site served out of S3 or some other static hosting service would qualify as a microservices approach and yet is a huge time saver during the experimentation phase. No worrying about ops, monitoring or anything else off the list of overhead issues that isn't building your product. But if Microservices means configuring servers/clusters, service discovery and such, it actually adds to your overhead list and you're right that it will slow you down.

To my mind, services like Lambda are perfect for startups. In addition to scaling down, costing nothing when unused and allowing rapid iteration with zero operational concerns, they largely scale up and, in the unlikely event that the startup is wildly successful, they'll handle almost any load you throw at them until you've had time to re-engineer the backend to be more economical for the increased load.

Re:Startup CTO – Premature Scaling by davidlee1435 on Monday May 08, 2017 @01:32PM (#14293709)
I'm currently in the experimentation phase and I find FaaS to be a blessing. I'm currently using Google Cloud Functions since I hooked the initial app (which has a real-time messaging component) to Firebase and it's saved so much time wrt overhead.
Re:Startup CTO – Premature Scaling by tedmiston on Monday May 08, 2017 @05:07PM (#14295617)
Serverless microservices, some call these nanoservices / functions as a service / microservices as a service, like AWS Lambda are definitely a distinct lighter weight category because you're not managing apps or servers to support them.
Re:Startup CTO – Premature Scaling by swsieber on Monday May 08, 2017 @09:16AM (#14291177)
This should get more emphasis.

Microservices do require more overhead. Additionally, they require you to be familiar enough with you business logic to know where you boundaries lie - changing abstraction boundaries is much harder with microservices than with a monolith.

I think that while they are great for scaling, they are a lot harder to use to successfully get off the ground (though I'm betting that there are places that have successfully done so)

Re:Startup CTO – Premature Scaling by ben_jones on Monday May 08, 2017 @09:39AM (#14291335)
You also have to know how to "do" microservices. Whether it's incorporating message queues like RabbitMQ, protocols like gRPC, etc., it's very hard to get right the first time by winging it without previous experience. Redesigning microservices after is a PITA.
Re:Startup CTO – Premature Scaling by mcginleyr1 on Monday May 08, 2017 @11:03AM (#14292098)
100% agree. Your path is based on your teams experience and capabilities, not trends.
Re:Startup CTO – Premature Scaling by jlebrech on Monday May 08, 2017 @11:39AM (#14292518)
write the MVP in Rails or Django and scale things that need scaling later.

you can scale the base app by giving it more hardware, but when you have to batch process lots of stuff then think of services (most of the time you can just split that to another server).

Re:Startup CTO – Premature Scaling by enraged_camel on Monday May 08, 2017 @01:38PM (#14293756)
>>write the MVP in Rails or Django and scale things that need scaling later.

There's a new alternative: write it in Elixir/Phoenix. You'll get the same productivity benefits with none of the performance trade-offs. Elixir apps are reliable and concurrent by default, and the Phoenix framework has none of the "magic" that Rails has, making it very developer-friendly. :)

This isn't to say that Elixir/Phoenix are perfect. The ecosystem isn't as mature as that of Ruby/Rails, so finding answers to questions can take a bit longer. But that is changing quite quickly.

Re:Startup CTO – Premature Scaling by bpicolo on Monday May 08, 2017 @02:21PM (#14294186)
This is one where opinions are widespread and mostly the choice doesn't matter so much, hah.

Fwiw, I've been pretty intrigued by the idea of dotnet on linux lately (integrates with postgresql and everything). dotnet isn't exactly hip, but C# is fast and it's mature (and has some pretty dope functionalish features. You can run F# if you want to, too). Planning to try how well this works in practice soon.

There are things I like a lot about Elixir, but also plenty that I'm not quite a fan of.

Re:Startup CTO – Premature Scaling by draw_down on Monday May 08, 2017 @05:14PM (#14295673)
What's really important in this context is building something quickly. That's why GP mentioned Rails and Django; they come with many things either built in or built by community, so you can focus on building your first version quickly. To the extent that is true with other tools or frameworks, sure, go for it.
Re:Startup CTO – Premature Scaling by tedmiston on Monday May 08, 2017 @05:17PM (#14295699)
I've been wanting to get into Elixir / Phoenix. The biggest tradeoff there seems to be the developer productivity tradeoff you mentioned — the package ecosystem is still pretty immature.
Re:Startup CTO – Premature Scaling by bpicolo on Monday May 08, 2017 @11:46AM (#14292586)
> most of the time you can just split that to another server

Yeah. A starting monolith, some cronnish way to run batches, and some way to listen to queues goes a long way.

Re:Startup CTO – Premature Scaling by wolco on Monday May 08, 2017 @02:09PM (#14294075)
The application layer is rarely the piece that needs to scale immediately. Usually the first step is to separate mysql or mongo and add more resources or further cluster as visits increase.

There is a case to made to switch ruby/rail for php/laravel. Just as rapid for development and easier scaling plus bigger ecosystem. There is also a case to be made for switching Django for vue or even simple jquery in some cases.

Re:Startup CTO – Premature Scaling by gotchange on Monday May 08, 2017 @11:14AM (#14292206)
I totally agree that one should start with a monolith and when he feels confident that all bases were covered in the codebase, he can begin to worry about breaking up the monolith into microservices.

This growth journey makes more sense than starting out the door working on your microservices before business logic as this is like putting the cart before the horse.

Re:Startup CTO – Premature Scaling by ProblemFactory on Monday May 08, 2017 @01:26PM (#14293656)
Even then, I have a feeling that people jump too quickly from a "messy monolith" to microservices.

Instead, people should start splitting up the monolith into sensible modules and libraries. Instead of a "user accounts microservice", start with a "user accounts library" with a well-documented API that stays in the main codebase and is deployed as part of the rest of the app.

Re:Startup CTO – Premature Scaling by tedmiston on Monday May 08, 2017 @05:05PM (#14295601)
I've experienced this one firsthand as well.

Microservices sound ideal at first because it's easy to not see that the brunt of the effort is not writing the first version but monitoring, maintaining, and handling when some go down. By using microservices one introduces additional edge cases that don't exist in a "monolith". Quotations around monolith because I believe startups use it with some exaggeration. For example, a Django project of ~10k LoC might be composed of 15 separate Django apps behind one API and I don't see this as monolithic.

Re:Startup CTO – Premature Scaling by vojant on Monday May 08, 2017 @09:26AM (#14291245)
That really depends on the startup, and sometimes starting with micro-services helps with hiring - In our case thanks to starting with micro-services we hired developers knowing different programming languages and they can work together on the project by exposing end-points/consumers. Of course I wouldn't recommend doing that for everyone but in our use-case we had to start with distributed system anyway due to quite complicated domain.
Re:Startup CTO – Premature Scaling by bpicolo on Monday May 08, 2017 @10:28AM (#14291727)
Even with microservices, I wouldn't recommend changing languages between the bunch without a very good reason. You -will- build up infrastructure and packages that are language and stack specific: monitoring, logging, helpers, etc. that take a lot of time to reinvent.

If you're switching languages/stacks just for funsies, you're going to make services more difficult to maintain over time (and just generally slow down development)

As far as languages go, pick one. When you hit a problem that absolutely cannot be reasonably solved under the specifications you care about, consider a different one for that service. Apart from that, there's little value, and lots of overhead, in moving. Getting to write that one Haskell microservice is sure a romantic idea, until that employee leaves and nobody knows Haskell anymore, and suddenly the service is dysfunctional because dependencies have changed. (For non-mission-critical funsies, sure, use whatever, though non-mission-critical apps tend to have a knack for becoming very important for workflows, hah)

Re:Startup CTO – Premature Scaling by vojant on Monday May 08, 2017 @11:06AM (#14292120)
That's a good comment and of course there is a list of approved stacks (not random list of languages) and we try to think about future. Hiring people wasn't our only reason and we had technical reasons to go with micro-services and multiple languages, but it was nice perk.
Re:Startup CTO – Premature Scaling by bsder on Monday May 08, 2017 @11:23AM (#14292303)
Sometimes.

Having nice hard boundaries that you can't just penetrate can aid and abet you in debugging.

It also probably helps you with respect to managing security.

As in most things, good judgement is key.

Re:Startup CTO – Premature Scaling by romanovcode on Monday May 08, 2017 @09:48AM (#14291391)
Not to mention longer development time.