12 ms·
DHH: The HEY stack Vanilla Ruby on Rails, MySQL, redis, stimulus, elastic search
- unixhero 6y agoWhy is it called Hey stack? Why does the "Hey stack" persist to the obsolete Mysql dB engine and not PostgreSQL (opinionated dovnvote fodder, I know, but hey; bring it on! They are valid questions).
- deleted 6y ago[deleted]
- Jemaclus 6y agoThe app is called "Hey". It's not the HEY Stack in the same sense as the MEAN stack or the LAMP stack. It's the stack for the app called HEY.
- em-bee 6y agoi expect that on their bug tracker, issues have been renamed "needles" so that each issue they work on, is a "needle in the hey stack"
- vmlinuz 6y agoAlso, uh, it's a pun on haystack... as DHH pointed out somewhere in the thread.
- brodock 6y agoThey are probably using it as dumb key value storage in a way, and probably found it easier to shard + existing experience. I'm not sure PostgreSQL sharding ist there yet
- criddell 6y agoMaybe because MySQL is good enough for what they need.
- WJW 6y agoIn addition, calling it "obsolete" compared to postgres implies postgres is better in all ways, which is simply not the case. There are entirely valid reasons to choose MySQL for new apps.
- gyanamo 6y agoisn't "Vanilla Ruby on Rails" akin to "Vanilla Deluxe Chocolate Fudge Sundae"?
- tmpz22 6y agoOr the American “regular sized” soda which is the equivalent to an XXL soda anywhere else in the world.
- mtmail 6y agohttps://en.wikipedia.org/wiki/Vanilla_software https://en.wikipedia.org/wiki/Vanilla_software "when not customized from their original form, meaning that they are used without any customizations or updates applied to them"
- feifan 6y agoI imagine the above was a joke
- gyanamo 6y agoI was actually being serious. I've never seen anyone refer to a customized RoR, have you?
- learc83 6y agoSome large companies have customized rails, and since Hey is built by the company behind rails, I assume DHH meant to imply that they are not using something special that everyone else won’t get access to.
- gyanamo 6y agoah, didn't know that. appreciate the response
- jablan 6y agoThere are thousands of gems out there which either offer some functionality not in Rails, or replacing/extending some that is (typical example being rspec). Vanilla means no (too many) gems on top of Rails.
- amrrs 6y agoIdk,I actually don't understand the obsession of many with Tech Stack or predicting the doom of a language. Because Facebook uses PHP for their service, Would you still use PHP? A lot of people despise PHP. But there's PH maker Mubs, most of his indie products LAMP stack. The main lesson I get from any of these is that pick the one that you're comfortable with and deliver the project than looking for what's the best tool in 2020
- ChefboyOG 6y agoYeah, selecting a stack IMO has more to do with scoping your goals. For example, if you are an indie dev who will be developing a project solo, pick whatever you're best at, because all that matters is the product. If you're an open source project, that's a different story. If you're looking to hire engineers, also a different game. And if you're the creator of Ruby on Rails and have created a giant personal brand around being contrarian and ignoring the new-hotness in web dev, then your choice is made for you.
- pell 6y agoI wouldn't call DHH contrarian for sticking with a mature framework.
- dmlittle 6y agoNot only is it mature, but it's his framework. Sure he's not the only maintainer but he's the original author. It makes sense to use your own tools; specially if they're successful.
- nscalf 6y agoI'd also say that a lot of people expecting to eventually hire on developers don't have to pick the tech stack that will scale to a 30 developer team. I've known a lot of very successful companies where the core tech was rebuilt/replaced as the team demands grow. And a lot of them probably wouldn't have gotten there that quickly if they make decisions around a 30 person team when they were 2 people.
- deleted 6y ago
- cookiecaper 6y agoFor more detail see the Gemfile for Hey [0], posted in a follow-up tweet. [1] [0] https://gist.github.com/dhh/782fb925b57450da28c1e15656779556 https://gist.github.com/dhh/782fb925b57450da28c1e15656779556 [1] https://twitter.com/dhh/status/1275917612556226562 https://twitter.com/dhh/status/1275917612556226562
- ahnick 6y agoIs the "magic" this line here? > gem 'turbo', github: 'basecamp/turbo' I get a 404 when trying to access it, so maybe still private till the big reveal?
- FailMore 6y agoYeah I think the magic is something new. In the Rubular (I think) podcast for Rails 6 launch he mentions how he thinks front end is broken, and they are doing it in a new way/have ideas. This could be those ideas.
- sleepyhead 6y agoBoth Turbolinks and Stimulus will be launched in new versions so probably a private beta version.
- diminish 6y ago> - MySQL for DB (Vitess for sharding) Curious why not postgres?
- thisisbrians 6y agoDHH (somewhat surprisingly) said he really has no preference between MySQL and Postgres: https://twitter.com/dhh/status/1275909837793062912 https://twitter.com/dhh/status/1275909837793062912
- Aduket 6y agoWhat does that answer of his even mean? That he prefers mysql ?
- BiteCode_dev 6y agoI interpret it as "I didn't think about it, picked the first thing that worked in the past, and don't wish to make an argument about it, so let it go".
- Lammy 6y agoI assume it means his bottleneck has always been somewhere higher up in the stack :)
- torgoguys 6y agoI think he means that if you use Postgres you are more likely to also be an evangelist for it. That doesn't tend to happen on the Mysql side. You don't hear people saying "you should switch from postgres to mysql" but you hear plenty of the opposite. Mysql works fine for most things and so that's what he used.
- thisisbrians 6y agoNow that I've thought about it more, it makes more sense. When used properly, Rails handles a bunch of the stuff that would make Postgres a better choice (like data validation, constraints, etc.)
- 6y ago
- deleted 6y ago[deleted]
- deltron3030 6y agoWas AWS unavoidable?
- nscalf 6y agoMaybe it was just preferred? Why is AWS something to be avoided?
- deltron3030 6y agoWell, he lashes out against FAANG quite often.
- cookiecaper 6y agoElsewhere in the thread it says they have a goal to be free from "Big Tech" within 5 years, but that there are no reliable non-Big-Tech cloud platforms at the moment. Apparently "cloud" was a mandatory part of the platform. ️
- deltron3030 6y agoMy guess was Azure, because of the Github link to Ruby. But it's possible that AWS has some email functionality they need.
- mr_ndrsn 6y agoNo AWS lock in for any email features. It’s Just Postfix.
- jonny_eh 6y agoHe lashes out anyone that deserves it, I don't think that means he'd never order a package on Amazon or watch a movie on Netflix.
- rthomas6 6y agoWhy doesn't Amazon deserve it?
- epoch_100 6y agoWhat I think is even more significant than Hey’s backend stack is its _frontend_ stack. There’s no complex JavaScript framework; it’s all server side rendered HTML with a few touches of lightweight JS (mostly Turbolinks and StimulusJS, afaik) on the client to add basic interactivity. And it feels just as fast—if not faster—than any other modern, well-built web app. It goes to show that libraries like React and Vue are _not_ necessary to build smooth, modern, and fully-featured web interfaces. Edit: removed mention of Angular because, yes, it’s a framework, not a view library.
- zemptime 6y agoIt is using some custom elements, though. :D
- lukevp 6y agoIt depends on how much data is centralized. If creating a new email round trips to the server to render in the next email list page, it may feel instant on a fast connection. With a SPA framework, it could add it to the local list of emails and push to the server in the background, so it would transition instantly regardless of connectivity. It would also work offline. If you are doing all business logic on the server side anyway, then yeah SPAs vs a server is not much different. But there is a whole class of problem that the server rendering cannot solve. Most email clients work offline and have an outbox. With a SPA you could have the web and mobile apps have the same exact code and support offline. With their setup, you have to build a native (or at least separate) app from the web app. This decision matters a lot when you’re making an app that should work everywhere, online and offline, with the exact same code.
- Albert_Camus 6y ago> With a SPA framework, it could add it to the local list of emails and push to the server in the background, so it would transition instantly regardless of connectivity. With an SPA, it could be built to do this. But most SPAs aren't developed this way. Take a look at the "RealWorld" example SPA showcase (it's like a TodoMVC for SPAs), which has 43k stars on GitHub: https://github.com/gothinkster/realworld https://github.com/gothinkster/realworld And go ahead and click on the demo site: https://demo.realworld.io/ https://demo.realworld.io/ In virtually every implementation, every time you change pages, the app re-downloads everything it needs for that route. Click on an article and then go back to the feed? Every time you will see a blank feed for about 500ms and only then do the articles stream in. You can say "well it doesn't have to be this way" or "this is just an example". But the reality is that it usually is this way. This real world example is a good representation of how most SPAs are built, and they lack the type of functionality you're describing. They instead end up creating an experience that poorly emulates server side rendering, since now many page changes end up with a blank page or a loading indicator before the data arrives in a subsequent request. I don't know about you, but I'd rather wait 250ms once and then have the page arrive fully rendered over a transition that takes 2ms and then 200-400ms of multiple requests finishing and the page popping into place. The latter is really annoying, yet it's the experience most SPAs give you.
- Aduket 6y agoRelevant discussion: The return of the 90s Web https://news.ycombinator.com/item?id=23567744 https://news.ycombinator.com/item?id=23567744
- maxdo 6y agoGood retro old-fashion ruby stack from d̶i̶n̶o̶s̶a̶u̶r̶s veterans. Nice :) No fancy magic. Went to check some of their stack on github and some component describe IE5 hacks. Kind of awkward to see how they trying to create a PR driven fight with Apple for obvious reason. "From creators of basecamp" sounds like anti-motivation to use product. They were first infomarketing company. Eventually they lost all the competition to every other company, but wrote books and succeed in this area while competitors went IPO with actual product. Why on earth someone would trust their business communications to outdated pre-hipster infomarketing company? My negative comment is only due to this disgusting leverage on riot/liberal values when they created a stupid buzz around a 10+ years old 30% rule. Providing as an example Tesla app and 30% cost of the car which is not the case for obvious reason. Do you think people are so stupid? Yeah, it might force me to remember this product. As a product from company with extremely mean values you should never trust.
- jonny_eh 6y ago> No fancy magic As an aside, I wish we could avoid undescriptive ad hominems like "magic" and "hacks" when talking about technology. There's pros and cons to any technology choice, but "magic" isn't one of them.
- fs111 6y agoThat is not what "ad hominem" means
- trcollinson 6y agoBasecamp is a very popular product, and they make a lot of money on it. I am not sure what the particular issue is. What point are you attempting to make? Also, having worked with a lot of startups, they are living the actual dream. They have a product that makes them lots of money. They get to explore business areas and avenues what interest them. What exactly would be the point of IPOing? Have you ever IPOed a company? Do you realize why companies IPO? Or are you just spreading hatred towards startups that don't take capital investments and just make tons of cash?
- sradman 6y ago243 character original DHH Tweet: > The HEY stack: - Vanilla Ruby on Rails on the backend, running on edge - Stimulus, Turbolinks, Trix + NEW MAGIC on the front end - MySQL for DB (Vitess for sharding) - Redis for short-lived data + caching - ElasticSearch for indexing - AWS/K8S
- latortuga 6y agoYes, based on replies on Twitter, the "NEW MAGIC" is almost certainly something like "reactive ActionView::Component". ActionView::Component didn't make it into Rails 6 but will likely land in 6.1 and this news from DHH makes it seem like they're going to support some kind of real-time piece a la Phoenix LiveView. The current Rails-land answer to this is Stimulus Reflex but it falls short in a number of ways and I'm not surprised Hey didn't use it. We ended up releasing our own version of this paradigm (put simply, HTML over websockets) because we thought the Rails world needed a proper LiveView incarnation.[1] [1] https://github.com/unabridged/motion https://github.com/unabridged/motion
- bdcravens 6y agoAs best I understand it, ActionView::Component (now the standalone ViewComponent) only deals with encapsulating what you'd put into a partial. https://github.com/github/view_component https://github.com/github/view_component The web socket/Stimulus Reflex/Live View approach is orthogonal.
- parhamn 6y agoIt’s rare for tech to be a determinant to a products success, which is why I’m confused at all the extrapolations here. What’s working for Hey is years of brand development and marketing that allowed them to do such a hyped launch. It could’ve been written in php with jquery and it wouldn’t have made much a difference.
- jeffbee 6y agoDoesn't sound very sophisticated from a privacy standpoint. How does this kind of vanilla tech stack protect my private emails from access by rogue insiders?
- mr_ndrsn 6y agoI’m sure there will be some blog posts soon. The encryption stuff is really neat.
- jeffbee 6y agoThanks for the downvotes folks, confirming my experience that this forum is incapable of engaging in a rational discussion of privacy and information security, and its members operate from a nonsense threat model. By far the biggest risk to most people's personal privacy is that someone will access their email. The easiest way to do it is to be on the staff of the email company, or to infiltrate their systems. HEY's own marketing materials state that they do not encrypt their data at rest, so I want to know what protects my data from the guy who is the HEY database administrator, or the low-paid datacenter tech who swaps out the broken disks.
- Axsuul 6y agoYou're getting downvoted probably because of your assumption that a vanilla tech stack is somehow absent of security best practices. Ruby on Rails "vanilla" is a well maintained server-side framework that receives constant security hotfixes. AWS is a cloud platform that supports robust IAM and VPC networks. It's more likely that a tried and true tech stack like this is more secure than something experimental.
- julianeon 6y agoHEY's security page lists encryption-at-rest. https://hey.com/security/ https://hey.com/security/
- jeffbee 6y agoInteresting because this page specifically disclaims it: https://hey.com/policies/security/ https://hey.com/policies/security/ "Our application databases are generally not encrypted at rest." Particularly interesting would be a discussion of how they can index content with Elastic while preventing system operators from accessing that index, and with strong auditing of any such access.
- piazz 6y agoNoteworthy how they tout the success of their "magic" frontend stack made with vanilla JS, lack of a trendy framework, etc. But if you use the app, the UX is fairly laggy, requires frequent refreshes, all the animations and interactions are off - the list goes on and on. It's noticeably subpar (and I like Hey). Seems to me that the proof is in the pudding wrt their stack, but it's probably not what they wanted to prove. I would take a well tuned React SPA over this any day of the week.
- tonyedgecombe 6y agoI’m just happy when it works which seems far less common with SPA’s.
- ch4s3 6y ago> the UX is fairly laggy I don't really find that to be the case. All of the actions seem to be done for me in under 400ms which is to say under the Doherty Threshold. That mean's that they are largely imperceptible. Sure it doesn't have fancy animations, but there isn't really any time for them. Can you cite an example of a popular React SPA that is less "laggy" in your opinion? I'm curious to compare the UX.
- piazz 6y agoSure, a fairly best in class example would probably be Notion. Switch between pages, move some elements around, etc. There's a level of interactivity and responsiveness that I just don't see with Hey.
- ksec 6y agoWhich is also running on Rails if I remember correctly. But Notion seems to be those extremely extremely rare examples.
- alecbenzer 6y agoSwitching between pages is pretty hit or miss for me in Notion. If it's a page I've been to recently it's very fast, but it's noticeably slow on some page loads. hey seems consistently pretty-fast. Moving around elements doesn't seem like a fair thing to compare to navigating around the app... that's more like looking at how smooth text editing feels in Hey.
- k__ 6y agoThe creators of Ruby on Rails use Ruby on Rails, why is this new? DHHs whole career is based on it, why should he use something different?
- nojito 6y agoAnd would be exorbitantly expensive for 99% of companies because of the stack chosen
- mkchoi212 6y agoIt uses ElasticSearch? Does this mean that HEY only supports searching when the device is online? I would expect search to work on a mobile app with no internet access when I'm paying $100 for an email service...
- danieldisu 6y agowhy did you assume that the fact that they are using elastic search means they don't support offline search? You can have both... offline in device when no connection is present and online when it is...
- gregkerzhner 6y agoI assume this is their web stack. For their mobile apps they most likely use native iOS / Android codebases. The typical stack for a data heavy native app is to use an SQL store (or just filesystem) to cache data locally so its available offline. You won't obviously be able to search all of your emails offline though, only your most recent ones that happened to be loaded during online usage.
- jedieaston 6y agoThey don't, it's all online with webviews on iOS and Android. I don't think there is offline functionality (still haven't gotten an invite).
- PaulAnunda 6y agoInteresting point. I can't remember the last time I had to search while offline. Not to say that it'd never happen, but implementing a decent index on a mobile device doesn't sound trivial.
- iamleppert 6y agoI tried hey and was put off by its bulbous, fisher-price UI. Signing up and having to press "next" after every single bit of information they collected should have been my first clue at the brain-dead thinking that went into this product. About the UI -- Why is there a trend in designers to add padding to an interface as a disguise for limited features? It's like, does a button really need to to take up half the screen? Oh yeah, that's right, it does if you only have a single feature. Even the name is annoying. Hey is what you say to get someone's attention in dating app.
- johneth 6y ago> It's like, does a button really need to to take up half the screen? Bit of an exaggeration. Extra padding on buttons is more to do with enabling an increased hitbox for mobile and touch users, what with fingers being less precise than mice.
- steveharman 6y agoHas anyone managed to find a needle in the HEY stack?
- fomine3 6y agoPHPer here
- didip 6y agoI am a huge fan of server side rendering with progressively enhancing Javascript. It simply feels right to me: * Search engine indexing works as expected. * Informational web pages don't need a lot of interactivity anyway. * You don't need crazy amount of build tools. * You don't need extra browser extensions just to debug the JS. * If for some reason there's one JS error, most of the pages are still functional. * I am unconvinced that SPA is faster than server side rendering. * Separation of concern is natural, business logic is handled by BFF, UI interaction is handled by JS. * If you super love Javascript, you can write the BFF in Node.js. I am glad that Hey is another high profile app exemplifying this. I can't wait for the pendulum to swing back.
- nojvek 6y agoI guess it really boils down to. Are you building an app? if so build an app. All UI is static hosted on CDN with content based urls that can be cached forever and all dynamic data coming in purely via REST apis. If you are building a website, then serve html pages with sprinkled widgets here and there for interactivity. Don't conflate the two. Users don't mind a slightly slow first load but super fast subsequent loads for an app. They'll love offline/PWA support, something that behaves like a native app. Search engines shouldn't care about indexing apps. Web pages should behave like web pages. Search engines expect html as the format. Users expect the first load to be blazing fast. Proper href links, yada yada. The worst is when its a half assed slow loading web page that wants to be an app, but is not an app.
- buboard 6y agoIf the bizarre world of tech goes full circle back to php&jquery , i ll have won a 10 y o bet
- x87678r 6y agohow does MySQL work for a site like this? I think he said its one instance. Do they have a table for each account? Also is every mail stored in a row? Attachments too? That isn't how I'd expect it.
- Axsuul 6y agoVery likely a monolith database (the sharding gives it away) that uses a multi-tenant architecture (`WHERE account_id = ?`)
- ggregoire 6y agoAll the comments here are about frontend (which honestly comes as no surprise if you know a bit Basecamp [1]) but the interesting one for me is Kubernetes. It totally makes sense but I expected Basecamp to use something more "old fashion" (somehow like the rest of their stack). [1] https://basecamp.com/about/open-source https://basecamp.com/about/open-source
- dethos 6y agoIf it does the job, the experience is good and ends up reducing the complexity for the development team, looks like a good solution for that particular kind of product/service.
- drewda 6y agoRuby on Rails is the stack I've felt most comfortable in for well over a decade and it's always great to see it's continued progress! That said, I do think it's unfortunate that Rails has yet to have a "canonical" and opinionated approach to JSON-based API design, alongside the page rendering. There are multiple JSON/API gems, but they come and go over the years, with inconsistent maintenance and development. So, I will pick no fight with Basecamp about using server-side rendering for Hey, but I'll still be a bit disappointed that this hasn't become an opportunity to extend Rails support in another direction.
- jdauriemma 6y agoI could be mistaken, but I believe more recent versions of Rails have out-of-the-box tools for creating and maintaining JSON APIs. Many of the bootcamp grads I work with seem to have had experience building JSON APIs using a vanilla rails app.
- bdcravens 6y agoIt has included jbuilder for a long time, which has a DSL for rendering JSON responses. https://github.com/rails/jbuilder https://github.com/rails/jbuilder For a few years now, it has included the ability to focus strictly on APIs, leaving out the pieces you'd need for a full-blown browser-rendered app. https://guides.rubyonrails.org/api_app.html https://guides.rubyonrails.org/api_app.html
- sitzkrieg 6y agoi have to admit i don't get it. there seems to be zero compelling reason to use hey over; eg, fastmail. fastmail is to this day the fastest website ive ever used
- bdcravens 6y agoPerhaps their target market are those who have been on Gmail for a long time, which I presume is a substantial number.
- deleted 6y ago[deleted]
- jimnotgym 6y agoAm I misreading something, or can you only use a *@hey.com address and not your own domain? So if Hey lock you out you potentially lose access to all of the accounts you set up using that address. PayPal can't send their 1 time code, your bank can't reset your login. Your password manager can't do 2fa. If you own the domain you can switch there dns to someone else and regain your life. If you don't own the domain to your main email you are running a risk I wouldn't run.
- webdelv 6y agoThis is a valid concern with using any third party mail provider. Even if you own the domain though, you probably use a domain provider, for which it would be un-wise to use your own domain as the login email. Do you really have full ownership of any email address?
- jedieaston 6y agoCustom domains are apparently in testing right now (i'm on a list to hear back about it). The corporate version requires them.
- learc83 6y agodang was this flagged for some reason? It seemed to be pushed off the front page really fast.
- Aduket 6y agoOP here. indeed, it was at the top of the front page for having the highest vote. Now it was sent the second page. Weird, why could this be?
- johannes1234321 6y agoHappens with different posts regarding Basecamp/dhh ... but who knows
- jfdi 6y agoanybody know what they're using for the imap/smtp/pop core?
- markpapadakis 6y agoPostfix
- jfdi 6y agoThanks!
- JeremyNT 6y agoI've switched to Stimulus since seeing a presentation on it at last year's Railsconf and it has been a real joy to use. This is really the bit Rails was lacking for a long time. JS always felt like a second class citizen in Rails before, but webpacker finally brings the two worlds together in a way that makes sense. And with Stimulus, I actually find it a joy to write well organized js that is easy to reuse across my app. It's minimal, but just opinionated enough to keep me from mucking things up badly, the way I did in the asset pipeline days. I wish Stimulus got more attention. It really is all most web sites need, and it works so well with the well proven Rails way of server side html added to judicious js. It's also a good tool to use as glue while you migrate legacy js over from the asset pipeline, you can just load your old js in a Stimulus controller and go. I kind of wish Basecamp would promote it more, maybe even optionally bundle it with Rails, because it really is the missing piece that almost any Rails app could take advantage of. Having a little more guidance here would really help new Rails developers :)
- hfourm 6y agoHonestly stimulus is great if you have constraints around what you want to do with your JavaScript. However after working with it in a larger application, it is quickly obvious that more complex tasks are made extra hard and that lack of opinion turns into a wild west of different implementation patterns. When you start trying to get multiple stimulus controllers talking together.... Good luck.
- hypewatch 6y agoWhile learning about another tech stack is lots of fun for an engineer, I believe that great products aren’t written by great tools. They’re built by great engineers. A great tool helps but is not sufficient to build a great product.
- jinqueeny 6y agoI am wondering have you considered the open source NewSQL database solutions like TiDB, CockroachDB? They have the best of both traditional RDBMS and NoSQL and would be the perfect choice to the hyper-growth scenarios. TiDB could be considered as a scale-out MySQL and CRDB a scale-out Postgres. They are all Spanner-inspired solutions that can help avoid manual sharding.