Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account
List archives

Do we need to keep the encoder/decoder Provider stuff ?

Documentation -> docbook ?
(54 lines)
Re: svn commit: r983652 - in /directory/sandbox/felixk/apacheds-docs: ./ src/ src/docbkx/ src/docbkx/media/ src/main/ src/main/java/ src/main/resources/ src/test/ src/test/java/ src/test/resources/
(22 lines)
Aug 9, 2010
Emmanuel Lecharny
Emmanuel Lecharny
  Hi,

once upon a time, ie, 8 years ago, Alex codec the network frontend by 
assuming that there will be some other codec used later. It made perfect 
sense back then, as he first used an ASN.1 based codec named Snacc, 
which was not ASL.2 compatible. Then he had to change and define its own 
version of an ASN.1 codec, but as he wanted to check that the new codec 
was valid, he designed the system to be able to switch the codec just to 
know if the new codec was responsible for the failures he met, or 
something else.

The rational was :
- if the server behaves the same way whether Snacc or Snickers (the new 
codec) is used, then if the server has an issue, it means the codec is 
not responsible
- OTOH, if the server behaves differently, then it's likey the new codec 
the cause of the problem.

That was a smart move, and it was leveraged again when I wrote Twix, the 
third codec. I was able to do the same thing : compare the results 
obtained with twix with what was obtained with Snickers.

Eventually, we decided to ditch Snickers and to keep Twix, which was 
renamed.

So as of today, we use the so-called twix internally.

Now, we still have a lot of remaining plumbery in place : all the 
classes needed to declare which codec to use. Mainly, we have :
- Provider, an abstract class in charge of class loading the LdapProvider
- LdapProvider, a class used to create the LdapEncoder and LdapDecoder

Those two classes are created when we create the FilterChain as soon as 
a new session is initialized. More specifically, the ProtocolCodecFilter 
is added into the chain, and before we can process any incoming messages 
from the client, we initialize the codec, using the 
LdapProtocolCodecFactory class to create the encoder/decoder instances.

What are the essential elements ?
- the factory
- the encoder
- the decoder

We should be able to get rid of the provider, assuming we won't even 
switch the codec in the near or distant future. That would simplify the 
code which is, to say the least, cryptic...

so, wdyt ? Should we keep the machinery that allow us to change the 
codec by using an environment variable ?





Reply
Tags: codecsnaccnamed
Messages in this thread
Do we need to keep the encoder/decoder Provider stuff ?
Similar Threads
DO NOT REPLY New: ProxyPassMatch Url Encoder Problem
https://issues.apache.org/bugzilla/show_bug.cgi?id=49715

           Summary: ProxyPassMatch Url Encoder Problem
           Product: Apache httpd-2
           Version: 2.2.15
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_proxy_ajp
        AssignedTo: bug### @httpd.apache.org
        ReportedBy: jango### @gmail.com


There is a issue on ProxyPassMatch url encoder.

ProxyPassMatch ^/profile/(.+)$
ajp://localhost:8009/app-web/profile.do?login=$1

Tomcat log:
[06/Aug/2010:02:43:24 -0300] "GET /app-web/profile.do%3Flogin=username

Should be /app-web/profile.do?login=username






Created: (AVRO-578) Add bytesWritten() to Encoder Class
Add bytesWritten() to Encoder Class

Stuff left for 2.3?
I'd like to try and get a handle on what is needed to get 2.3 out the
door.   
It's really long, long overdue.     The things I can think of off the top
of 
my head:

1) JAX-WS 2.2 - we're close on this, just need to figure out a few more 
things.

2) JAX-RS 1.1 - Sergey: do you know how close we are there?   

3) New annotations - we have a bunch of new annotations, but I think they
only 
work on the WS side of things, not the RS side.   Some only apply to the
WS 
side, but others probably are applicable there.   I may try and take a
stab at 
this.   It should just be wiring in the new annotation listener stuff into
the 
JAX-RS startup code and they should all mostly "just work".   I hope.  :-)

