You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/06/22 17:33:41 UTC

[GitHub] [maven-resolver] cstamas opened a new pull request, #185: Add some TLP doco about shared local repo access

cstamas opened a new pull request, #185:
URL: https://github.com/apache/maven-resolver/pull/185

   Add short intro to page available from TLP, not buried in some module...
   
   Inspired by https://github.com/apache/maven-resolver/pull/184


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-resolver] cstamas commented on a diff in pull request #185: Add some TLP doco about shared local repo access

Posted by GitBox <gi...@apache.org>.
cstamas commented on code in PR #185:
URL: https://github.com/apache/maven-resolver/pull/185#discussion_r904095056


##########
maven-resolver-named-locks/src/site/markdown/index.md.vm:
##########
@@ -52,8 +56,7 @@ Finally, "distributed" named lock implementations are the following (separate mo
 - `semaphore-hazelcast-client` implemented in `org.eclipse.aether.named.hazelcast.HazelcastClientCPSemaphoreNamedLockFactory`.
 - `semaphore-hazelcast` implemented in `org.eclipse.aether.named.hazelcast.HazelcastCPSemaphoreNamedLockFactory`.
 
-Local named locks are only suited within one JVM with a multithreaded build.
-Sharing a local repository between multiple Maven processes (i.e., on a busy CI server) requires a distributed named lock!
+Sharing a local repository between multiple hosts (i.e., on a busy CI server) requires a distributed named lock!
 

Review Comment:
   Agreed, but that's actually the point as well: they do not recommend as Maven had issues with it before resolver 1.7 :wink: 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-resolver] michael-o commented on pull request #185: Add some TLP doco about shared local repo access

Posted by GitBox <gi...@apache.org>.
michael-o commented on PR #185:
URL: https://github.com/apache/maven-resolver/pull/185#issuecomment-1165312251

   Will review today...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-resolver] kwin commented on a diff in pull request #185: Add some TLP doco about shared local repo access

Posted by GitBox <gi...@apache.org>.
kwin commented on code in PR #185:
URL: https://github.com/apache/maven-resolver/pull/185#discussion_r904088244


##########
maven-resolver-named-locks/src/site/markdown/index.md.vm:
##########
@@ -52,8 +56,7 @@ Finally, "distributed" named lock implementations are the following (separate mo
 - `semaphore-hazelcast-client` implemented in `org.eclipse.aether.named.hazelcast.HazelcastClientCPSemaphoreNamedLockFactory`.
 - `semaphore-hazelcast` implemented in `org.eclipse.aether.named.hazelcast.HazelcastCPSemaphoreNamedLockFactory`.
 
-Local named locks are only suited within one JVM with a multithreaded build.
-Sharing a local repository between multiple Maven processes (i.e., on a busy CI server) requires a distributed named lock!
+Sharing a local repository between multiple hosts (i.e., on a busy CI server) requires a distributed named lock!
 

Review Comment:
   Maybe the example CI server is not the best as I don’t know of any tools which recommend or ease setting up a shared Maven repo used by distributed nodes…



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-resolver] kwin commented on a diff in pull request #185: Add some TLP doco about shared local repo access

Posted by GitBox <gi...@apache.org>.
kwin commented on code in PR #185:
URL: https://github.com/apache/maven-resolver/pull/185#discussion_r904088244


##########
maven-resolver-named-locks/src/site/markdown/index.md.vm:
##########
@@ -52,8 +56,7 @@ Finally, "distributed" named lock implementations are the following (separate mo
 - `semaphore-hazelcast-client` implemented in `org.eclipse.aether.named.hazelcast.HazelcastClientCPSemaphoreNamedLockFactory`.
 - `semaphore-hazelcast` implemented in `org.eclipse.aether.named.hazelcast.HazelcastCPSemaphoreNamedLockFactory`.
 
-Local named locks are only suited within one JVM with a multithreaded build.
-Sharing a local repository between multiple Maven processes (i.e., on a busy CI server) requires a distributed named lock!
+Sharing a local repository between multiple hosts (i.e., on a busy CI server) requires a distributed named lock!
 

Review Comment:
   Maybe the example CI server is not the best as I don’t know of any tools which recommend or eases setting up a shared Maven repo used by distributed nodes…



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-resolver] cstamas commented on pull request #185: Add some TLP doco about shared local repo access

