
Ask HN: Best-architected open-source business applications worth studying? - ghosthamlet
Not just good code described in books like Code Complete, But aslo has a great architecture as a whole, and should be open source business applications, as there are many great library&#x2F;framework&#x2F;generic applications like Yii Redis Lua Linux, but open source business applications with great architecture not easy to find.
======
elorm
Nginx and Git.

Nginx has a lot of respect on the market for handling high concurrency as well
as exhibiting high performance and efficiency.

I don't even have to speak about the Git architecture. It speaks plainly for
itself.

There's a series of books called The Architecture of Open Source Applications
that does justice to this topic

[http://aosabook.org/en/index.html](http://aosabook.org/en/index.html)

~~~
scarface74
I love git, but the learning curve seems very high for the unititiated. Git
seems to work best as the assembly language of source control for a lot of
people. It's okay as long as you put a nice GUI on top of it.

Even though I'm pretty comfortable with git thanks to attending a two day
workshop conducted by a guy from Github, I still like using tortoise git.

~~~
methodin
It's sad so many people use GUIs on top of git - you really end up not
understanding what git is doing and it can lead to problems. Command line is
supreme for the same reason that a majority of books are better than their
movie counterparts. They are easier, though, but in the case of git that isn't
a good thing.

~~~
stevekemp
I agree, but this is a symptom of a larger problem.

Really I'm disappointed that people don't build their computers from scratch
these days. You don't know what's going on when you have so many components
joined together with random blobs of firmware.

Give me a bare Z80, a bunch of RAM, and anybody could understand it. Plus if
you're writing your code in assembly you can optimize better than any compiler
- they wouldn't know enough to use your opcodes as constants when you need to.

/s

~~~
oliv__
Honestly that just sounds way too complicated... I do it all in my head.

~~~
Jemmeh
To think I've been writing all my code out on paper. I need to get on your
level. /s

------
berns
Meta: So far (23 top level answers) we have: Nginx, Git, Guava, Photoshop
(?!), Discourse, OpenBSD (and: other BSDs, Plan9, BSD tools, Linux,
LLVM/Clang, WebKit, Chrome, Firefox, Quake 1-3, Doom 3, CPython, TensorFlow),
Hashicorp's tools, Redis, Mysql, Postgresql, Apache HTTP server.

Wasn't the question about business applications?

Redeeming answers: ERPNext, Odoo, OpenERP, OpenERM

~~~
yellowapple
"Wasn't the question about business applications?"

Define "business application".

To me, it would be defined as "application used in a business" (EDIT: or more
precisely: "application upon which a business is built"). Web servers,
databases, and (maybe) operating systems definitely qualify. So do web
browsers.

~~~
softawre
Your definition is not the common one, I don't think.

~~~
yellowapple
Probably not. Nonetheless, "business application" is still pretty vague, IMO.

------
yodon
There's been a good deal of academic work on architectural differences between
open source and closed source applications (basically resulting from the
differences in the organizational structures that designed/built/grew them ala
Conway's Law). Observations for example include reports that closed source
applications tend to have more large scale API classes/layers, because there
is a management structure in the designing organization that can herd them
into existence, while open source projects of the same size and complexity
tend to have a less centralized architecture, again reflecting the organizing
characteristics of the developers involved[0].

None of this is arguing that one or the other style of architecture is
"better" per se, but rather the architectures are different because they were
in the end optimized for different kinds of development organizations.

Most business applications remain fundamentally a three-tiered architecture,
with the interesting stuff today tending to happen in how you slice that up
into microservices, how you manage the front end views (PHP and static web
apps are pretty different evolutionary branches), and critically how you
orchestrate the release and synchronization/discovery of all those
microservices.

(None of which is directly an answer to your question, but is more meant to
say that lots of the most interesting stuff is getting harder to spot in a
conventional github repository because much of it is moving much closer to the
ops side of devOps)

[0]
[http://www.hbs.edu/faculty/Publication%20Files/08-039_1861e5...](http://www.hbs.edu/faculty/Publication%20Files/08-039_1861e507-1dc1-4602-85b8-90d71559d85b.pdf)

~~~
eicnix
Do you have the name or a link to one of these studies?

~~~
yodon
I've updated the parent comment with a citation.

I'll also mention a somewhat related article here, not directly on topic, but
likely interesting to those reading about conway's law and architectures:
Microsoft Research did some very interesting work on the interplay of code
quality and organizational metrics (e.g. how high in the org chart do you have
to go to get everyone who committed code to a specific DLL or what fraction of
the developers under that lead engineer committed code to that DLL, or etc).
Their conclusion, simply put, was that organizational metrics appeared to
better model actual end user experienced shipped code quality than more
traditional test metrics[0].

[0] [https://www.microsoft.com/en-us/research/publication/the-
inf...](https://www.microsoft.com/en-us/research/publication/the-influence-of-
organizational-structure-on-software-quality-an-empirical-case-study/)

------
rushabh
Checkout ERPNext
([https://GitHub.com/frappe/erpnext](https://GitHub.com/frappe/erpnext)). It
is based on a metadata framework (Frappe) that lets you build by
configuration, so complexity can be handled much better.

Frappe also lets you build extensions (apps), add hooks to standard events,
has a built in RESTAPI and more. Here is a quick overview
[https://www.slideshare.net/mobile/rushabh_mehta/frapp-
framew...](https://www.slideshare.net/mobile/rushabh_mehta/frapp-framework-a-
full-stack-web-framework)

Disclaimer: see my bio

------
jph
Spree is an open source e-commerce solution. IMHO has good architecture for
learning.

Spree has a clean API, clear models, front end and back end, extensions, and
command line tools.

[https://github.com/spree/spree](https://github.com/spree/spree)

Especially take a look at the models:

[https://github.com/spree/spree/tree/master/core/app/models/s...](https://github.com/spree/spree/tree/master/core/app/models/spree)

~~~
ghosthamlet
a great app, thanks

------
dustingetz
[http://www.aosabook.org/](http://www.aosabook.org/) \- I actually did not get
much out of this book, i felt my time was more efficiently spent studying
languages and databases.

But this chapter is great: [http://www.aosabook.org/en/500L/an-archaeology-
inspired-data...](http://www.aosabook.org/en/500L/an-archaeology-inspired-
database.html)

------
taude
By business app, I'm interpreting as something that might be a a basis for
writing an enterprise application or an application that might be used by
enterprise and not the infrastructure-type of stuff I see posted below like
NGINX, Git, etc...

Something that's expandable by multiple departments, expandable business-
specific logic, modular, plug-in infrastructure, the ability to work with
multiple authentication schemes, etc....

Take a look at Liferay Portal: [https://github.com/liferay/liferay-
portal/](https://github.com/liferay/liferay-portal/)

Edit: fixed all my typos.

------
ctrlrsf
For an OSS business application, Rundeck
([http://rundeck.org/](http://rundeck.org/)) is very polished and has a clean
architecture. The concepts for setting up jobs, schedules, ACLs, etc, is
clearly thought out and flexible.

------
nimeshneema
[http://aosabook.org/en/index.html](http://aosabook.org/en/index.html)

------
nXqd
Discourse
[https://github.com/discourse/discourse](https://github.com/discourse/discourse)

~~~
africajam
I love discourse and learnt a hell of a lot from it! It did however lead me to
using ember in my open source project (
[https://github.com/etewiah/property_web_builder](https://github.com/etewiah/property_web_builder)
) which I rather regret.....

------
neves
There is a nice site site about this subject: The Architecture of Open Source
Applications
[http://aosabook.org/en/index.html](http://aosabook.org/en/index.html)

------
Top19
Two I am familiar with are OpenERP and OpenEMR.

OpenERP, now Odoo, is written in Python.

OpenEMR is written in PHP. It dates from a while ago, but has been mostly
updated to the latest PSR standards.

Might also try OrangeHCM, but not sure what those guys are doing these days.

------
albertzeyer
I'm not exactly sure what is meant by business. Commercial successful?

Anyway, here are some projects which I can recommend by its source code:

* OpenBSD. Also the other BSDs. Plan9. And the BSD tools. Linux is a bit bloated but maybe it has to be. I don't recommend the GNU tools.

* LLVM/Clang.

* WebKit. Also Chrome. Firefox not so much, although maybe it improved.

* Quake 1-3, as well as other earlier id games. Really elegant and clean. Also not that big in total. Doom 3 has become much bigger in comparison but again maybe it has to be.

* CPython. Anyway interesting also for educational purpose.

* TensorFlow. Very much not Theano.

I really enjoy reading the source code of most projects which I used at some
point. Some code is nicer, some not so nice, mostly judged by how easy it is
to understand and how elegant it seems to be. In any case it really is
rewarding to look at it as you will gain a much better understanding of the
software and often you will also learn something new.

~~~
ghosthamlet
My understanding for business application, the short answer is: software with
special business purpose

------
steedsofwar
Amongst the other great suggestions you could also have a look at Redis
([https://redis.io](https://redis.io))

------
pixelmonkey
One of my favorite "open source architecture" essays is on Graphite:

[http://www.aosabook.org/en/graphite.html](http://www.aosabook.org/en/graphite.html)

It's part of the book, "Architecture of Open Source Applications", which has
many such essays. This one is freely available -- and quite good.

Graphite is used for the business purpose of simple & fast real-time analytics
for custom metrics inside an organization. It was built inside Orbitz and is
now widely used at many startups, including my own.

Graphite is now a vibrant open source project with a community around it here:

[https://graphiteapp.org/](https://graphiteapp.org/)

~~~
sagichmal
Graphite has long ago hit the end of its useful life. Its limitations
especially in the Whisper/RRD storage system are well known and lamented by
those who still need to run it. A strictly-superior system (and a great OSS
project to learn from, to boot) is Prometheus,
[https://prometheus.io](https://prometheus.io).

------
bradgnar
Applications dont really need to be well architected until they are hitting
scale. Then the parts of their system that need to relieve pressure will need
to be re-architected. This is almost like a case study and there are a lot of
good talks on youtube from places like dropbox and facebook that explain the
problem and solution. Example:
[https://www.youtube.com/watch?v=PE4gwstWhmc](https://www.youtube.com/watch?v=PE4gwstWhmc)

If you dont want to do youtube case studies there are also books to read about
distributed systems. Also reading about cloud architecture can help.

~~~
LrnByTeach
> Applications don't really need to be well architected until they are hitting
> scale.

very True, 'a system Well architected' before hitting scale is considered OVER
Engineering

> Then the parts of their system that need to relieve pressure will need to be
> re-architected.

> This is almost like a case study and there are a lot of good talks on
> youtube from places like dropbox and facebook that explain the problem and
> solution. Example:
> [https://www.youtube.com/watch?v=PE4gwstWhmc](https://www.youtube.com/watch?v=PE4gwstWhmc)

------
NKCSS
As far as I know sqlite has the reputation of being great (mostly for the test
coverage and sheer amount of unit tests).

------
scarface74
From a usability and installation experience, Hashicorp's tools. One very
small executable for each of their products that work as the client or server,
a simple command to join them in a cluster, and reasonable defaults and the
ones I've used work well together.

The learning curve to go from I've never heard of them to reading about them,
to installing them and using them was very small at least for Consul, Nomad,
and Vault.

------
rrmmedia
Check out ERPNext written in python [https://erpnext.com](https://erpnext.com)

------
austinl
For iOS engineers, I'd recommend reading over the Kickstarter iOS application
([https://github.com/kickstarter/ios-oss](https://github.com/kickstarter/ios-
oss)).

They use a lot of interesting stuff, like FRP, lenses, etc.

------
chw9e
Artsy has a bunch of Open Source applications that are interesting to check
out, especially for those interested in mobile apps
[https://github.com/artsy](https://github.com/artsy)

------
cerisier
I find Apache Spark to be exceptionnaly well written and easy to read. (in
Scala). [https://github.com/apache/spark](https://github.com/apache/spark)

------
williape
Photoshop: [http://www.computerhistory.org/atchm/adobe-photoshop-
source-...](http://www.computerhistory.org/atchm/adobe-photoshop-source-code/)
Not open source but one of the most commercially successful and one of the
best architected. Original source code now available via Computer History
Museum.

------
kfk
Airbnb Superset. It's not mature yet, but it's enterprisey enough and the code
is clean.

------
slackingoff2017
If libraries count, Google Guava has some of the most impressive code quality
I've ever seen

------
kawera
PostgreSQL and Apache HTTP server.

------
patwalls
WooCommerce?

------
unixhero
I would say:

Gitlab

------
jackmott
postgresql?

------
marknote
Has anyone mentioned SQLite?

------
sidcool
Shameless plug, but Bahmni and the Go CD open source projects.

------
alfiedotwtf
MySQL:

"On January 16, 2008, MySQL AB announced that it had agreed to be acquired by
Sun Microsystems for approximately $1 billion"

[https://en.wikipedia.org/wiki/MySQL_AB](https://en.wikipedia.org/wiki/MySQL_AB)

Edit: sorry, missed the question entirely. I thought OP said "open-source
businesses worth studying"

