Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relationships in deploymentGroups #223

Open
gravis opened this issue Oct 18, 2023 · 0 comments
Open

Relationships in deploymentGroups #223

gravis opened this issue Oct 18, 2023 · 0 comments

Comments

@gravis
Copy link

gravis commented Oct 18, 2023

Description

Follow up of structurizr/dsl#67: deploymentGroups are great but they have a limitation that makes them hard to use sometimes: Once in a group, instances "lose" connections with objects outside of the group.

In the example bellow, we can see that the DB container is getting isolated as soon as deploymentGroups are used. I could add it to the group too, but for complex diagrams, it becomes really hard to maintain these groups.

workspace "deploymentGroup" {

    model {
        ss = softwaresystem "Application" {
          rails = container "Rails" "Fullstack service" "Ruby on Rails"
          sidekiq = container "Sidekiq" "Jobs queue" "Ruby on Rails"
          redis = container "Redis" "State" "redis server"
          db = container "DB" "Database" "PostgreSQL"
        }

        rails -> redis "Cache and queue jobs" "Redis protocol"
        sidekiq -> redis "Fetch and execute jobs" "Redis protocol"
        rails -> db "Store and retrieve metadata" "PostgreSQL protocol"
        sidekiq -> db "Store and retrieve metadata" "PostgreSQL protocol"

        live = deploymentEnvironment "Live" {

            redis_cache = deploymentGroup "Redis Cache"
            redis_persistent = deploymentGroup "Redis Persistent"

            deploymentNode "Application" {
                containerInstance rails redis_cache,redis_persistent
            }
            deploymentNode "Sidekiq" {
                containerInstance sidekiq redis_persistent
            }
            
            deploymentNode "Redis Cache" {
                containerInstance redis redis_cache
            }
            
            deploymentNode "Redis Persistent" {
                containerInstance redis redis_persistent
            }
            deploymentNode "DB" {
                containerInstance db
            }
        }
    }

    views {
        deployment ss "Live" "AppDeployment" {
            include *
            autolayout lr
        }
    }
}
Screenshot 2023-10-18 at 17 54 44

I wonder if it wouldn't be best to not force the external connections to a group to declare they're part of the group (ex: containerInstance rails redis_cache,redis_persistent) and instead let the user define or redefine the new connections.
In the example above again, the "Cache and queue jobs" relationship works fine when a single node hosts redis. But in this case, we have two nodes using the same component, with two different purposes. I'd like to be able to define that rails is using redis for cache in the redis_cache group only.

Priority

Low

Resolution

I have no budget and there's no rush, please add this feature for free

More information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants