Backend engineering
Language-agnostic concepts a Backend Engineer should know?
77 points by nicksont 12 hours ago | hide | past | favorite | 51 comments Hi, what concepts do you think a backend engineer should know which are language agnostic/independent? An example could be knowing the different ways of how to connect to the database from the backend such as ORM or basic SQL and their pros and cons?
danpalmer 10 hours ago [â]
I think itâs important to know about different data storage options and their trade-offs. Managing state is one of the hardest parts of backend development, particularly at scale, so an understanding of the trade-offs in databases/caches/blob-storage/queues, and when each is useful is important. Iâd pay close attention to speed and âcorrectnessâ. Whatâs the consistency model of a system? Can we lose data and if so how? Whatâs the throughput? Latency?
These help choose good technology for backend systems, and helps answer questions like:
-
Can we do this in-band while serving a user request?
-
Can we do it 100 times to serve a request?
-
If it completes successfully can we trust it or do we still need to handle failure?
-
Can we trust it immediately or eventually?
There are lots of technologies and terms for all of this but Iâve specifically avoided them because the important bit is the mental model of how these things fit together and the things they allow/prevent.
reply
SOLAR_FIELDS 10 hours ago [â]
Absolutely this. Also, Iâve had to explain this to so many other engineers, both junior and senior to me: most data is inherently relational. This next statement is a bit opinionated: 9 times out of 10 you probably want an RDBMS. Iâve seen so many attempts to shoehorn some ElasticSearch/Mongo/Neo4j/whatever database into a design because the developer wanted to work on CoolDatabaseTech. Then youâre stuck dealing with joins in CoolDatabase that it wasnât really designed to do and frustrated at CoolDatabaseâs lack of drivers in X language. Later on youâre dealing with stability and scalability issues you would never see with BattleTestedRDBMS.
The amount of capability a well designed Postgres instance can output is insane. Iâve seen a single vertically scaled Postgres instance compete with 100+ node Spark clusters on computations.
reply
danpalmer 9 hours ago [â]
Exactly, but it goes a lot further than RDBMSs. For example does the application expect that all items on a queue will be processed? If so then you need a durable queue and Redis probably isnât a good idea, and this will likely reduce the throughput of the queue which might change how it needs to be used. One Iâve been bitten by several times is expecting APIs to allow me to read-my-writes, only to find that their underlying data store is eventually consistent. The integration point/API client on our end may end up being twice as complex or more just to handle that.
reply
mamcx 8 hours ago [â]
9 times out of 10 you probably want an RDBMS. And the last 1 can be done (modeled) in a RDBMS when the scale/pressure/volume is low. In other words, wait until you feel the heat.
reply
SOLAR_FIELDS 8 hours ago [â]
Yeah, Postgres off the top of my head does NoSQL (JSONB), graph and time series stuff either natively or through some cheap or freely available add ons. It really can do anything. Itâs not gonna be the best at that non-relational stuff, but it will do a âgood enoughâ job for most use cases until you introduce heavy scaling. reply
Zealotux 10 hours ago [â]
Iâm currently learning back-end coming from a front-end career, and I started reading âDesigning Data-Intensive Applicationsâ by Martin Kleppmann, seems to be a must-have for anyone who wants to get serious in this field. reply
davidkell 10 hours ago [â]
+1 For this recommendation, an exceptional book. In particular chapters 2-3 demystify how databases work, and provides an intuition on when to use different kinds of databases and query languages without the typical hype (spoiler alert - use an RDBMS!) reply
humbleMouse 6 hours ago [â]
Yes this is a great book and a perfect example of language agnostic knowledge that is useful. reply
throwaway81523 10 hours ago [â]
Security mindset: read the book Security Engineering (it is online), less for specific technical info than for the many war stories etc. which will help you guard against vulnerabilities and unforeseen consequences. Basics of cryptography: there are many dumb errors to avoid.
Antirezâs general advice about â10x programmersâ is good: http://antirez.com/news/112
Thorough (not just basic) knowledge of SQL, if you donât count that as a language. The sqlite.org âtechnical and design documentsâ about sqliteâs virtual machine and its query planner are well worth reading, and apply to other databases as well. ORMâs are less important than SQL, and are usually language specific as someone mentioned.
Reasonable clue about socket programming, even if youâre doing everything with libraries that wrap the details.
Comfort using debugging and profiling tools.
Lots of other stuff, Iâm sure.
reply
comprev 10 hours ago [â]
This book? https://www.cl.cam.ac.uk/~rja14/book.html reply
throwaway81523 9 hours ago [â]
Yes. It is a little bit old by now, but it is a great book. reply
chris_j 2 hours ago [â]
Understand the importance of having good visibility of your system. Implement good logging and collect metrics, for example the four golden signals of throughput, latency, saturation and error rate. The Google SRE book gives a good introduction to some of these concepts. See for example https://sre.google/sre-book/monitoring-distributed-systems/. Understand how to load test your system and to reason about its behaviour under load and its failure modes when you push it too hard. Itâs one thing to be able to build a system and functionally test it such that youâre confident that it behaves correctly when you send one request at a time. Itâs another thing to let thousands or millions of real users hit it for real in production and to have confidence that you are giving them all a good experience.
reply
tekstar 11 hours ago [â]
C and how to debug it. If you understand the system a layer of abstraction or two below the layer you work in, you will be able to debug deeper. Learn system calls, Various ways how to examine processes.
I learnt a lot of this back in the day by completing war games on a site called digital evolution (dievo). Those are antiquated now but still a really fun way to learn it.
reply
pdpi 10 hours ago [â]
Also, learn Javascript and browser tech in general. One of the keys to high-performance systems is figuring out how to make the layer above and the layer below talk to each other while removing yourself from the process as much as possible. reply
cudgy 9 hours ago [â]
I would think that most front end developers already know JavaScript. It might make sense to look at some other approaches like Go (and maybe Rust/C/C++), which is designed for back-end work unlike JavaScript which was basically shoehorned into back-end work in order to leverage all the JavaScript developers in many companies. reply
tifadg1 10 hours ago [â]
sounds very niche from an employability PoV. reply
sidlls 10 hours ago [â]
These skills have helped me at every single job Iâve had, including my current one, where Iâve employed the skill a couple of times to discover bugs or unintended side-effects in third-party library code. For context Iâve worked in the industry for about 15 years now, in roles ranging from low-level programming on real-time systems to (currently) high level machine learning work. It might be niche, but it can also be a differentiatorâeven if Iâm not the fastest coder or the best architect I have these other skills that make me valuable at critical times. Thatâs worth something anywhere.
And itâs not even knowledge of C or C++, or syscalls or whatever: itâs just basic âuse a debuggerâ (not merely pantomime the commands, but understand whatâs going on) skills that can be the real game changer.
reply
SOLAR_FIELDS 10 hours ago [â]
Totally agree with this. I have never written C or C++ in a professional manner but just knowing how to debug and compile it has proved to be an invaluable skill. Lots of software ecosystems often have some underlying C/C++ code that they are calling out to and being able to dive into that when there is an issue is an incredible skill to have. Make, Ninja etc. are fairly straightforward compared to something like Gradle and just knowing my way around that and Clang/GnuCC has gotten me a lot farther in my career.
reply
pdpi 10 hours ago [â]
It doesnât make you âemployableâ. It does make you incredibly valuable once youâre inside. Being able to debug systems and being able to talk to other teams working on different levels of abstraction are both incredibly important skills. reply
tekstar 10 hours ago [â]
Yeah itâs the complete opposite of niche. Itâs the fundamental understanding of processes, signals, syscalls, memory that every modern computing system is based upon. reply
fennecfoxen 10 hours ago [â]
You are by all means welcome to remain ignorant of how computers and frameworks and libraries all work, incapable of tracking down and fixing bugs in your application stack that affect you. Build a career filling in the boilerplate that Spring or Rails or whatever generates, and when the system doesnât perform as you expected it to, throw up your hands and say âI donât know what itâs doing,â and end the matter there. This is, presumably, a quite ordinary and common approach to software development. But if you do so, then I must ask: what are you doing on this site? What can you possibly get out of it?
reply
cudgy 9 hours ago [â]
Your first paragraph is dead on. When I first encountered Ruby on rails after developing in C++ for years, it was very difficult to accept the black box of ruby on rails. In fact, my instincts are to fear tools like that. The sheer number of dependencies on third parties when using tools like Ruby on rails is downright frightening. Good luck making sure that all of the libraries your linking to are secure and that you can fix any issues that come up. reply
konart 10 hours ago [â]
frameworks and libraries all work, incapable of tracking down and fixing bugs in your application stack⊠What does any of this has to do with C?
What can you possibly get out of it?
I hope you realise that many of commenters here are not even software engineers. HN covers more topics than just âanother arrogant software dev lectures someone on topic Xâ
reply
whynaut 8 hours ago [â]
âanother arrogant software dev lectures someone on topic Xâ Not GP. But this is explicitly a software thread.
frameworks and libraries all work, incapable of tracking down and fixing bugs in your application stackâŠ
Pretty sure they are implying that C/C++ lies somewhere in most software stacks.
reply
konart 4 hours ago [â]
Pretty sure they are implying that C/C++ lies somewhere in most software stacks. So do many other things. Itâs nice to know every bit of tech behind the scenes but one has only this much time.
reply
jgwil2 10 hours ago [â]
Well, one doesnât have time to learn everything, so itâs entirely reasonable to do a cost-benefit analysis (in terms of employability or personal interest) before investing. reply
pdpi 9 hours ago [â]
The OPâs statement makes the context clear though: Itâs not about knowing everything. Itâs about knowing a couple of abstraction layers under you (and, as I argued elsewhere, above you too). Itâs useful to understand a few classic networking problems that a backend engineer might face â e.g. weird latency issues caused by Nagleâs algorithm, or TCP CLOSE_WAIT leading to ephemeral port exhaustion between a proxy and an application node. Itâs useful to understand why we mostly moved to event loop-based servers instead of thread-per-connection servers as a way to handle c10k.
A backend engineer doesnât necessarily have to be an expert on any of these things, but they should be able to follow along if an expert explains that sort of problem.
reply
jgwil2 6 hours ago [â]
OP was responding to a comment specifically about debugging C. Someone questioned the value of this to employability and then the comment I responded to laid into him/her, suggesting no one on HN should ask that. I am defending that question. reply
cudgy 9 hours ago [â]
So much for being language agnostic reply
Diggsey 10 hours ago [â]
IME, itâs the following considerations that make back-end development hard:
- Fault tolerance. - Backwards (or forwards) compatibility. - Scalability. - Testability. - Everything around state (backup/restore, migration strategies, data integrity, etc.)
Most other things are a one-time cost. These things are an ongoing burden to consider, but if you forget to consider them it can be devastating.
Also remember: any time you give a (internal or external) customer programmatic access to something, that is an API, and APIs have huge costs to maintain. That includes when you dump your database into âdata lakeâ for internal reportingâŠ
reply
ianpurton 11 hours ago [â]
Some that spring to mind
-
Database Migrations
-
Kubernetes
-
Basic RPC and code generation i.e. gRPC, OpenAPI and GraphQL.
-
Realtime Concepts, i.e. Kafka, MQTT
-
DevSecOps
-
Builds. i.e. make files.
-
Jobs, i.e. cron or batch and job workflows.
-
Offsite incremental DB backups and restore.
-
Infrastructure as Code i.e. Pulumi.
reply
comprev 10 hours ago [â]
- How to write clean and concise documentation, including references to further reading material which helped you solve that particular problem.
- Basics of server/runtime environment security (RBAC, least privileges, common threats, etc.)
reply
agentultra 10 hours ago [â]
-
HTTP: REST/HATEOAS, headers, transport layer caching, rate limiting, load balancing
-
Authentication: OAuth2 is probably the most widely used
-
Authorization: RBAC
-
Some rudimentary statistics: know how to read metrics, write metrics, etc
-
Learn one RDBMS inside and out. Other database systems have their place but youâll almost always encounter a Postgres, MySQL, MSSQL. Learn how to read EXPLAIN output, cursor based pagination, and indices.
reply
gilfoyle 10 hours ago [â]
Would totally recommend this book âPatterns of Enterprise Application Architectureâ by Martin Fowler https://martinfowler.com/books/eaa.html
reply
Sonata 10 hours ago [â]
Having a good knowledge of HTTP is useful in many different contexts.
-
The correct semantics for each HTTP method
-
What different status codes indicate
-
Common headers, particularly around caching
-
HTTP 1.1 vs HTTP 2
-
Common authentication protocols - OAuth 2.0, JWTs, etc.
reply
eatonphil 11 hours ago [â]
How to set up a decently secure, monitored and backed up server. reply
aszen 10 hours ago [â]
I have found that the most important bit as a backend engineer is modelling the application domain precisely. A taste for making good APIs helps and knowing how to measure performance. These days most backend engineers also tend to manage data sources so understanding them is also a plus
reply
yewenjie 10 hours ago [â]
Slightly related, what are the most high-quality resources for learning backend engineering? reply
koolba 10 hours ago [â]
Donât hide the async nature of external requests. It seems like a magically good idea until it all falls apart. Timeouts and error propagation needs to flow from the request ingress all the way to the backend services. reply
bovermyer 10 hours ago [â]
Besides all of the excellent suggestions others have said, I would add:
-
the OSI model, DNS, TCP/UDP, TLS, and networking in general
-
CPU flame graphs and other low-level performance/debugging tools
-
the Knightmare devops story
-
anger management
reply
tompazourek 7 hours ago [â]
Almost everything is actually language agnostic or transferable. So itâs a big question. reply
corobo 10 hours ago [â]
Look into and learn as much as possible about penetration testing. No better way to know how to secure your code than the mindset of âOk how would I break into thisâ :)
reply
etaham 11 hours ago [â]
Distributed systems, consensus & data consistency concepts reply
eterps 11 hours ago [â]
Domain Modeling (check out the book âDomain Modeling Made Functionalâ). reply
Aeolun 10 hours ago [â]
Lazy loading Dependency inversion/injection
reply
throwaway019254 11 hours ago [â]
Idempotence reply
Oleg2tor 10 hours ago [â]
REST reply
dudul 11 hours ago [â]
Isnât an ORM the perfect example of something that is not language agnostic? reply
onei 11 hours ago [â]
The implementation is, but the concept is transferable. Pretty much the same for most concepts in programming. reply
exdsq 11 hours ago [â]
SQL is far more useful to learn than any one ORM or even the general concept of am ORM. reply
loevborg 11 hours ago [â]
ORMs are language-specific, but the insight to avoid ORMs for the rest of your life because of impedance mismatch is general and deep. reply
Apply early for the YC Winter 2022 batch
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Search: