Live data from Hacker News

Ask HN: Is my software stack choice sound?

news.ycombinator.com

21–30 of 49 posts

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

#22
For new projects, both at work or on the side, I like to imagine I have a “new stuff budget.” That forces me to spend it wisely.

If I over-spend my new stuff budget, I take on debt, much like tech debt, that I’ll have to pay down later. I’ll make slower progress because I’m trying to learn too many things at once, and I’ll have to go back and fix suboptimal tradeoffs where I didn’t have enough experience to make the right tradeoff at the time.

Conversely, if I don’t spend the new stuff budget at all, then I won’t learn anything new and might miss out on a tool that would have made the problem easier.

For side projects where the whole point is learning, sometimes I’ll spend my new stuff budget by e.g. learning a new frontend framework first, writing the backend in something I know. Then once I’m familiar with everything and have built back up the new stuff budget, I’ll go back and reimplement the backend in the new language I wanted to use, leaving the rest of the stack unchanged.

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

#23
post #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…

This 100%. Things can be both learning and earning, but in practice they never are -- at least not on purpose!

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

#24
I don't know anything about mobile development and not a lot about frontend.

I'd do the backend with Django and Postgresql. You can't go wrong with Postgresql, it's an industrial strength database. Nothing wrong with MariaDB (or Mysql for that matter), either, I just prefer Postgres.

Writing your backend in Django will allow you to get the basic functionality working in an afternoon. Don't worry too much about getting all fancy with the user models at least to begin with, or any "clever" stuff. Don't worry about doing it at Google scale until you're half way towards Google traffic.

You can use generic views in Django to rough out a web UI for it, then make it as fancy as you like with Flutter.

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

#26
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…

What IS GraphQL good for? The only time it seems like it's needed is when you want to ensure your front end devs can work without understanding API code. Am I missing something? P.S. not arguing - genuinely would like to know, since it never clicked. P.S.S. Definitely use Postgres - "When in doubt, Postgres" is a good axiom unless you need something very specific and know what that is. P.S.S.S. Elixir isn't that wide…

GraphQL forms a strongly and deliberately typed interface between a client and server, without frontend and backend teams having to collaborate on the shape of the endpoints (should such and such endpoint gain new options? should it be split into a separate endpoint? should the old one be deprecated, and if so, do clients still rely on it?).

Instead, they need only agree on the shape of the data available, and the frontend queries it however it needs to be queried while the backend resolves the nested calls with no additional effort* from those writing the backend.

Also, some clients come with additional affordances for hard problems, like pagination.

* okay, fine, you have to wrap your data resolution in Dataloaders, but that's not particularly challenging

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

#27
Do not use C++ for a rest API. I would recommend using common boring tech, and ignore the "magic bullet" promises of languages like elixir.

I find in my personal projects using python backend (flask or django), with a postgres database almost always leads to the most useful work getting done quickly. There are a lot of ways to make python fast if you know C++ when you need it.

I'm not familiar with Flutter, no opinion there.

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

#28
post #15

Earlier quoted context omitted.

> Never tried CouchDB though CouchDB is a json document based noSql system that is exposed through traditional HTTP calls (e.g. GET to get a document, POST to create a new document, PUT to update a document, and DELETE to delete a document). In the "expose data via REST" the stack is often "service doing SQL against a RDBMS" and that service is a either Java or Python or Ruby... that can often (not always) be done as…

how to sync access control rules between couchdb and the rest of the business logic? do you just not care about security/privacy, or do you duplicate all the logic?

You can set up design documents that implement access control logic. These are written in JavaScript.

https://docs.couchdb.org/en/3.2.0/ddocs/ddocs.html (note the design document for the users database)

This isn't the right type of solution for all data - but there's a lot of situations where people have a bug lump of data that they're trying to expose... list of all current flights, or classes, or ongoing games.

It can be quite useful for a lot of use cases. One size never fits all.

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

#29
I'd pick PostgreSQL over CouchDB because it is so common, has great documentation, and many people say it is a great default choice.

For quickly launching an API enabled backend, maybe look at encore.dev? It's not one of your listed languages (it's go), but at least it looks somewhat like C.

I recently had to launch an API for a hackathon, and this was as fast as Ruby on Rails for me. Comes out of the box with Postgres and PubSub (2 lines of code if you need it). Encore also does the infra provisioning and hosting for you (either your cloud, or for free at their cloud). Tip: add `sqlc` for the queries, it works well together with Encore.

GraphQL/REST: it looks like your app will have a limited set of calls that are easy to predefine. In that case, REST wins hands down. IMO GraphQL really shines if you have (a) a data model with many relations, (b) possibly from different underlying systems/services, and/or (c) different people working on the front-end/consumption side vs the data exposure side. But that's beyond 'a simple app'.

Other tip: if you're thinking of building an admin interface. Don't, just use something like Retool first while you're getting users.

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

#30
Give serious thought about using React Native over Flutter: 1) You can use JavaScript/TypeScript instead of learning another bespoke language (Dart). 2) With React Native you have the option of deploying OTA updates, this allows you to deploy fixes and basic updates without going through the app store review process.
Post reply on HN