---
title: "Comment by ZHE ZHANG on \"The Tri-Z Architecture: a Pattern for Layering ZIO Applications in Scala\" | Hashnode"
description: "I have one more question. If there are two programs, for example, Guild and Inventory, with their states being GuildState and InventoryState respectively, and i"
url: "https://hashnode.com/posts/the-tri-z-architecture-a-pattern-for-layering-zio-applications-in-scala/66b07c222ac672d4672fe731/comment/67ad975695477e0a716474d9"
---

[Discussion](https://hashnode.com/posts/the-tri-z-architecture-a-pattern-for-layering-zio-applications-in-scala/66b07c222ac672d4672fe731)

Comment [The Tri-Z Architecture: a Pattern for Layering ZIO Applications in Scala](https://hashnode.com/posts/the-tri-z-architecture-a-pattern-for-layering-zio-applications-in-scala/66b07c222ac672d4672fe731)

[ZHE ZHANG](https://hashnode.com/@zhangjiji)

[Feb 13, 2025](https://hashnode.com/posts/the-tri-z-architecture-a-pattern-for-layering-zio-applications-in-scala/66b07c222ac672d4672fe731/comment/67ad975695477e0a716474d9)

I have one more question. If there are two programs, for example, Guild and Inventory, with their states being GuildState and InventoryState respectively, and if I want to combine them to write new logic, do I need some kind of "glue" program?

[Pierre Ricadat](https://hashnode.com/@ghostdogpr)

[Feb 13, 2025](https://hashnode.com/posts/the-tri-z-architecture-a-pattern-for-layering-zio-applications-in-scala/66b07c222ac672d4672fe731/comment/67ad975695477e0a716474d9#reply-67ad9c3fc13bd8ce98ecd3f5)

I usually keep the State common for all my programs. If they are really different entities, I keep the logic completely separate and have them communicate with each other (e.g. via messages).