Posted by GitBox <gi...@apache.org>.
cstamas commented on PR #185:
URL: https://github.com/apache/maven-resolver/pull/185#issuecomment-1163487452

   https://maven.apache.org/resolver-archives/resolver-LATEST/local-repository.html


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-resolver] michael-o commented on a diff in pull request #185: Add some TLP doco about shared local repo access

Posted by GitBox <gi...@apache.org>.
michael-o commented on code in PR #185:
URL: https://github.com/apache/maven-resolver/pull/185#discussion_r906287147


##########
maven-resolver-named-locks/src/site/markdown/index.md.vm:
##########
@@ -23,28 +23,41 @@ Named locks are essentially locks that are assigned to some given (opaque) ID. I
 resources that each can have unique ID assigned (i.e., file with an absolute path, some entities with unique ID),
 then you can use named locks to make sure they are being protected from concurrent read and write actions.
 
-Named locks provide support classes for implementations, and provide out of the box seven named lock implementations and three name mappers.
+Named locks provide support classes for implementations, and provide out of the box several lock and name mapper implementations.
 
-Out of the box, "local" (local to JVM) named lock implementations are the following:
+Following implementations are "local" (local to JVM) named lock implementations:
 
 - `rwlock-local` implemented in `org.eclipse.aether.named.providers.LocalReadWriteLockNamedLockFactory` that uses
   JVM `java.util.concurrent.locks.ReentrantReadWriteLock`.
 - `semaphore-local` implemented in `org.eclipse.aether.named.providers.LocalSemaphoreNamedLockFactory` that uses
   JVM `java.util.concurrent.Semaphore`.
+- `noop` implemented in `org.eclipse.aether.named.providers.NoopNamedLockFactory` that uses no locking.
+
+Note about "local" locks: they are in-JVM, in a way, they properly coordinate in case of multithreaded access from
+same JVM, but does not cover accesses across multiple processes and multiple hosts access.

Review Comment:
   but do not cover access



##########
maven-resolver-named-locks/src/site/markdown/index.md.vm:
##########
@@ -23,28 +23,41 @@ Named locks are essentially locks that are assigned to some given (opaque) ID. I
 resources that each can have unique ID assigned (i.e., file with an absolute path, some entities with unique ID),
 then you can use named locks to make sure they are being protected from concurrent read and write actions.
 
-Named locks provide support classes for implementations, and provide out of the box seven named lock implementations and three name mappers.
+Named locks provide support classes for implementations, and provide out of the box several lock and name mapper implementations.
 
-Out of the box, "local" (local to JVM) named lock implementations are the following:
+Following implementations are "local" (local to JVM) named lock implementations:
 
 - `rwlock-local` implemented in `org.eclipse.aether.named.providers.LocalReadWriteLockNamedLockFactory` that uses
   JVM `java.util.concurrent.locks.ReentrantReadWriteLock`.
 - `semaphore-local` implemented in `org.eclipse.aether.named.providers.LocalSemaphoreNamedLockFactory` that uses
   JVM `java.util.concurrent.Semaphore`.
+- `noop` implemented in `org.eclipse.aether.named.providers.NoopNamedLockFactory` that uses no locking.
+
+Note about "local" locks: they are in-JVM, in a way, they properly coordinate in case of multithreaded access from
+same JVM, but does not cover accesses across multiple processes and multiple hosts access.
+In other words, local named locks are only suited within one JVM with a multithreaded access.
+
+Following named lock implementations use underlying OS advisory file locking:
+
 - `file-lock` implemented in `org.eclipse.aether.named.providers.FileLockNamedLockFactory` that uses
   JVM `java.nio.channels.FileLock`.
-- `noop` implemented in `org.eclipse.aether.named.providers.NoopNamedLockFactory` that uses no locking.
 
-Out of the box, "distributed" named lock implementations are the following (separate modules which require additional dependencies):
+The `file-lock` implementation uses OS advisory file locking, hence, concurrently running Maven processes

Review Comment:
   same



##########
src/site/markdown/local-repository.md:
##########
@@ -160,3 +146,36 @@ class that provides all the defaults.
 The factory should create a stateless instance of a composer
 configured from passed in session, that will be used with the enhanced LRM
 throughout the session.
