From commits-return-3459-archive-asf-public=cust-asf.ponee.io@polygene.apache.org Mon Apr 9 16:34:18 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 740BB1807C2 for ; Mon, 9 Apr 2018 16:34:15 +0200 (CEST) Received: (qmail 70691 invoked by uid 500); 9 Apr 2018 14:34:14 -0000 Mailing-List: contact commits-help@polygene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@polygene.apache.org Delivered-To: mailing list commits@polygene.apache.org Received: (qmail 70297 invoked by uid 99); 9 Apr 2018 14:34:14 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Apr 2018 14:34:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 73C88F6BA3; Mon, 9 Apr 2018 14:34:13 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: niclas@apache.org To: commits@polygene.apache.org Date: Mon, 09 Apr 2018 14:34:30 -0000 Message-Id: In-Reply-To: <51bd6a9912cc4bb79236a6f162c8dcc6@git.apache.org> References: <51bd6a9912cc4bb79236a6f162c8dcc6@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [18/31] polygene-website git commit: Updated to new logo. Added ApacheCon resource on landing pages. http://git-wip-us.apache.org/repos/asf/polygene-website/blob/538baaf6/content/java/develop/library-invocation-cache.html ---------------------------------------------------------------------- diff --git a/content/java/develop/library-invocation-cache.html b/content/java/develop/library-invocation-cache.html index fdd4e42..223d303 100644 --- a/content/java/develop/library-invocation-cache.html +++ b/content/java/develop/library-invocation-cache.html @@ -1,5 +1,5 @@ -Invocation Cache +Invocation Cache @@ -66,17 +66,17 @@ })(); -

Invocation Cache

code

docs

tests

The Invocation Cache Library provides constructs to easily cache the return value of -method invocations on composites.

Note

It has nothing to do with the Cache SPI.

Table 28. Artifact

Group IDArtifact IDVersion

org.apache.polygene.libraries

org.apache.polygene.library.invocation-cache

3.1.0-SNAPSHOT


By applying one of the Concerns it is possible to cache the return values of method +

Invocation Cache

code

docs

tests

The Invocation Cache Library provides constructs to easily cache the return value of +method invocations on composites.

Note

It has nothing to do with the Cache SPI.

Table 28. Artifact

Group IDArtifact IDVersion

org.apache.polygene.libraries

org.apache.polygene.library.invocation-cache

0


By applying one of the Concerns it is possible to cache the return values of method calls. The concern will in turn delegate to the InvocationCache that is expected to be a -Private Mixin in the same composite.

@Cached

This annotation is used to mark the methods that should be considered for caching. Only if a +Private Mixin in the same composite.

@Cached

This annotation is used to mark the methods that should be considered for caching. Only if a caching concern has been defined and that an InvocationCache implementation mixin has been provided -will the caching actually take place.

ReturnCachedValueConcern

This generic mixin implementation will first look in the cache and see if the value is there, if so the value +will the caching actually take place.

ReturnCachedValueConcern

This generic mixin implementation will first look in the cache and see if the value is there, if so the value is unconditionally returned to the caller.

This concern skip its function if there is no InvocationCache mixin declared on the composite or if the method -has a void return type.

ReturnCachedValueOnExceptionConcern

This generic mixin implementation will first call the method, and if it fails with an Exception, it will try to +has a void return type.

ReturnCachedValueOnExceptionConcern

This generic mixin implementation will first call the method, and if it fails with an Exception, it will try to return a value from the cache. If no value is present in the cache (i.e. null is returned from the cache) then the exception will be rethrown.

This concern skip its function if there is no InvocationCache mixin declared on the composite or if the method -has a void return type.

Example

Let’s say that we have some service that is very expensive to call.

public interface ExpensiveOperation
+has a void return type.

Example

Let’s say that we have some service that is very expensive to call.

public interface ExpensiveOperation
 {
     @Cached
     double compute( double... arguments );
@@ -98,7 +98,7 @@ provided.

public class ExpensiveModul
 }
 

