Live data from Hacker News

After reading “Rails is yesterday’s software”, I need to reply

codethinked.com

191–200 of 219 posts

Re: After reading “Rails is yesterday’s software”, I need to reply

#191

Earlier quoted context omitted.

These things depends a lot on how you build an app, too. All our webapps these days are thin React apps (with server-side rendering) that don't have a dedicated backend. Instead, they talk to a group of generic microservices. We've been doing this style of development since around 2010. With this methodology, a lot of Rails' ergonomic concerns (templating, the split between rendering HTML vs. data, etc.) just melt aw…

I'd love to know more about your webapp methodology. It sounds wonderful.

The current implementation is nothing special. However, I'm quite happy with our methodology itself.

We use a simple microservice design: All our microservices talk using JSON over HTTP. They share nothing. Everything is done by communicating. There's also an event bus so they can listen to each other's events. All our microservices are multitenant by design, so that they can support any product with no data spillover.

We have a bunch of general-purpose microservices built out to service our particular needs. User-facing webapps are built entirely out of these building blocks. They don't need to deal with login or OAuth; there's a microservice for that. Similarly, almost all data is stored in a single document-oriented data store (which we've heavily rearchitecting in Go and will soon release as open source — email me if you want to be notified) on top Postgres and Elasticsearch. For anything that we need from a webapp, we build a microservice. (We have a lot of older Ruby and Node stuff, but all our new microservices are written in Go, which has been a very pleasant experience.)

One key component of our development workflow is the use of a Linux virtual machine that each developer runs locally. It hosts the exact same stack (and uses the same deployment system) as our real production and staging environments. This lets the developer focus on work and not on how the microservices are run. It's not pain-free, but we have made it quite comfortable, among other things through a seamless system of mounting, where the code running on the VM for a particular app is using the developer's own project folder on the host machine. Hot code reloading is also enabled where possible. So a React app will automatically bundle with Babel and so on when you reload a page.

There are challenges to using microservices in this way. One is deployment and hosting. We currently have our own homegrown system for this that works fine, but hope to migrate to Kubernetes soon. Another challenge is documentation. In the end, the code (and project readmes) is the authority on how a particular microservice works and what APIs it implements; we did automatically generate API docs at one point, but it hasn't kept up with our Go projects. These days we just refer to the code. The most painful aspect of this, and onboarding, is documenting the cross-cutting, "big picture" concerns.

I'd be happy to answer any other questions you might have.

Re: After reading “Rails is yesterday’s software”, I need to reply

#192
post #89
post #34

Earlier quoted context omitted.

And he didn't point out how any of his "todays languages" are any better at avoiding dependency hell.

Go statically compiles everything into a single binary. I'm not sure what is meant by "dependency hell", but this at least simplifies the runtime story.

> simplifies the runtime

That has been a solved problem in ruby for a long time. Bundler[1] (or similar tools) does the equivalent of static compilation by copying[2] all of the dependencies into the project and statically loading[3] them.

[1] http://bundler.io/rationale.html

[2] http://bundler.io/v1.12/bundle_package.html

[3] http://bundler.io/v1.12/man/bundle-exec.1.html#ENVIRONMENT-M...

Re: After reading “Rails is yesterday’s software”, I need to reply

#193

Earlier quoted context omitted.

First, thanks for taking the time to answer my question, I'm at my day job (I program at night) so I can't do much research >correct a lot of core issues that come up long term with Rails. I've never gotten to this point, what are some of these issues? From reading comments here, it seems like dependency hell could be one, but what do you think? I've had issues in my short time with outdated gems, but I don't know if…

Dependency hell is s big one. Monolith syndrome is another and one of the huge perks of Elixir is that it forces you to build in a way that makes separating out parts later on much simpler. Performance is "the" major one because it's one of those things that you just can't overcome easily with Ruby. Usually that leads long term to refactoring a part of your system in another language like Go just for performance sake…

Thanks a lot. I'm going to research this once I get home. You may have just saved my future project time/money.

Re: After reading “Rails is yesterday’s software”, I need to reply

#194
post #142

why do most people only see the extremes? you don't have to use bleeding egde libs instead of rails... hapi instead of koa react instead of cycle ember instead of react etc...

Because we do love them, just like Vim vs Emacs, PHP vs Ruby, Go vs Elixir, jQuery vs React... But there is always something what I personally find very positive between all these differences. Please look at Windows and the Linux - some years ago we got used to installing a dual-boot environments and now we may experience Canonical's Ubuntu on Windows with real Bash.

Re: After reading “Rails is yesterday’s software”, I need to reply

#195

"makes it easy to install 1,000 gems into your project without a single line of configuration, is exactly why it’s hard to debug". This "let someone else do the work, get it from a gem" mindset is what kills long lived projects. It has nothing to do with the tools and everything to do with experience. You don't need 1000 gems. Managing anything more than core dependancies in a project can easily create exponential bu…

  $ tree node_modules

Re: After reading “Rails is yesterday’s software”, I need to reply

#196

Earlier quoted context omitted.

I'd love to know more about your webapp methodology. It sounds wonderful.

The current implementation is nothing special. However, I'm quite happy with our methodology itself. We use a simple microservice design: All our microservices talk using JSON over HTTP. They share nothing. Everything is done by communicating. There's also an event bus so they can listen to each other's events. All our microservices are multitenant by design, so that they can support any product with no data spillove…

That's much appreciated - lots to think about!

Edit: how do you scale? For example, do you just have lots of nodes running your authentication microservice for all of your active apps?

Re: After reading “Rails is yesterday’s software”, I need to reply

#197
post #136

Earlier quoted context omitted.

Is there anything that actually "enforces" TDD? Because if there is I want to stay away from it.

My "enforcing TDD" point was rather tongue in cheek. Really, I was just saying that a rails app of even moderate complexity with no tests is a very dangerous beast, and something I would not wish upon my worst enemies.

You can remove the word "rails" from that, and it's still 100% true.

Re: After reading “Rails is yesterday’s software”, I need to reply

#198

Moving on from Rails sounds great until you try to build a serious web app with one of the alternatives. While I think that many of the architectural criticisms are valid, Rails demonstrates the primacy of ecosystem and strong conventions over language design and cs theory. 'Tomorrow's' languages and frameworks would do well to take heed. Winning this war has as much to do with culture and marketing as algorithms and…

It's all about how you prioritize the problems you need to solve. At my current job we primarily use Wordpress. Why Wordpress? Because we have a large and non-technical content team, 260+ websites and several tens of thousands of pages of content that need to go up quickly. We're just 4 developers - about 1 for every 8 content & marketing people we have. We spend very little of our time on frontend. Tell me that you'…

Comparing Rails and Wordpress seems like apples and oranges to me. Rails is a framework that lets you build anything web-app-ish, while Wordpress has its well defined, rather limited use cases. If it works for you, great, but the scenarios are different.

Re: After reading “Rails is yesterday’s software”, I need to reply

#199

Earlier quoted context omitted.

The current implementation is nothing special. However, I'm quite happy with our methodology itself. We use a simple microservice design: All our microservices talk using JSON over HTTP. They share nothing. Everything is done by communicating. There's also an event bus so they can listen to each other's events. All our microservices are multitenant by design, so that they can support any product with no data spillove…

That's much appreciated - lots to think about! Edit: how do you scale? For example, do you just have lots of nodes running your authentication microservice for all of your active apps?

Yes, we run every microservice on multiple nodes. How many depends on how much traffic a microservice needs. Some receive tens of thousands of reqs/sec through frontends, whereas some are only invoked for daily processing jobs etc.

Re: After reading “Rails is yesterday’s software”, I need to reply

#200
post #146
post #89

Earlier quoted context omitted.

Go statically compiles everything into a single binary. I'm not sure what is meant by "dependency hell", but this at least simplifies the runtime story.

Fair enough. He would have done well to explain that. Java does the same. Is it considered tomorrows language? At the end of the day its another trade off between compiled and interpreted languages, and one thats been around for years.

Java doesn't do this. There are tools that let you bundle all of your jar files, but even then, you typically have the JVM as a runtime dependency.
Post reply on HN