+
+### Simple LRM
+
+Simple is a fully functional LRM implementation, but is used
+mainly in tests, it is not recommended in production environments.
+
+To manually instantiate a simple LRM, one needs to invoke following code:
+
+```java
+LocalRepositoryManager simple = new SimpleLocalRepositoryManagerFactory()
+        .newInstance( session, new LocalRepository( baseDir ) );
+```
+
+Note: This code snippet above instantiates a component, that is not
+recommended way to use it, as it should be rather injected whenever possible.
+This example above is merely a showcase how to obtain LRM implementation
+in unit tests.
+
+## Shared access to Local Repository

Review Comment:
   Access



##########
maven-resolver-named-locks/src/site/markdown/index.md.vm:
##########
@@ -23,28 +23,41 @@ Named locks are essentially locks that are assigned to some given (opaque) ID. I
 resources that each can have unique ID assigned (i.e., file with an absolute path, some entities with unique ID),
 then you can use named locks to make sure they are being protected from concurrent read and write actions.
 
-Named locks provide support classes for implementations, and provide out of the box seven named lock implementations and three name mappers.
+Named locks provide support classes for implementations, and provide out of the box several lock and name mapper implementations.
 
-Out of the box, "local" (local to JVM) named lock implementations are the following:
+Following implementations are "local" (local to JVM) named lock implementations:
 
 - `rwlock-local` implemented in `org.eclipse.aether.named.providers.LocalReadWriteLockNamedLockFactory` that uses
   JVM `java.util.concurrent.locks.ReentrantReadWriteLock`.
 - `semaphore-local` implemented in `org.eclipse.aether.named.providers.LocalSemaphoreNamedLockFactory` that uses
   JVM `java.util.concurrent.Semaphore`.
+- `noop` implemented in `org.eclipse.aether.named.providers.NoopNamedLockFactory` that uses no locking.
+
+Note about "local" locks: they are in-JVM, in a way, they properly coordinate in case of multithreaded access from
+same JVM, but does not cover accesses across multiple processes and multiple hosts access.
+In other words, local named locks are only suited within one JVM with a multithreaded access.
+
+Following named lock implementations use underlying OS advisory file locking:

Review Comment:
   OS => file system
   Since it depends on the FS, not really the OS



##########
maven-resolver-named-locks/src/site/markdown/index.md.vm:
##########
@@ -23,28 +23,41 @@ Named locks are essentially locks that are assigned to some given (opaque) ID. I
 resources that each can have unique ID assigned (i.e., file with an absolute path, some entities with unique ID),
 then you can use named locks to make sure they are being protected from concurrent read and write actions.
 
-Named locks provide support classes for implementations, and provide out of the box seven named lock implementations and three name mappers.
+Named locks provide support classes for implementations, and provide out of the box several lock and name mapper implementations.
 
-Out of the box, "local" (local to JVM) named lock implementations are the following:
+Following implementations are "local" (local to JVM) named lock implementations:
 
 - `rwlock-local` implemented in `org.eclipse.aether.named.providers.LocalReadWriteLockNamedLockFactory` that uses
   JVM `java.util.concurrent.locks.ReentrantReadWriteLock`.
 - `semaphore-local` implemented in `org.eclipse.aether.named.providers.LocalSemaphoreNamedLockFactory` that uses
   JVM `java.util.concurrent.Semaphore`.
+- `noop` implemented in `org.eclipse.aether.named.providers.NoopNamedLockFactory` that uses no locking.
+
+Note about "local" locks: they are in-JVM, in a way, they properly coordinate in case of multithreaded access from
+same JVM, but does not cover accesses across multiple processes and multiple hosts access.

Review Comment:
    processes and/or multiple hosts



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-resolver] cstamas commented on pull request #185: Add some TLP doco about shared local repo access

Posted by GitBox <gi...@apache.org>.
cstamas commented on PR #185:
URL: https://github.com/apache/maven-resolver/pull/185#issuecomment-1163418698

   @kwin ping


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-resolver] cstamas merged pull request #185: Add some TLP doco about shared local repo access

Posted by GitBox <gi...@apache.org>.
cstamas merged PR #185:
URL: https://github.com/apache/maven-resolver/pull/185


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-resolver] kwin commented on pull request #185: Add some TLP doco about shared local repo access

Posted by GitBox <gi...@apache.org>.
kwin commented on PR #185:
URL: https://github.com/apache/maven-resolver/pull/185#issuecomment-1163425146

   Thanks looks good to me, can you also update https://maven.apache.org/resolver/maven-resolver-named-locks/index.html in this PR based on #184 as I think you guys know best how to clarify the doc with regards to `file-lock` (and its limitations). Thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org