It is important to realize that the SimpleInvocationCache implementation never drops the cached values, and it is not possible to instruct it to do so. So, in most cases it is required to implement the InvocationCache -interface yourself, and choose a caching strategy that works for you.

Custom InvocationCache implementation

The interface to implement is very straight forward. It is important to realize that the implementation is a +interface yourself, and choose a caching strategy that works for you.

Custom InvocationCache implementation

The interface to implement is very straight forward. It is important to realize that the implementation is a Private Mixin of the composite where the caching is applied, and not a separate service. So, if the implementation is expecting to be part of an entity, it is possible to have

@This
 private Identity myIdentity;

to get hold of the current entity’s Identity. This approach makes the caching a lot simpler than if a separate http://git-wip-us.apache.org/repos/asf/polygene-website/blob/538baaf6/content/java/develop/library-jmx.html ---------------------------------------------------------------------- diff --git a/content/java/develop/library-jmx.html b/content/java/develop/library-jmx.html index 122e83a..450763b 100644 --- a/content/java/develop/library-jmx.html +++ b/content/java/develop/library-jmx.html @@ -1,5 +1,5 @@ -JMX +JMX @@ -66,11 +66,11 @@ })(); -

JMX

code

docs

tests

The JMX library provides a service that exposes a Polygene™ application in +

JMX

code

docs

tests

The JMX library provides a service that exposes a Polygene™ application in JMX automatically, giving you an opportunity to inspect the application much as -you would with the Envisage Tool tool.

Table 29. Artifact

Group IDArtifact IDVersion

org.apache.polygene.libraries

org.apache.polygene.library.jmx

3.1.0-SNAPSHOT


Services configuration is editable through their corresponding JMX beans. -You can also restart your services so the new configuration is picked up.

library-jmx.png

Assembly

JMX Support for Polygene™ applications:

new JMXAssembler().assemble( module );
+you would with the Envisage Tool tool.

Table 29. Artifact

Group IDArtifact IDVersion

org.apache.polygene.libraries

org.apache.polygene.library.jmx

0


Services configuration is editable through their corresponding JMX beans. +You can also restart your services so the new configuration is picked up.

library-jmx.png

Assembly

JMX Support for Polygene™ applications:

new JMXAssembler().assemble( module );
 

Managing the MX Beans Server from your Polygene™ application using the JMXConnectorService:

module.services( JMXConnectorService.class ).instantiateOnStartup();
 module.entities( JMXConnectorConfiguration.class );
 module.forMixin( JMXConnectorConfiguration.class ).declareDefaults().port().set( 1099 );

http://git-wip-us.apache.org/repos/asf/polygene-website/blob/538baaf6/content/java/develop/library-locking.html
----------------------------------------------------------------------
diff --git a/content/java/develop/library-locking.html b/content/java/develop/library-locking.html
index 2a26899..9fc1110 100644
--- a/content/java/develop/library-locking.html
+++ b/content/java/develop/library-locking.html
@@ -1,5 +1,5 @@
 
-Locking
+Locking
 
 
 
@@ -66,12 +66,12 @@
   })();
  
 
-  

Locking

code

docs

tests

The Locking Library is a simple way to mark method with Read or Write locks, and the details is handled by this -library.

This library is heavily used in EntityStore implementations.

Table 30. Artifact

Group IDArtifact IDVersion

org.apache.polygene.libraries

org.apache.polygene.library.locking

3.1.0-SNAPSHOT


The library creates a java.util.concurrent.ReentrantReadWriteLock which is shared for all methods within the +

Locking

code

docs

tests

The Locking Library is a simple way to mark method with Read or Write locks, and the details is handled by this +library.

This library is heavily used in EntityStore implementations.

Table 30. Artifact

Group IDArtifact IDVersion

org.apache.polygene.libraries

org.apache.polygene.library.locking

0


The library creates a java.util.concurrent.ReentrantReadWriteLock which is shared for all methods within the composite. It then acquires the read or write lock in a concern that is applied to the methods of the composite, which -have the corresponding annotations.

