sashaafm

sashaafm

I’m trying to evaluate the best combo/stack for a BEAM Web app. Right now I’m exploring Yaws a bit, after having dealt with Phoenix for a small application for a few months. However, since Cowboy is gaining a lot of traction, I’d like to know what are some pros and cons for:

  1. Yaws vs. Cowboy: the first one seems more stable and battle-tested, while I’ve seen a few posts of people saying Cowboy has better performance and seems to have more adoption.

  2. Just a Web Server vs. a Web Framework (Phoenix): I’ve never really used a Web Server alone to develop a Web application. From what I’m seeing from exploring Yaws, I really miss Phoenix’s straightforward development and vastness of resources. Yaws seems pretty good, but from what I remember I was way more productive with Phoenix right from the start. So far I can’t really think of any cons against Phoenix, besides the fact that you’re locked into Cowboy and the additional dependencies and heavier weight of all the additional code.

There’s also this post which compares several Erlang and non-Erlang Web Servers, with Misultin and Cowboy coming out on top. Yaws is not present for the following reasons the writer posted:

As a last note, I did not include Yaws for a simple reason: it’s a fully blown up server, the “old guy” is a feature-loaded unquestioned webserver, and because of that I simply thought that it would have been unfair to add it to the comparison. This really sounded to me like apple and peers, not a minor difference of the missing headers you are referring to. IMHO, of course, and I’ll be more than pleased to add Yaws to the next run which I might be called to do.

Anyone know what a “fully blown up server” means in the context of Yaws vs. Cowboy?

Showing Posts 1 to 3

OvermindDL1

OvermindDL1

Yaws was one of the ‘old days’ erlang web servers. Great to work in, was quite fun, however it was also not very fast, but it was a full framework more along the lines of Phoenix (or even more). I’ve used it decently like a decade ago. ^.^

Cowboy is a very low level network dispatcher, not just for web, anything to do with the network really. Phoenix is built on cowboy. Phoenix is also much faster growing because of Elixir supporting it.

Comparing cowboy and yaws makes no sense, different stacks; comparing yaws and phoenix would make more sense. :slight_smile:

Oh wow misultin, Chicago Boss, all kinds of old erlang web things are coming back to me, I’ve at least messed with them all years ago. :smiley:

But yes, misultin was on the same vein as cowboy, a low level network dispatcher, but not near as fast as cowboy itself. Misultin was actually a newer incarnation of an even older network dispatch that I forgot the name of, but also started with an m. Chicago Boss was a ‘full fledged framework’, even more so than Phoenix and Yaws, very opinionated but very easy to get stuff done in it. :slight_smile:

Someone really should rewrite Chicago Boss on top of phoenix! ^.^

As in huge, Yaws had templating engines, data storage, everything you need. Cowboy is just a little network dispatcher, even the http ranch handling is just an add-on on it. :slight_smile:

evbogdanov

evbogdanov

I’m a huge Yaws fan for a couple of reasons.

Firstly, because of the Yaws creators. They are rockstars:

These guys are not only brilliant but also very friendly and helpful. They are true professionals who know what they’re doing.

Secondly, because of the Yaws users. Yaws has been used in production for years at WhatsApp (proof) and Klarna (proof). These billion-dollar companies bet on Yaws. Why shouldn’t we?

And last but not least, my own experience with it. In short, Yaws is good enough. It’s not perfect by any means. Its community is not as big as Cowboy’s. It lacks quite a few of the features you get with Phoenix out of the box. But Yaws works for me, offering a nice balance between low-level control and productivity.

YellowApple

YellowApple

The difference between Yaws and Cowboy is along the lines of the difference between, say, Apache and Puma. One is a full-blown traditional web server daemon that handles traditional websites (but happens to be able to be integrated into other Erlang applications). The other is a component to allow an Erlang application to listen for and accept HTTP requests.

Basically:

  • If you need to setup a server to host a traditional website (static HTML pages, or maybe server-side includes or CGI), then Yaws is the right fit
  • If you need to give your application the ability to communicate with clients over HTTP, then Cowboy is the right fit (Yaws can work here, but unless you want to write a Yaws adapter for Plug or forsake Plug entirely, it probably ain’t happening in an Elixir application)

Even equating Yaws to something as immense and comprehensive as Phoenix dramatically undersells the sort of stuff Yaws can do.

While we’re on the topic of Erlang web servers, there’s also MochiWeb.

— All posts loaded —

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 94592 917
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
caslu
I want to open this thread for you all to discuss and help those who really like Ash but are still hesitant to use it in a real project. ...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
heathen
Quite interesting article Google brought me. Didn’t find any mentions about it here. What do you think in general? Would you use togethe...
New
marciol
It would be helpful to have a list of companies worldwide that hire engineers without prior experience in Elixir. Often, it can be quite ...
New
durvia
Anyone running long-lived stateful processes on BEAM? We’re building an AI agent runtime and would love to compare notes. We’re a small ...
New

Other Trending Topics Top

marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
Aludel - LLM Evaluation Workbench Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews