OpenLDAP
Up to top level
Build   Contrib   Development   Documentation   Historical   Incoming   Software Bugs   Software Enhancements   Web  

Logged in as guest

Viewing Contrib/5448
Full headers

From: hyc@OpenLDAP.org
Subject: CONTRIB: Java slapd
Compose comment
Download message
State:
0 replies:
3 followups: 1 2 3

Major security issue: yes  no

Notes:

Notification:


Date: Tue, 1 Apr 2008 03:01:26 GMT
From: hyc@OpenLDAP.org
To: openldap-its@openldap.org
Subject: CONTRIB: Java slapd
Full_Name: Howard Chu
Version: 0.0.1
OS: 
URL: ftp://ftp.openldap.org/incoming/jslapd.tgz
Submission from: (NULL) (76.91.220.157)
Submitted by: hyc


Given the increasing popularity of Java, I decided it was time that the
OpenLDAP Project had its own Java implementation of an LDAP server. It
gave me a good opportunity to explore all of the benefits of rapid
development, introspection, and other advantages of the Java system.
Indeed, drawing on my experience with the existing OpenLDAP code base,
it took only a matter of hours to create my first working server, which
I present here. Of course it's still experimental in nature.

Invocation is similar to the regular C-based slapd, and it accepts all
of the same arguments and reads all of the same config settings. In
addition, the first commandline argument must be the name of the directory
where slapd resides, so that the java app can locate the config files,
schema, etc.

E.g. for a typical OpenLDAP installation in /usr/local you would run
        java jslapd /usr/local/libexec -h ldap://:389

A small shell script has been provided to simplify this invocation.


Followup 1

Download message
Date: Tue, 01 Apr 2008 09:13:47 +0200
From: Pierangelo Masarati <ando@sys-net.it>
To: hyc@openldap.org
CC: openldap-its@openldap.org
Subject: Re: (ITS#5448) CONTRIB: Java slapd
hyc@OpenLDAP.org wrote:

> Given the increasing popularity of Java, I decided it was time that the
> OpenLDAP Project had its own Java implementation of an LDAP server. It
> gave me a good opportunity to explore all of the benefits of rapid
> development, introspection, and other advantages of the Java system.
> Indeed, drawing on my experience with the existing OpenLDAP code base,
> it took only a matter of hours to create my first working server, which
> I present here. Of course it's still experimental in nature.
> 
> Invocation is similar to the regular C-based slapd, and it accepts all
> of the same arguments and reads all of the same config settings. In
> addition, the first commandline argument must be the name of the directory
> where slapd resides, so that the java app can locate the config files,
> schema, etc.
> 
> E.g. for a typical OpenLDAP installation in /usr/local you would run
>         java jslapd /usr/local/libexec -h ldap://:389
> 
> A small shell script has been provided to simplify this invocation.

Howard,

many thanks for the contribution.  I haven't stressed it yet 
intensively, but at a first glance it seems to be as performing as the 
latest 2.4.  Will this be released in 2.4, or do we need to wait until 
2.5 (what about making it 3.0?).

p.



Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   pierangelo.masarati@sys-net.it
---------------------------------------




Followup 2

Download message
Cc: openldap-its@OpenLDAP.org
From: Kurt Zeilenga <Kurt@OpenLDAP.org>
To: Howard Chu <hyc@OpenLDAP.org>
Subject: Re: (ITS#5448) CONTRIB: Java slapd
Date: Tue, 1 Apr 2008 10:21:13 -0700
On Mar 31, 2008, at 8:01 PM, hyc@OpenLDAP.org wrote:
> Full_Name: Howard Chu
> Version: 0.0.1
> OS:
> URL: ftp://ftp.openldap.org/incoming/jslapd.tgz
> Submission from: (NULL) (76.91.220.157)
> Submitted by: hyc
>
>
> Given the increasing popularity of Java, I decided it was time that  
> the
> OpenLDAP Project had its own Java implementation of an LDAP server. It
> gave me a good opportunity to explore all of the benefits of rapid
> development, introspection, and other advantages of the Java system.
> Indeed, drawing on my experience with the existing OpenLDAP code base,
> it took only a matter of hours to create my first working server,  
> which
> I present here. Of course it's still experimental in nature.
>
> Invocation is similar to the regular C-based slapd, and it accepts all
> of the same arguments and reads all of the same config settings. In
> addition, the first commandline argument must be the name of the  
> directory
> where slapd resides, so that the java app can locate the config files,
> schema, etc.
>
> E.g. for a typical OpenLDAP installation in /usr/local you would run
>        java jslapd /usr/local/libexec -h ldap://:389
>
> A small shell script has been provided to simplify this invocation.
>

In my initial testing, I found jslapd to have performance on par with  
slapd(8)!  And the memory footprint doesn't appear all that much larger.

Good work!  -- Kurt



Followup 3

Download message
Date: Sun, 25 Jan 2009 19:14:22 -0800
From: Howard Chu <hyc@symas.com>
To: openldap-its@openldap.org
Subject: Re: (ITS#5448) CONTRIB: Java slapd
This is a multi-part message in MIME format.
--------------070904040708010009080404
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

hyc@OpenLDAP.org wrote:
> Full_Name: Howard Chu
> Version: 0.0.1
> OS:
> URL: ftp://ftp.openldap.org/incoming/jslapd.tgz
> Submission from: (NULL) (76.91.220.157)
> Submitted by: hyc

For completeness sake, here's the source code... ;)
-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

--------------070904040708010009080404
Content-Type: text/x-java;
 name="jslapd.java"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="jslapd.java"

/*
 * Java wrapper for slapd
 */
import java.util.*;
import java.io.*;

class jslapd {
	public static void main(String[] args) {
		args[0] = args[0].concat("/slapd");
		try {
			Process p = Runtime.getRuntime().exec(args);
			InputStream stderr = p.getErrorStream();
			InputStreamReader isr = new InputStreamReader(stderr);
			BufferedReader br = new BufferedReader(isr);
			String line = null;
			while ((line = br.readLine()) != null)
				System.out.println(line);
			p.waitFor();
		} catch (Throwable t)
		{
			t.printStackTrace();
		}
	}
}

--------------070904040708010009080404--


Up to top level
Build   Contrib   Development   Documentation   Historical   Incoming   Software Bugs   Software Enhancements   Web  

Logged in as guest


The OpenLDAP Issue Tracking System uses a hacked version of JitterBug

______________
© Copyright 2013, OpenLDAP Foundation, info@OpenLDAP.org