@ReadLock

This annotation will apply the ReadLockConcern to the method, and acquire the lock.readLock() on entry and relase -it on exit of the method. See the ReentrantReadWriteLock for details on how/when to use it and the exact semantics.

@WriteLock

This annotation will apply the WriteLockConcern to the method, and acquire the lock.writeLock() on entry and relase -it on exit of the method. See the ReentrantReadWriteLock for details on how/when to use it and the exact semantics.

LockingAbstractComposite

This composite type is the easiest way to use this library. Simple extend you composite type interface with this +have the corresponding annotations.

@ReadLock

This annotation will apply the ReadLockConcern to the method, and acquire the lock.readLock() on entry and relase +it on exit of the method. See the ReentrantReadWriteLock for details on how/when to use it and the exact semantics.

@WriteLock

This annotation will apply the WriteLockConcern to the method, and acquire the lock.writeLock() on entry and relase +it on exit of the method. See the ReentrantReadWriteLock for details on how/when to use it and the exact semantics.

LockingAbstractComposite

This composite type is the easiest way to use this library. Simple extend you composite type interface with this interface and start marking the methods with the above annotations. No other complex assembly is required.

public interface SomeService
     extends ServiceComposite, LockingAbstractComposite
 {

http://git-wip-us.apache.org/repos/asf/polygene-website/blob/538baaf6/content/java/develop/library-logging.html
----------------------------------------------------------------------
diff --git a/content/java/develop/library-logging.html b/content/java/develop/library-logging.html
index 09f98b9..e174d7c 100644
--- a/content/java/develop/library-logging.html
+++ b/content/java/develop/library-logging.html
@@ -1,5 +1,5 @@
 
-Logging
+Logging
 
 
 
@@ -66,9 +66,9 @@
   })();
  
 
-  

Logging

code

docs

tests

First of all, Polygene™ is taking a fresh look at all things that we take for granted. Logging is one such thing.

It should (but is not) obvious that Logging are used for three very distinct purposes, and in our opinion the concepts +

Logging

code

docs

tests

First of all, Polygene™ is taking a fresh look at all things that we take for granted. Logging is one such thing.

