Subject: [ietf-provreg] EPP over HTTP or simple TCP?

From: Eugenio Pinto <[email-masked]>
Date: Wed, 31 Oct 2007 05:45:43 +0000

Hi all!

I am implementing persistent connections to my EPP server and I would 
like to ask you how did you achieve this.

 - A way is to send EPP messages in the body of HTTP requests and manage 
HTTP requests with standard code.

 - Another solution, with less overhead, is to send EPP messages 
directly in the TCP stream and add some "end-code" characters to the end 
of the message in order for the server to recognize each EPP message and 
maybe send it to a worker thread.

The HTTP approach is simple: we just need to use Tomcat (for example) 
and a servet.

Have you implemented the TCP approach? If so, did you implement a TCP 
server from scratch or you used the source code from a server like Tomcat?

Best Regards,
Eugenio

---

From: Stephane Bortzmeyer <[email-masked]>
Date: Wed, 31 Oct 2007 09:04:14 +0100

On Wed, Oct 31, 2007 at 05:45:43AM +0000,
 Eugenio Pinto <[email-masked]> wrote 
 a message of 21 lines which said:

> - A way is to send EPP messages in the body of HTTP requests and
> manage HTTP requests with standard code.

That's tempting but it violates RFC 3205 and, besides, there is no
written specification on EPP-over-HTTP so it will be non-standard.

> directly in the TCP stream and add some "end-code" characters to the
> end of the message in order for the server to recognize each EPP
> message

Why adding this end-code when RFC 4934 uses a leading length field?

4.  Data Unit Format

   The EPP data unit contains two fields: a 32-bit header that describes
   the total length of the data unit, and the EPP XML instance.

---

From: Klaus Malorny <[email-masked]>
Date: Wed, 31 Oct 2007 10:12:56 +0100

> written specification on EPP-over-HTTP so it will be non-standard.

To my knowledge, there is at least one ccTLD exactly doing this.

>    the total length of the data unit, and the EPP XML instance.

I fully agree. RFC4934 is quite simple so that there is no real reason why to 
invent other supposed "simple" transport mechanisms, including the use of 
HTTP(S), for new implementations.

Regards,

Klaus

-- 
____________________________________________________________________
      |       |
      | knipp |               Knipp  Medien und Kommunikation GmbH
       -------                       Technologiepark
                                     Martin-Schmeißer-Weg 9
                                     44227 Dortmund

      Geschäftsführer:               Registereintrag:
      Dietmar Knipp, Elmar Knipp     Amtsgericht Dortmund, HRB 13728

---

From: Eugenio Pinto <[email-masked]>
Date: Wed, 31 Oct 2007 12:12:29 +0000

Stephane and Klaus,

Thanks for your quick feed-back.

Regarding the TCP transport protocol on RFC 4934 you are right, it was 
my mistake to talk about the "end-code" if we have the leading length field.

However the main reason for my email was the implementation part:

I have already implemented a single threaded TCP server on JAVA that is 
in conformance with RFC 4934 and implements the XML schema validation on 
the received messages.

I think I can use this code to develop a generic JAVA Interface that 
will be in conformance with the core EPP protocol specifications and can 
be used for any EPP server implementation just by extending it's methods.

Is this interesting for you? Have you already a similar interface 
implementation on JAVA or any other programing language that can be 
freely distributed and is already tested in production?

If you have can you send it to this list? I would rather prefer to use 
an already-in-production version of the core server implementation than 
to use my own just released version...

Regards,
Eugenio

Klaus Malorny wrote:
> I fully agree. RFC4934 is quite simple so that there is no real reason 
> why to invent other supposed "simple" transport mechanisms, including 
> the use of HTTP(S), for new implementations.
>
> Regards,
>
> Klaus
>

---

From: Stephane Bortzmeyer <[email-masked]>
Date: Wed, 31 Oct 2007 15:37:31 +0100

On Wed, Oct 31, 2007 at 12:12:29PM +0000,
 Eugenio Pinto <[email-masked]> wrote 
 a message of 68 lines which said:

> Have you implemented the TCP approach? 

No, but I love to write on mailing lists :-)

> If so, did you implement a TCP server from scratch or you used the
> source code from a server like Tomcat?

There are implementations using Apache modules:

http://sourceforge.net/projects/aepps
http://fred.nic.cz/

> implements the XML schema validation on 
> the received messages.

I would be interested to know how many registrars send invalid
EPP. Most EPP servers I've seen, like OpenReg, do not implement a real
validation and sometimes have big XML errors (like the ".eu" EPP
server where the namespace prefixes were hardwired).
 
> Is this interesting for you? 

I do not like Java but other people may certainly be interested.

---

From: Claudio Hidalgo <[email-masked]>
Date: Wed, 31 Oct 2007 11:52:29 -0300

> source code from a server like Tomcat?

	you can implement a TCP server using a network stack framework. 
Examples are Twisted for Python, and Apache MINA for Java.

-- 
Claudio Hidalgo
Ingeniería
NIC Chile - Universidad de Chile
www.nic.cl

---

From: Eugenio Pinto <[email-masked]>
Date: Wed, 31 Oct 2007 15:08:06 +0000

Thanks for the implementation links ;)

> server where the namespace prefixes were hardwired)
This doesn't mean it is not a good practice to validate the request 
against the schema, does it?

