Live data from Hacker News

Ask HN: Is my software stack choice sound?

news.ycombinator.com

1–10 of 49 posts

Ask HN: Is my software stack choice sound?

#1
As a side-project I am developing a simple app to send short messages to subscribed users. The users will be able to respond to the messages either privately or publicly.

It is a simple app, but I am not web or mobile developer. So this will be a learning experience for me.

This is a mobile-first app. I am thinking of what software stack I should use. I have reduced the choices to the following:

frontend: Flutter, backend: REST + Wt + PostgreSQL

Or

frontend: Flutter, backend: GraphQL + Phoenix/Elixir + CouchDB

I am a C/C++ developer and familiar with Wt and little bit of REST and RDBMS. But I am not familiar with Flutter, PostgreSQL, GraphQL, Phoenix/Elixir and CouchDB.

What software stack should I use? I am leaning towards the first option as I am familiar with C/C++.

Re: Ask HN: Is my software stack choice sound?

#2
For a side project, you need to decide if you are trying to stretch your skillset on a fun project, or deliver software as quickly as possible to see if there's money to be made.

Either choice is fine, but pick one. Choose whether you want to learn or earn.

In this case, if you want to learn, pick elixir/graphql. From what you've said, that'll be quite the learning experience.

If, on the other hand, you want to earn (or at least get something shipped as soon as possible so you can test the market), pick the Wt option.

Re: Ask HN: Is my software stack choice sound?

#5
Your goal should be iteration. Pick the simplest way to make this idea work with as few things as possible (preferably one) and make that. Then add another technology to upgrade it, etc. It should be usable after each step and improve each time. If you try to build a new project using that many new languages, tools, and methodologies, you won't finish.

Re: Ask HN: Is my software stack choice sound?

#6
REST vs GraphQL doesn't really matter for this type of app. Since you're restricting the choice between Phoenix/Elixir and Wt, I'd definitely go the former, but you'll have something out the door even faster with Ruby or Python. I'm not just speculating here, I worked with a C/C++ dev before when we used Ruby for a project and he was blown away at how much more productive he was.

As for CouchDB vs Postgres: "When in doubt, Postgres." Has never failed me. I burned a lot of time on other DB systems[0], but in the end Postgres was always easier for the whole picture of what a DB should do from backups to persistent to extensions, everything really. Never tried CouchDB though.

Anyway, seems like a good project to try out some new tech since it should be pretty easy. Whatever you choose should be fine for your first 100k users.

[0] Riak, Mongo, hand rolled custom graph DB based on BerkleyDB, tried to make Neo4J work, even wrote a persistence layer for NetworkX at one point.

Re: Ask HN: Is my software stack choice sound?

#7
It really depends on how much learning you're up for. If you just want to refresh your skills and have the best chance of actually delivering something, go with what you know.

If you're just making this because you're excited about new tech and want to see what it's like to work with, then by all means go with the more experimental stack but understand that it will take longer and will be riskier.

Re: Ask HN: Is my software stack choice sound?

#8
Elixir + Phoenix sound like a great stack. I've been building a side-project with that stack and it has been a joy.

With that being said, I believe it might be quite a learning curve for you. Not because it will be difficult, but just because there might be many topics at once to learn. Like you said, GraphQL, Postgres, Elixir (and a little bit about the BEAM ecosystem), Phoenix and CouchDB. If you are doing anything for the Web, you will inevitably touch JavaScript as well.

Not sure if you are open for suggestions, but one thing you could consider would be using JavaScript or TypeScript with NodeJS. I'm not the biggest fan, but you would be able to use the same programming language in the frontend for our Web app and also the backend with NodeJS and a full-stack framework like Remix[1] or NextJS[2]

This could reduce the overhead to start your side-project and will give you fewer puzzle parts to learn and put together.

[1] Remix: https://remix.run/ [2] NextJS: https://nextjs.org/

Re: Ask HN: Is my software stack choice sound?

#9
post #6

REST vs GraphQL doesn't really matter for this type of app. Since you're restricting the choice between Phoenix/Elixir and Wt, I'd definitely go the former, but you'll have something out the door even faster with Ruby or Python. I'm not just speculating here, I worked with a C/C++ dev before when we used Ruby for a project and he was blown away at how much more productive he was. As for CouchDB vs Postgres: "When in…

Couch db is awesome but as my most recent couch app got big I ended up moving to pg. go pg.

Re: Ask HN: Is my software stack choice sound?

#10
I would say -> GraphqL + Phoenix + Postgres

From my perspective I wouldn’t choose CouchDB. For one, its a pretty obscure DB that doesn’t have a lot of support. For example almost all major hosting providers now allow you to launch an app with Postgres hosting out of the box.

Way way way way more tools and articles for building an app with postgres.

Also I would recommend Postgres to take full advantage of Phoenix and Ecto (the ORM). In Elixir GraphQL and Ecto are deeply integrated to avoid n+1 queries when you are writing nested lookups.

In my opinion having used Django, RoR, frameworks in Go and Rust, Elixir has the most robust and powerful ORM out of any language and it would be a shame to miss out on it by using CouchDB.

I prefer GraphQL over REST tremendously. For a large site, in REST we had this process of the Frontend would have to tell the backend what data they wanted, the backend would make the endpoint and then the frontend would consume it.

With Graphql the backend just defined all available data and the frontend picks and chooses what it needs. GrqphQL also prevents weird n+1 requests where you need to request the data of the children from a previous REST result.

GraphqL + Phoenix + Postgres is a game changer IMO

Post reply on HN