DEV Community

The dev.to tech stack

Ben Halpern on August 09, 2017

Here's our stack: Open Source Ruby on Rails Mostly VanillaJS with PreactJs for some components Postgres (hosted on Heroku) ...
Collapse
 
angieg0nzalez profile image
Angelica Gonzalez

I love that this is RoR!! I love the look and feel of Dev.to!

Collapse
 
ben profile image
Ben Halpern

Thanks so much! It's a Rails app, but we make really good use of our CDN for edge caching, so most requests are handled without even hitting our servers. Configuring this in Rails has been really quite easy because of how well things can just plug in with 90% of the work already built out.

Collapse
 
defman profile image
Sergey Kislyakov

I always think about RoR as of something big and overloaded (currently writing a blog engine on Ruby with Sinatra+GraphQL). Since you're using RoR for the site, could you tell me if that's true or not?

Collapse
 
ben profile image
Ben Halpern

For whatever reason, Rails really "fits my brain", which is one of DHH's talking points. I think it's great for building when you know your needs are going to fit generally established web patterns (CRUD, index and show views, etc.) but you don't know exactly what you need. It's really easily to quickly build out a wing on the application when you need it. It's not the "soundest software" per se, in that it's basically built around lots of tight coupling (we call them conventions 😊)

So I'd say it works for us and I wouldn't poo poo it based on reputation, but if it isn't the kind of environment you like to work in, don't force it. So much of software development is psychological.

Collapse
 
defman profile image
Sergey Kislyakov • Edited

What about the performance? Is it hard to create a GraphQL endpoint (e.g. mysite.loc/graphql, using graphql gem) with RoR?

Thread Thread
 
ben profile image
Ben Halpern

I think it's pretty easy to build a GraphQL endpoint. We built one pretty quickly for a project and it went pretty smoothly. I think your mileage might vary on performance in this regard but I wouldn't think Rails itself is the bottleneck. If you put GraphQL in front of, say Postgres, you might be creating some query inefficiencies in the form of some leaky abstractions. This could be dealt with through some caching but you wouldn't get it for free. I would think if GraphQL was layered on top of a different type of DB, it would be more efficient. But I don't know the nitty gritty of this.

Ruby's bad for concurrency and generally running lots of code, but in this case, the query is going to be the bottleneck and I think that would be language/framework agnostic.

Thread Thread
 
defman profile image
Sergey Kislyakov

Thanks for your answers! I think I'll give RoR a try for my next project.

Collapse
 
6ones profile image
Promise Ogbonna

Why do you say so much of software development is psychological?. Really interested in that statement.

Collapse
 
matteojoliveau profile image
Matteo Joliveau • Edited

Hi @ben , I have a few questions.
Is your frontend template based (Embedded Ruby and alike), a single page application (React or such) or a server-side rendered SPA?

Collapse
 
rhymes profile image
rhymes

A few questions:

  • what do you use Algorithmia for?
  • any thoughts on Timber vs Papertrail? I see you don't use any of the logging addons on Heroku

Didn't know about Skylight, I'll check it out.

ps. you should submit the stack to Stackshare.io :-)

Collapse
 
ben profile image
Ben Halpern

Algorithmia's a convenience service we can reach for when we need a pure function to process some data. Can be used to easily run some ML on a block of text, perhaps to pull out keywords. One simple use case is to determine the "background color" of a post's cover image before it loads. It's nice to have it be based on the palette of the incoming image. I looked for a Ruby gem to do this, couldn't find one that worked well, so plugged in an Algorithmia function and it worked like a charm.

We know the founders of Timber and like it in concept. It's pretty new but I think it makes logging just a bit more powerful.

Big fan of Skylight so far. And @vaidehijoshi works on it so it must be good. 😊

Collapse
 
vaidehijoshi profile image
Vaidehi Joshi • Edited

@rhymes You should definitely check out Skylight if you're looking for accessible performance monitoring tools on a Rails app. We also have a free 30-day trial, so you can always try it out and see how it works for you. And we're always around to help you in case you have any issues getting set up!

@ben πŸ’ž

Thread Thread
 
rhymes profile image
rhymes

Thank you! I'll definitely check it out in the following days.

We've been using NewRelic but sometimes I feel like I don't have the finger on the pulse, so to speak.

Collapse
 
peckjon profile image
peckjon

Glad to hear we're being of service @ben ! We pride ourselves in being an easy drop-in way to add language- and framework-agnostic machine learning to any app, and love to hear about uses like this :-)

BTW we just published a new post about SyntaxNet -- way more advanced than just keyword extraction, thought you might find it useful: blog.algorithmia.com/advanced-gram...

Keep rockin' it!

Collapse
 
rhymes profile image
rhymes

Thanks for the reply, very interesting!

I will check them out in the following days!

Collapse
 
kellyjandrews profile image
Kelly Andrews

Have you dropped this on stack share?

Collapse
 
ben profile image
Ben Halpern

Good call.

Collapse
 
amit_merchant profile image
Amit Merchant

What's your revenue model for dev.to ?

Collapse
 
yannxaver profile image
Yann

Is this description of the tech stack still up to date?

The site feels so snappy that I was excepting some convoluted and esoteric tech stack from the future.
Great work.

Collapse
 
ben profile image
Ben Halpern

Not totally up to date, but not a lot has changed.

Collapse
 
chrisbrocklesby profile image
Chris Brocklesby

Hi @ben ,
Is this blog post still valid, is this still the stack you guys use ?

Do you use Heroku to host your Ruby on Rail or just Postgres (If you don't use Heroku for the backend host, who do you use) ?

Really interested, Many Thanks,
Chris.

Collapse
 
auct profile image
auct • Edited

Do you use some caching for sql requests? Or everything is hitting sql db?

Collapse
 
dev3l profile image
Justin L Beall

I saw yesterday when I wrote a blog-post that you guys use S3 as storage for attachment uploads. Do you have any software that either scrubs or prevents malicious files from being uploaded?

Collapse
 
ben profile image
Ben Halpern

Images are processed and served by the Cloudinary CDN. S3 is only for storing and passing on to the CDN, not serving to users.

Collapse
 
soniarpit profile image
Arpit

Interesting :)

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
ben profile image
Ben Halpern

πŸ™Œ

Collapse
 
auct profile image
auct

Why heroku?
Much cheaper is to get some random vps, isn't it?

Collapse
 
dwipr profile image
Dwi purnomo

i'm interested to build a SaaS like getstream. for now i want to build for notification system. is dev.to notification system use getstream?

Collapse
 
_swanand profile image
Swanand

Love that the stack is so simple.

Check out what Built With reveals about you: builtwith.com/dev.to

Collapse
 
wayanjimmy profile image
Wayan Jimmy

are you using preact ? found dev.to logo here

preactjs.com/about/we-are-using

Collapse
 
wolfhoundjesse profile image
Jesse M. Holmes

Second bullet under Open Source.

Collapse
 
ee profile image
temon

how do you handle the user feeds? it's pretty fast...
are you only using getstream.io for handling that?

thanks...

Collapse
 
kichukishore profile image
kichu-kishore

How do you manage SEO without any framework like next js...