Have anyone here implemented the schema validation on the server? If 
not, is it because of performance issues?

Regards,
Eugenio

---

From: Stephane Bortzmeyer <[email-masked]>
Date: Wed, 31 Oct 2007 16:23:00 +0100

On Wed, Oct 31, 2007 at 03:08:06PM +0000,
 Eugenio Pinto <[email-masked]> wrote 

> against the schema, does it?

In my personal opinion, it is very good practice to validate against
the schema (specially in our industry because we sell things, and
sensitive things, mileage of other industries may vary). But I have no
practical experience with EPP (we do not use it) and I suspect that
many registrars send invalid XML.

A very interesting dissent:

http://www.coactus.com/blog/2006/12/validation-considered-harmful/

And an opinion in-between:

http://blog.jclark.com/2007/04/validation-not-necessarily-harmful.html

---

From: Andrew Sullivan <[email-masked]>
Date: Wed, 31 Oct 2007 11:51:27 -0400

On Wed, Oct 31, 2007 at 03:37:31PM +0100, Stephane Bortzmeyer wrote:

> EPP. 

I'll bet if you speculate, you'll be close ;-)

The problem with validating in real time is that people want the
transactions to be very low-latency, and therefore the server has to
minimise the resources it is willing to expend.  IMO, though,
validation would be a good thing.

A

-- 
Andrew Sullivan                         204-4141 Yonge Street
Afilias Canada                        Toronto, Ontario Canada
<[email-masked]>                              M2P 2A8
jabber: [email-masked]                 +1 416 646 3304 x4110

---

From: Klaus Malorny <[email-masked]>
Date: Wed, 31 Oct 2007 17:46:55 +0100

> server from scratch or you used the source code from a server like Tomcat?

We (CORE) use our own Java implementation of EPP. As a part of it, we developed 
an EPP toolkit that can be used both on client and server side and that does 
validation. Without having actually measured it, I don't think that the 
validation has a big impact on the overall processing times, compared to the 
time required to perform the database transaction(s). From a programming 
perspective, it is a clear advantage, as it simplifies the dissection of the EPP 
request. You don't need to check the existence of every element and attribute, 
as you *know* that they exist due to the preceding validation. On the other 
hand, it is important to point out that a successful validation is only a 
necessary condition, but not a sufficient condition that the incoming EPP 
request is valid. There are still a lot of cases that need to be tested.

For the actual I/O, we do not rely on a third party product like Tomcat.

 > [...]

Regards,

Klaus

---

From: Andrew Sullivan <[email-masked]>
Date: Wed, 31 Oct 2007 13:34:12 -0400

On Wed, Oct 31, 2007 at 05:58:00PM +0100, Maarten Bosteels wrote:
> 
> We are validating incoming (and outgoing !) EPP messages using Apache
> xmlbeans
> and the time it takes is absolutely negligible.

We do some validation, IIRC, but I seem to recall that there are some
parts of the spec that the developers decided would be better caught
later in the chain. This might have been an optimisation in an effort
to avoid doing the same work twice -- there are policy rules that aren't
actually part of the XML validation, that you'd still end up having to
check for other reasons, and I think those cases are caught by the
policy rules _even if_ they're not valid according to EPP.  (It's also
possible our developers have since fixed this issue -- I'm not
involved directly in that stuff any more.  I know we did this once,
though, because we explicitly stated we weren't going to fix it.)

A

---

From: James Gould <[email-masked]>
Date: Wed, 31 Oct 2007 13:31:25 -0400

I agree that the processing time for the validation is a slight impact
depending on the parser being used and whether you're utilizing schema
caching.  We do schema validation with all of our servers.

-- 

JG 

-------------------------------------------------------
James F. Gould
Principal Software Engineer
VeriSign Naming Services
[email-masked]
Direct: 703.948.3271
Mobile: 703.628.7063

21345 Ridgetop Circle
LS2-2-1
Dulles, VA 20166

Notice to Recipient:  This e-mail contains confidential, proprietary and/or
Registry  Sensitive information intended solely for the recipient and, thus
may not be  retransmitted, reproduced or disclosed without the prior written
consent of  VeriSign Naming and Directory Services.  If you have received
this e-mail message in error, please notify the sender immediately by
telephone or reply e-mail and destroy the original message without making a
copy.  Thank you.

> From: Klaus Malorny <[email-masked]>
> Date: Wed, 31 Oct 2007 17:46:55 +0100
> To: Eugenio Pinto <[email-masked]>
> Cc: <[email-masked]>
> Subject: Re: [ietf-provreg] Re: EPP over HTTP or simple TCP?
> 
> Eugenio Pinto wrote:
>> Stephane and Klaus,
>>

---

From: James Gould <[email-masked]>
Date: Wed, 31 Oct 2007 14:04:54 -0400

We implement the policy rules after the schema validation has passed.  We
don't validate outgoing messages in the server, but our test clients that
are used to certify the server do validate the server responses.

-- 

JG 

21345 Ridgetop Circle
LS2-2-1
Dulles, VA 20166

> From: Andrew Sullivan <[email-masked]>
> Reply-To: Andrew Sullivan <[email-masked]>
> Date: Wed, 31 Oct 2007 13:34:12 -0400
> To: <[email-masked]>