---
title: "Comment by Elvis Lee on \"The Tri-Z Architecture: a Pattern for Layering ZIO Applications in Scala\" | Hashnode"
description: "Hi, For the ZPure type W, you mentioned \"I've used it for storing events in an event sourcing application, for feeding a stream of messages to players in a game"
url: "https://hashnode.com/posts/the-tri-z-architecture-a-pattern-for-layering-zio-applications-in-scala/66b07c222ac672d4672fe731/comment/66b3098bc035a93b10be0e83"
---

[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)

[Elvis Lee](https://hashnode.com/@Elvis5566)

[Aug 7, 2024](https://hashnode.com/posts/the-tri-z-architecture-a-pattern-for-layering-zio-applications-in-scala/66b07c222ac672d4672fe731/comment/66b3098bc035a93b10be0e83)

Hi, For the ZPure type W, you mentioned "I've used it for storing events in an event sourcing application, for feeding a stream of messages to players in a game, but also for storing actual logs" Isn't logging or firing events a side effect? And should no be in ZPure?

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

[Aug 7, 2024](https://hashnode.com/posts/the-tri-z-architecture-a-pattern-for-layering-zio-applications-in-scala/66b07c222ac672d4672fe731/comment/66b3098bc035a93b10be0e83#reply-66b31881ee899826043ad5d3)

That's right, but in the ZPure layer I only accumulate them. After running the ZPure, if the program was successful only then I actually log them or do something with them.

[Elvis Lee](https://hashnode.com/@Elvis5566)

[Aug 7, 2024](https://hashnode.com/posts/the-tri-z-architecture-a-pattern-for-layering-zio-applications-in-scala/66b07c222ac672d4672fe731/comment/66b3098bc035a93b10be0e83#reply-66b3300c0788c291edaa78dd)

I See, Thank you :)
