How large are the projects you are dealing with?

How large projects are you dealing with?
I would like to hear about others and their Erlang related projects.
How large are the codebases in general

The Erlang VM has very good built in support for building scalable distributed systems, require high concurrency and live code upgrades and for those reasons I am at expression that solutions written in Erlang are rather big and not so simple.

I have no professional experience with Erlang based systems (hopefully only yet :slight_smile: ) and can compare to other platforms that I deal with in my everyday work(Drupal/Laravel/NodeJs)
For example one enterprise level project has about ~2000 custom written files(3rd party and any machine generated files excluded) which includes ~50k lines of code.

I wonder how much is Erlang used in small scale projects compared to larger ones.
If I would land a Erlang developer job would I be building the next Whatsapp or a blog? :smiley:

Love to hear your thoughts on that, thanks :slight_smile:

1 Like

To give you an idea, this is the output of cloc for the Zotonic umbrella project , without its dependencies:

--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
Erlang                         1681          39914          59955         310222
PO File                          60          59106          62719         120062
HTML                            910          30966              2          82563
JavaScript                      219           7712           7265          53250
CSS                              83           2008           1370          30570
reStructuredText               1292          12224           4962          23451
SVG                              45              2             32          15717
make                             22           2707            643          13847
Markdown                         90           3935              0          11965
LESS                             97            679           1192           7736
SCSS                             80           1402           1586           6405
TypeScript                        1              0              0           3036
C++                               3            366            282           2081
JSON                             10              0              0           1723
C                                 6            266            202           1395
(...)
--------------------------------------------------------------------------------
SUM:                           4670         162024         140872         687288
--------------------------------------------------------------------------------

And when it is built (including extra dependencies):

--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
Erlang                         1971          49184          71695         452098
PO File                          60          59106          62719         120062
HTML                            914          31072              2          83215
JavaScript                      219           7712           7265          53250
CSS                              84           2009           1375          30694
make                             35           5335           1246          26943
reStructuredText               1292          12224           4962          23451
Markdown                        128           5807              0          17600
SVG                              45              2             32          15717
LESS                             97            679           1192           7736
SCSS                             80           1402           1586           6405
C++                               5            651            528           3763
TypeScript                        1              0              0           3036
C/C++ Header                     10            349            353           1965
JSON                             10              0              0           1723
C                                 7            285            232           1528
(...)
--------------------------------------------------------------------------------
SUM:                           5031         176445         153760         851744
--------------------------------------------------------------------------------
4 Likes

Stats for a load test application we wrote:

--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
Erlang                          119           3057           5561          20246
C                                 6            385            921           1143
Bourne Shell                      6             54             95            194
YAML                              1             16              5             97
make                              3             27              4             56
Bourne Again Shell                1             10             29             54
Markdown                          1             13              0             52
C/C++ Header                      3             45            253             36
JSON                              2              4              0             34
Dockerfile                        1              5              6             16
--------------------------------------------------------------------------------
SUM:                            143           3616           6874          21928
--------------------------------------------------------------------------------

Turns out most of the C code is actually redundant (a port driver for networking shenanigans); there is also some NIF code which was to save re-writing existing algorithms.

3 Likes

Thanks for sharing! If that much went into load test application I guess the number must be huge for the main application itself.
How much traffic does such application handle?

1 Like

Thanks for sharing! Drupal(CMS) core has 143165 lines of PHP code so compared to Zotonic it’s less than half of it’s Erlang code. Pretty impressive numbers.

1 Like

LOC is never a great metric to compare systems unless it’s a real apples-to-apples, feature-to-feature comparison.

One of the reasons I love Erlang is the ability, in many cases, to do way more with far less and more succinct code

Just my 2c

1 Like

The main application (sadly) was not in Erlang and yes, pretty large! The traffic is actually not that high on a WhatsApp type scale, but is very much real time, and with lots of concurrent bursty activity.

^^ this :slight_smile:

2 Likes

Our main product at work uses Erlang in several important microservices.

───────────────────────────────────────────────────────────────────────────────
Language                     Files       Lines     Blanks    Comments      Code
───────────────────────────────────────────────────────────────────────────────
Erlang                        1945      943970      36759       36005    871206
2 Likes