4) SOAP/JMS - I THINK this is now "done" and it passes all the SOAP/JMS
spec 
tests.   Anyone know for sure?

5) SOAP/TCP - this is no where close to enterprise ready.   Probably just
mark 
it experimental and not worry about it for now.

6) mustUnderstand logic stuff mentioned in the migration guide.   I need
to 
finish that up.  That's on me.


Anything else anyone can think of?





Bizarre Stuff in Puppet 2.6.0
Is it just me, or are others having all sorts of weird experiences
with puppet 2.6.0?

Specifically with parameterized classes.... I just had a situation
where I restarted the client, got an error, restarted the client
again, and the error went away. Then, I intentionally put an error in
the config, restarted the client again, and the client didn't report
any problems.

After restarting the server and client a few more times, this error is
still not being reported by the client.

Doug.





new AsyncClient stuff in java.
I am considering using thrift for a project, and am intrigued by the new
AsyncClient stuff in the java stack.  I have a question arising from very
early prototyping, and I wondered if anyone might be able to give some
guidance.  (FWIW, should we use thrift, Dell will likely commit back any
work we do to thrift in order to solve our issues, possibly including
helping to implement similar AsyncClient functionality in .Net.)

When testing the asyncClient, it seems as though the arguments to my
method are not actually included in what is getting sent across to the
server.  The server is receiving the request, but when parsing the
arguments, ends up with a null... Is this something that someone has
already addressed and I need to take the latest stamp, (code is a snapshot
from ealy last week), or is this something that's gone unnoticed?

Thanks!
                Mike


Michael Brindamour
Dell  |  Software Engineer
300 Innovative Way
Nashua, NH  03062  USA

Michael_B### @Dell.com
office:  1.603.589.5845



Created: (CAMEL-3028) migrate the web console away from JSP + JSTL + JSP EL + SiteMesh + other stuff
migrate the web console away from JSP + JSTL + JSP EL + SiteMesh + other
stuff -> Scalate for a simpler, smaller & more DRY template engine

Created: (HDFS-1301) TestHDFSProxy need to use server side conf for ProxyUser stuff.
TestHDFSProxy need to use server side conf for ProxyUser stuff.

Created: (SLING-1617) Wrong dependency version for the adbera stuff in contrib/scipting/jsp-taglib-a
Wrong dependency version for the adbera stuff in
contrib/scipting/jsp-taglib-atom project

Problem invoking a provider
Hi all,
I have implemented a Provider for my web service but the request doesn't
pass into my provider. To declare my provider I only have added there 2
lines before my class:
@javax.xml.ws.WebServiceProvider(portName="HelloWorldSoapBinding",
serviceName="HelloWorld")
@javax.xml.ws.ServiceMode(value = javax.xml.ws.Service.Mode.MESSAGE)

Is there no other thing to do?

thanks a lot,
Fabian.




How can I set concurrent policy for a provider?
I setup a provider service in activeMQ and want to offer 1000 requests at
the
same time. How can I set the thread policy for this provider?




x-net] Creating a provider based on OpenSSL
  Hi all,

I'm currently investigating the possibility of implementing a JSSE 
provider wrapping OpenSSL. This has a couple of obvious advantages:
  - The onus of code maintenance and bug fixing in a security sensitive 
area is moved outside of Harmony.
  - New protocols can be integrated into the Harmony provider with 
minimal effort (updating dependencies rather than implementing them 
ourselves).

Really I'm sending this mail as a heads up, but would be interested to 
know if anyone has any experience/opinions in this area. In particular, 
I'd be interested in ideas on:
  - the best way to setup OpenSSL as a dependency - precompile the 
libraries and make them available for download or compile them at build 
time on the user's machine.
  - how to tie in the Java x-net APIs to the OpenSSL APIs.

Any comments/suggestions welcome.

Regards,
Oliver





question about package provider on Solaris
Hello,

Here is how I am trying to make sure sudo is installed on my solaris
boxes:

            package {'sudo':
              ensure => 'installed',
              provider => 'blastwave',
              adminfile => '/usr/local/etc/adminfile',
            }