It should (but is not) obvious that Logging are used for three very distinct purposes, and in our opinion the concepts are not related and should not be abstracted in the same fashion, as has been the norm in Log4j, JDK logging, Commons -Logging and most other similar packages and APIs.

  • +Logging and most other similar packages and APIs.

    • Tracing - Developers often need to trace where the application has been, recording the sequence of execution to see if the logic is correct. This is often a choice when stepping through with a debugger is not possible for whatever reason.
    • @@ -83,7 +83,7 @@ not only different, but if not handled properly the debug log is mixed up with t to turning off whole or parts of the domain logging by mistake. We want to avoid this, and instead crystalize the needs for each scenario and audience.

      Another drastic difference from previous frameworks is that we don’t have an Appender notion. All messages are entities which are stored in a configured entity store. This means that especially the domain log can be more easily be given a -user interface suitable for the domain, without complex parsing of message strings

      Table 31. Artifact

      Group IDArtifact IDVersion

      org.apache.polygene.libraries

      org.apache.polygene.library.logging

      3.1.0-SNAPSHOT


      Logging

      Logging is still not finalized and will need a lot more thought before considered done .

      Debugging

      To produce debugging output in your code you just need to add the field

      @Optional @This Debug debug;
      +user interface suitable for the domain, without complex parsing of message strings

      Table 31. Artifact

      Group IDArtifact IDVersion

      org.apache.polygene.libraries

      org.apache.polygene.library.logging

      0


      Logging

      Logging is still not finalized and will need a lot more thought before considered done.

      Debugging

      To produce debugging output in your code you just need to add the field

      @Optional @This Debug debug;
       

      and then check for null at each usage

      if( debug != null )
       {
           debug.debug( Debug.NORMAL, "Debugging is made easier." );
      @@ -91,7 +91,7 @@ user interface suitable for the domain, without complex parsing of message strin
       

      The Debug mixin can be either added to the composite declaration, or it can be added as a contextual fragment during bootstrap.

      You will also need to declare a DebugService to be visible to the composite where the debug output is coming from. And the DebugService in turn will use the default UnitOfWork and associated entity store, which must also be configured and -visible.

      Tracing

      Tracing is the process of tracking all the methods that has been called. There are two levels of tracing available in +visible.

      Tracing

      Tracing is the process of tracking all the methods that has been called. There are two levels of tracing available in Polygene. Either Trace All or trace where a annotation has been given.

      If the TraceAllConcern is added to a composite, and there is a TraceService visible, then all method calls into that composite is traced.

      If a subset of the methods want to be traced, you can annotate those methods with @Trace in either the Composite Type interface or the mixin implementation. You will also need to add the TraceConcern to the composite.

      public interface ImportantRepository
      
      http://git-wip-us.apache.org/repos/asf/polygene-website/blob/538baaf6/content/java/develop/library-osgi.html
      ----------------------------------------------------------------------
      diff --git a/content/java/develop/library-osgi.html b/content/java/develop/library-osgi.html
      index 75089fa..18b086e 100644
      --- a/content/java/develop/library-osgi.html
      +++ b/content/java/develop/library-osgi.html
      @@ -1,5 +1,5 @@
       
      -OSGi
      +OSGi
       
       
       
      @@ -66,8 +66,8 @@
         })();
        
       
      -  

      OSGi

      code

      docs

      tests

      OSGi Library allows you to import OSGi services as Polygene™ Services and to export Polygene™ Services as OSGi Services both -leveraging the Polygene™ Availability and OSGi FallbackStrategy mechanisms.

      Table 32. Artifact

      Group IDArtifact IDVersion

      org.apache.polygene.libraries

      org.apache.polygene.library.osgi

      3.1.0-SNAPSHOT


      Export Polygene™ services to an OSGi Bundle

      interface MyPolygeneService
      +  

      OSGi

      code

      docs

      tests

      OSGi Library allows you to import OSGi services as Polygene™ Services and to export Polygene™ Services as OSGi Services both +leveraging the Polygene™ Availability and OSGi FallbackStrategy mechanisms.

      Table 32. Artifact

      Group IDArtifact IDVersion

      org.apache.polygene.libraries

      org.apache.polygene.library.osgi

      0


      Export Polygene™ services to an OSGi Bundle

      interfa
       ce MyPolygeneService
           extends OSGiEnabledService
       {
           // ...
      @@ -84,7 +84,7 @@ public void assemble( ModuleAssembly module )
               setMetaInfo( bundleContext );
           module.services( MyPolygeneService.class );
       }
      -

      Import OSGi services in a Polygene™ Module

      public void assemble( ModuleAssembly module )
      +

      Import OSGi services in a Polygene™ Module

      public void assemble( ModuleAssembly module )
           throws AssemblyException
       {
         [...snip...]
      
      http://git-wip-us.apache.org/repos/asf/polygene-website/blob/538baaf6/content/java/develop/library-rdf.html
      ----------------------------------------------------------------------
      diff --git a/content/java/develop/library-rdf.html b/content/java/develop/library-rdf.html
      index 2baa1f6..1a0eb21 100644
      --- a/content/java/develop/library-rdf.html
      +++ b/content/java/develop/library-rdf.html
      @@ -1,5 +1,5 @@
       
      -RDF
      +RDF
       
       
       
      @@ -66,7 +66,7 @@
         })();
        
       
      -  

      RDF

      code

      docs

      tests

      RDF Library

      Note

      This Library has no documentation yet. Learn how to contribute in Writing Documentation.

      Table  33. Artifact

      Group IDArtifact IDVersion

      org.apache.polygene.libraries

      org.apache.polygene.library.rdf

      3.1.0-SNAPSHOT