Effect CommunityEC
Effect Communityβ€’2mo agoβ€’
6 replies
eat_those_lemons

Clarification on Services and Layers in Effect Typescript Library

I am trying to understand the vocabulary around services and layers. The way things are worded in the docs https://effect.website/docs/requirements-management/layers/#creating-layers
Seems to imply that Layers are the name of the actual object like "PostgresLive" is a layer and so is" Neo4jLive". However later in the docs it talks about using Effect.Service to create services and layers in one step. Which sounds like "PostgresLive" is actually a service

My understanding is one of them is like an interface, ie each "live" will implement methods A, B, C. But I don't understand if layers or services are the "interface" and which is the "live"

Also does Effect.Service not allow you to have multiple layers/services, like "PostgresLive" and "Neo4jLive"?
Effect Documentation
Learn how to use layers in Effect to manage service dependencies and build efficient, clean dependency graphs for your applications.
Managing Layers
Was this page helpful?