Serverless Beyond the Buzzword by Thomas Smart

Serverless Beyond the Buzzword by Thomas Smart

Author:Thomas Smart
Language: eng
Format: epub
ISBN: 9781484287613
Publisher: Apress


CloudFormation stacks have several capabilities related to project structure. What do these capabilities do, and which can help with Serverless applications?

There are two strategies for code repositories, mono-repo and multi-repo.

Mono-repo

A mono-repo is a single repository containing all the project’s code and configuration. In some cases, it might even include multiple projects. Monolithic applications use mono-repos because they have many internal dependencies. So splitting them into individual components is too challenging.

In a Serverless project using a mono-repo, all infrastructure configuration, microservices, and interfaces are bundled into a single repository. All developers will work with this single repository and have access to all code and infrastructure configuration within it. While write access can be managed through branches and pull requests, the entire team, regardless of rank, internal or external, will at least have read access to the entire project.

This approach keeps things simple and can work well for small projects with few developers. However, there are security and code management challenges to consider for larger teams and more complex projects.

An advantage of a mono-repo is that it can foster collaboration and communication among developers. Since everyone is working on the same code base, it discourages developers from working in silos.

With a single repository, commonly used code can be shared through a shared folder structure or similar, and developers can easily reference other developers’ code or any shared components they need to interact with.

Mono-repos can simplify dependency management, as the relevant functions and files are together in a single location. Changes can be made and tested locally, and there is a single source of truth.

With a single code base, it can be easier to achieve best practices since there is shared oversight. Any team member can provide feedback, and other parts of the code can be referenced as an example.

A downside of mono-repo is the complication of the CI/CD pipeline. Either the entire code base needs to be deployed, which can be very time-consuming, or we need to be able to partially deploy code, which can be complex to implement, and risk dependencies being missed or not tested properly.

Testing typically needs to remain in place for the entire application if there are dependencies or shared code. Only testing the changed code could lead to missing issues in other parts of the application that might depend on that code.

With a larger code base, version control may see a decline in performance. For example, it may take some time for the tool to respond when checking the status of a repository with a large code base.

Finally, in a collaborative environment, there will be many changes to the repository, and this could increase the likelihood of a broken branch, which will affect future requests until it is fixed.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.