The package is installed, but every time puppetd executes, I get this:

	notice: //base_server/Package[sudo]/ensure: created

It seems like the package provider is not seeing that sudo is already
installed….
How can I fix that?

Both my puppetmaster and puppetd are 0.25.5

Thanks,

Don





Changing operation in ServiceMix CXF consumer --> provider
Hi,

    When routing from ServiceMix CXF-BC consumer to ServiceMix CXF-BC
provider, need to call a different operation of CXF provider web service.
The application uses ServiceMix and Camel JBI component. Camel is used for
routing purpose only. The route is

CXF BC consumer ----> Camel ----> CXF BC provider

For example 

operation: {http://example.org}hello

changed to

operation: {http://example.org}greet

I tried to set operation as a header in camel route but is not working.

<route>
    <from uri="jbi:service:http://example.org/helloRouteBuilder"/>
    <setHeader headerName="operationName">
        <constant>greet</constant>
    </setHeader>
    <to uri="jbi:service:http://example.org/greetingService"/>
</route>

I know that this syntax is for Camel CXF endpoints. Will it work for
ServiceMix CXF components?

Anto



Overriding the default Jettison JSON Provider
I've defined a jaxrs server like:

<jaxrs:server id="myService" address="http://localhost:19300/ai/" >

    <jaxrs:serviceBeans>
        <ref bean="resourceService" />
    </jaxrs:serviceBeans>
    <jaxrs:providers>
           <bean
class="org.codehaus.jackson.jaxrs.JacksonJsonProvider">
            <property name="mapper">
             <bean
                class="com.rest.json.ObjectMapperFactoryBean">
            </bean>
            </property>
           </bean>
        <ref bean="jaxbElementProvider" />
    </jaxrs:providers>
    <jaxrs:extensionMappings>
        <entry key="json" value="application/json" />
           <entry key="xml" value="application/xml" />
        </jaxrs:extensionMappings>
 </jaxrs:server>

- For some reason, when I request Json from the service the
org.apache.cxf.jaxrs.provider.JSONProvider#readFrom method is used instead
of the jackson provider. How can I remove/override the built-provider and
replace it with Jackson?

Thanks,


java.util.concurrent.ExecutionException: Provider Exception
Can any one tell me what might be the reason for this exception

on pendingResponse.get()
        at
org.jredis.ri.alphazero.connection.SynchPipelineConnection.serviceRequest(SynchPipelineConnection.java:92)
        at
org.jredis.ri.alphazero.JRedisPipelineService.serviceRequest(JRedisPipelineService.java:96)
        at
org.jredis.ri.alphazero.JRedisSupport.mget(JRedisSupport.java:983)
        at
com.kaboodle.core.cache.impl.JredisCacheServiceImpl.mget(JredisCacheServiceImpl.java:133)
Caused by: java.util.concurrent.ExecutionException: Provider Exception
        at
org.jredis.ri.alphazero.connection.PendingRequest.checkStatus(PendingRequest.java:112)
        at
org.jredis.ri.alphazero.connection.PendingRequest.get(PendingRequest.java:134)
        at
org.jredis.ri.alphazero.connection.PendingRequest.get(PendingRequest.java:26)
        at
org.jredis.ri.alphazero.connection.SynchPipelineConnection.serviceRequest(SynchPipelineConnection.java:80)
        ... 67 more
Caused by: org.jredis.ProviderException: Bug?  Expecting status code for
size/count
        at
org.jredis.ri.alphazero.protocol.SynchProtocol$SynchMultiLineResponseBase.readControlLine(SynchProtocol.java:410)
        at
org.jredis.ri.alphazero.protocol.SynchProtocol$SynchMultiBulkResponse.read(SynchProtocol.java:544)
        at
org.jredis.ri.alphazero.connection.PipelineConnectionBase$ResponseHandler.run(PipelineConnectionBase.java:230)
        ... 1 more



Thanks.





Created: (CAMEL-2906) ValueBuilder should provider the DSL for Predicate
ValueBuilder should provider the DSL for Predicate