Sunday, July 18, 2010

Java LDAP SDK for SyncRepl replication showcase

I just published a post on my company blog about how to implement a SyncRepl client using two different Java LDAP SDK, Apache DS and UnboundID: 


http://blog.normation.com/2010/07/18/java-ldap-sdk-for-syncrepl-replication-showcase/

SyncRepl is a replication protocol for LDAP, normalized in RFC 4533.  

The demonstration is done with a showcase web application that display in real time modification done in an LDAP server. 
The application, named Syweno, was developed in Scala, thanks to Liftweb and it's amazing Comet. It looks like:



Of course, update are synchronized thank to SyncRepl, and are propagated to the web page in real time thanks to Comet updates. 

The code source is available on github here: http://github.com/fanf/syweno

Enjoy !

Wednesday, July 14, 2010

Scala 2.8.0 is out

The most awaited Scala version of all time (ok, it's easy for now...) is out, at last !

Congratulation to every body who contributed to make it happens, and long life to Scala post-2.8.0. After a brilliant childhood, perhaps it is time for the unruly teenager to quieten down a little and conquer the industrial world !

The official link:
http://www.scala-lang.org/node/7009


Thursday, July 1, 2010

Scala dreaded underscore @ PSUG

(orignal content from http://blog.normation.com/2010/07/01/scala-dreaded-underscore-psug  )

On the evening of June 30th 2010, the Paris Scala User Group organized its second event.
This time, there were two presentations:

  • in the first one, Alexis Agahi, our kind user group leader, made a feedback after one year of scala experience. It’s available here.
  • the second one was given by your servitor, and deals with each and every use case of underscores in the Scala language – I hope I didn’t miss any.
    It’s available here.
See you next time on PSUG!

Monday, May 24, 2010

Optimizing Eclipse performances

I just published an article about Eclipse perfomance optimisation, especially with the Scala IDE plugin, here : http://blog.normation.com/2010/05/24/optimizing-eclipse-performances/

This article mostly talk about generalities and gives some reference links about JVM tunning. It also contains some eclipse.ini examples, and point to reference topic on that subject.

A second, more involved article in which I will explain how to put your workspace into ram (and keep it synchronizes to disk, of course) will follow in a couple of days (ok, perhaps packed in weeks, depending of my work...).

Of course, any information about Eclipse optimization is much appreciated !

Tuesday, May 18, 2010

Maven2 bootstrap pom.xml for Scala with SLF4J and no-commons-logging

Following an older post, this is the pom I use as a starting point for Scala project which uses maven.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 <modelVersion>4.0.0</modelVersion>
 <groupId>org.test</groupId>
 <artifactId>test</artifactId>
 <packaging>jar</packaging>
 
 <version>0.1-SNAPSHOT</version>

 <properties>
  <!-- UTF-8 for everyone -->
  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

  <!-- Other general properties -->
  <slf4j-version>1.6.0</slf4j-version>
  <logback-version>0.9.20</logback-version>
  <scala-version>2.8.0.RC2</scala-version>
  <scala-maven-plugin-version>2.13.1</scala-maven-plugin-version>
  </properties>

 <description>
  Starting pom
 </description>

 <repositories>
  <repository>
   <id>scala-tools.org</id>
   <name>Scala-tools Maven2 Repository</name>
   <url>http://scala-tools.org/repo-releases</url>
  </repository>
  <repository>
   <id>scala-snapshots.org</id>
   <name>Scala-tools Maven2 Repository snapshots</name>
   <url>http://scala-tools.org/repo-snapshots</url>
  </repository>

  <repository>
   <id>no-commons-logging</id>
   <name>No-commons-logging Maven Repository</name>
   <layout>default</layout>
   <url>http://no-commons-logging.zapto.org/mvn2</url>
   <snapshots><enabled>false</enabled></snapshots>
  </repository>

 </repositories>

 <pluginRepositories>
  <pluginRepository>
   <id>scala-tools.org</id>
   <name>Scala-tools Maven2 Repository</name>
   <url>http://scala-tools.org/repo-releases</url>
   <snapshots><enabled>false</enabled></snapshots>
  </pluginRepository>
  <pluginRepository>
   <id>scala-snapshots.org</id>
   <name>Scala-tools Maven2 Repository snapshots</name>
   <url>http://scala-tools.org/repo-snapshots</url>
  </pluginRepository>
 </pluginRepositories>

 <build>
  <sourceDirectory>src/main/scala</sourceDirectory>
  <testSourceDirectory>src/test/scala</testSourceDirectory>
  <plugins>
   <plugin>
    <groupId>org.scala-tools</groupId>
    <artifactId>maven-scala-plugin</artifactId>
    <version>${scala-maven-plugin-version}</version> 
    <executions>
     <execution>
      <goals>
       <goal>compile</goal>
       <goal>testCompile</goal>
      </goals>
     </execution>
    </executions>
    <configuration>
     <args>
      <arg>-target:jvm-1.5</arg>
      <arg>-make:transitivenocp</arg>
      <arg>-dependencyfile</arg>
      <arg>${project.build.directory}/.scala_dependencies</arg>
     </args>
     <jvmArgs>
      <jvmArg>-client</jvmArg>
      <jvmArg>-Xmx1G</jvmArg>
     </jvmArgs>
    </configuration>
   </plugin>
   <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>2.1</version>
    <configuration>
    <source>1.6</source>
    </configuration>
   </plugin>
   
  </plugins>
 </build>

 <dependencies>
  <dependency>
   <groupId>org.scala-lang</groupId>
   <artifactId>scala-library</artifactId>
   <version>${scala-version}</version>
  </dependency>
  <dependency>
   <groupId>joda-time</groupId>
   <artifactId>joda-time</artifactId>
   <version>1.6</version>
  </dependency>
  <!--  test -->
  <dependency>
   <groupId>junit</groupId>
   <artifactId>junit</artifactId>
   <version>4.7</version>
   <scope>test</scope>
  </dependency>

  
  <!--
   All the following is related to our will to NOT use Commong-logging
  -->
  <!-- use no-commons-logging -->
  <dependency>
   <groupId>commons-logging</groupId>
   <artifactId>commons-logging</artifactId>
   <version>99.0-does-not-exist</version>
  </dependency>
  <!-- no-commons-logging-api, if you need it -->
  <dependency>
   <groupId>commons-logging</groupId>
   <artifactId>commons-logging-api</artifactId>
   <version>99.0-does-not-exist</version>
  </dependency>
  <!-- the slf4j commons-logging replacement -->
  <dependency>
   <groupId>org.slf4j</groupId>
   <artifactId>jcl-over-slf4j</artifactId>
   <version>${slf4j-version}</version>
  </dependency>
  <!-- the other slf4j jars -->
  <dependency>
   <groupId>org.slf4j</groupId>
   <artifactId>slf4j-api</artifactId>
   <version>${slf4j-version}</version>
  </dependency>
  <!-- using slf4j native backend -->
  <dependency>
   <groupId>ch.qos.logback</groupId>
   <artifactId>logback-core</artifactId>
   <version>${logback-version}</version>
  </dependency>
  <dependency>
   <groupId>ch.qos.logback</groupId>
   <artifactId>logback-classic</artifactId>
   <version>${logback-version}</version>
  </dependency>
 </dependencies>
</project>




  © Blogger template 'Minimalist G' by Ourblogtemplates.com 2008

Back to TOP