Hacker News new | past | comments | ask | show | jobs | submit login

We (~150 eng) build microservices in a polyglot environment (mostly Python, JS, and Go), all in a monorepo! We also build + deploy in containers with Jenkins, etc.

The structure looks something like this:

    |-- third_party (third party libs)
    `-- python
        |-- libs (internally-written, common dependencies)
        `-- application_name
            |-- client (react app, connects to flask)
            |-- server (flask app, connects to services)
            `-- services (microservices)
We use a dependency-management + build tool (https://www.pantsbuild.org/index.html, we started before Bazel was public) to manage dependencies. Without pants, our repo would be a mess.

Let me know if you have any questions, I'm happy to answer them! I'm super happy about our setup and eager to share it :)




> Without pants, our repo would be a mess.

Filed under sentences I never thought I'd hear.


Hahaha, because pants is a bad tool? Or because it sounds funny? I’m sympathetic to both :)

In defense of pants, I meant that our repo would be a mess without a versioned dependency graph + reproducible builds. Of course other tools give you that too, and definitely do it better than pants does.

I guess I should have said “without some build tool”, our repo would be a mess.


Organising apps by language seems weird...


Hierarchical layout demands choices be made, but there are advantages in grouping source packages by language: 1) can naturally reflect object packaging models of target language (eg python, jvm). 2) this can encourage reuse of packages across projects.


I've seen this and it works rather well in that one can have per-language bottom level build setup (with autoconf for C, setuptools for Python, ...).


I agree with the GP that it seems weird, and with you that it has its benefits. Of course, other approaches have their own benefits.

Personally, I feel like the top-level directory ordering for a monorepo is somewhat arbitrary, in that you can argue for anything, but it probably doesn’t matter; especially if you have a decent build tool.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: