From: Chun Tian
Subject: Mapping from ASN.1 to CLOS Classes?
Date: 
Message-ID: <1181762475.832438.259590@a26g2000pre.googlegroups.com>
Hi, Lispers

ASN.1 is a international standard presents a standard notation for the
definition of data types and values. If we treat ASN.1 types as a CLOS
class, the BER (Basic Encode Rules) seems like a serialize method for
persist storage or network transmission.

If there's a "ASN.1 compiler", which can "compile" a ASN.1 definition
into a CLOS definition, some network protocol like SNMP and LDAP will
be easily implemented in pure Common Lisp. I'm a UNIX system
administrator, and always thinking about how to implement a perfect
SNMP client using Lisp.

Is anyone working or just thinking about this? I'm looking for some
ideas, or existing projects.

Thanks.

Chun Tian (binghe)
From: Simon Leinen
Subject: Re: Mapping from ASN.1 to CLOS Classes?
Date: 
Message-ID: <aalke045v5.fsf@switch.ch>
Chun Tian writes:
> ASN.1 is a international standard presents a standard notation for
> the definition of data types and values. If we treat ASN.1 types as
> a CLOS class, the BER (Basic Encode Rules) seems like a serialize
> method for persist storage or network transmission.

> If there's a "ASN.1 compiler", which can "compile" a ASN.1
> definition into a CLOS definition, some network protocol like SNMP
> and LDAP will be easily implemented in pure Common Lisp.

Yes, but I'm not sure whether this is worth the effort, as there
aren't that many actively used protocols that encode their PDUs in BER
and have ASN.1 descriptions readily available.  (X.509 certificates
would be another example, if you consider that a network protocol.)

> I'm a UNIX system administrator, and always thinking about how to
> implement a perfect SNMP client using Lisp.

That's a laudable goal, but I think the most difficult parts of doing
a perfect SNMP client don't have much to do with ASN.1.  I'd want:

* Good support for accessing MIB data, in particular traversing tables
  (including selected subsets of columns and rows).  OK, so this does
  have something to do with ASN.1, but in a different way.  I'm not
  sure at which granularity you'd want to convert ASN.1
  modules/definitions/MIB tables into CLOS classes (if at all).

* Good support for multithreading, so that your client works
  efficiently even when some agents are down or respond slowly.  A
  client-side SNMP library would ideally integrate into some sort of
  event handling substrate.

* SNMPv3, including engine-ID discovery.

* Aggregating and dispatching multiple independent consumers of SNMP
  information, to reduce query overhead when several applications are
  interested in the same (or similar) data.  I find that this is quite
  often the case in network operations.

> Is anyone working or just thinking about this? I'm looking for some
> ideas, or existing projects.

There are a few Lisp SNMP implementations on the Internet (including
one by myself), have you looked at them?
-- 
Simon.