[Design of JBoss Remoting, Unified Invokers] - Have remoting support a non invocation based model
by timfox
Hi Tom et al
As we move further ahead with JBoss Messaging, we're going to need to provide a non blocking approach to processing requests on the server.
I.e. on the server side:
Read some data (non blocking) from the socket and pass it to JBM to process it.
Some time later (if the request requires a response) and probably on a different thread then JBM needs to write some data onto the socket.
The reads and writes need to be decoupled, so we can provide SEDA or related style processing models.
Currently, remoting seems to exclusively work with a blocking, invocation based model.
What I mean by this is that a thread blocks until the request arrives, the request is executed and a response is written back, all using the same thread. So the read and write is coupled - (this is the "invocation")
Similarly on the client side, for many of our use cases we simply want to write to the socket and return immediately - we do not want to send an "invocation" and wait for a response.
The current remoting model client model does not seem to support this.
I believe the request to extend the Client API to support an asynchronous send has already been logged with a JIRA task.
In order to provide the desired server side functionality, I guess we would need the remoting API to be extended so that we can write onto the socket, decoupled from the invocation.
Also we would need to provide an invocation type that didn't write a response back onto the socket.
Wdyt?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971136#3971136
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971136
19 years, 6 months
[Design of JBoss Remoting, Unified Invokers] - Moving core o.j.invocation classes to common
by bstansberry@jboss.com
With the effort underway to consolidate the client-side interceptor models, a problem that comes up is where to put some of the core org.jboss.invocation classes, e.g. org.jboss.invocation.Invocation.
http://jira.jboss.com/jira/browse/JBREM-385 says the old invokers will move to remoting, so Remoting will need access to these classes. So leaving them in the AS server module is no good; don't want remoting depending on AS/server. Depending on how we refactor, some code in an independent cluster binary might have the same problem.
Moving them to Remoting could work, but smells funny due to the widespread usage of these classes in the AS. For example, org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor would be importing a class from Remoting, which seems a bit odd.
A logical place for these is in common-core. What do people (Scott/Adrian) think about moving them there?
I worked out what I think would need to be moved, all in o.j.invocation:
Invocation
InvocationContext
InvocationKey
InvocationType
Invoker
JBossLazyUnmarshallingException
MarshalledInvocation
MarshalledValue
MarshalledValueInputStream
MarshalledValueOutputStream
PayloadKey
SecurityActions
Regardless of what is decided about the rest of the classes, the JBoss Cache people would like to see MarshalledValueIn(Out)putStream moved. Those are true utility classes, and JBC uses them. Moving them to common-core would make it possible to eliminate jboss-minimal.jar from the standalone JBC distribution.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971127#3971127
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971127
19 years, 6 months