[JBoss ESB Development] - Re: Http Gateway - requirements please...
by Kevin.Conner@jboss.com
"tfennelly" wrote : I don't understand why the service mep is not an indicator of whether or not the invoked http-gateway should return the service response as its response (mep=RequestResponse), or should simply return an empty response as its response (mep=OneWay).
It is not an indicator, and never can be in the current implementation, because it only reflects an intent on that particular service *implementation*. It has no bearing on whether the client expects to receive, or should receive, a response.
The mep is not a contract for the service which is how I believe you are interpreting it. The only service type mechanism we have at present is the EBWS declarations, i.e. inXsd, outXsd, faultXsd, and it is these declarations which determine the contract for the exposed webservice, not a service mep.
"tfennelly" wrote : It seems to me like having an additional sync/async config on the gateway would be very confusing for users. I think this is what's being proposed, right?
It is the only way in the current architecture. I want a proper service contract as part of the architecture and, as you know, we have discussed this as part of the ESB 5 work. Once we have the contract then it will be the definitive location for making these types of decisions but, until then, a separate configuration is necessary.
"tfennelly" wrote : So, assuming we add a "sync" flag on the http-gateway, how should the gateway respond when...
Ignore the service mep, it is irrelevant to the caller (see below).
"tfennelly" wrote : If the http-gateway used the mep, what use case breaks, and how does it break i.e. what actually goes wrong e.g. with the chained services example outlined in the IM?
If I understand correctly you are expecting the service mep to declare the outcome of the invocation from the perspective of the client, but this has never been the case. It has always been an indication of intent on behalf of the service implementation.
Originally there was no mep, and the decision for a pipeline to return a response was left completely up to the implementation of the actions. If they returned a null response then the pipeline terminated at that point, if a message reached the end then it would attempt to send a response to a client. This caused numerous issues, especially when actions were intended to be used in both scenarios as it required a new action, or specific handling, to decide whether the message was to be propagated along the pipeline. If this was not done, or if the wrong action was used, then we had situations where multiple responses were being sent to the caller.
The mep was introduced, to the service implementation, as a way of trying to clean some of this up and allow the service to declare, regardless of how the actions behaved, whether a response could be sent at the end of the pipeline. It meant that it was no longer necessary to know which action could progress the pipeline processing and it removed a major source of problems.
If the mep is declared RequestResponse then the service is stating that it should, directly, respond to the caller. If the mep is declared as OneWay then the service is stating that it will not respond to the caller but this does not prevent another service, invoked as part of the pipeline (i.e. routing), from responding.
So your table should look as follows
1. gateway sync=true, service mep=OneWay?
Synchronous invocation, response may come from a second service (as highlighted in IM conversation).
2. gateway sync=true, service mep=RequestResponse?
Synchronous invocation, service pipeline should return response.
3. gateway sync=false, service mep=OneWay?
Asynchronous invocation. Pipeline will not return a response, even in subsequent services, as the client has indicated that it does not want one.
4. gateway sync=false, service mep=RequestResponse?
Asynchronous invocation. Pipeline will not return a response as the caller has indicated that it does not want one.
So in every case the gateway configuration you are discussing will map directly onto the invocation, irrespective of the service mep.
It appears that you are looking for a service contract definition but the mep is not, and has never been, that. The closest we have at present is the EBWS configuration on the service.
Kev
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4252493#4252493
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4252493
15 years, 4 months
[JBoss OSGi Development] - 3.6.3 Optional Packages
by thomas.diesler@jboss.com
3.6.3 Optional Packages
https://jira.jboss.org/jira/browse/JBOSGI-143
A bundle can indicate that it does not require a package to resolve correctly,
but it may use the package if it is available. For example, logging is important,
but the absence of a log service should not prevent a bundle from running.
Optional imports can be specified in the following ways:
Dynamic Imports â The DynamicImport-Package header is intended to
look for an exported package when that package is needed. The key use
case for dynamic import is the Class forName method when a bundle
does not know in advance the class name it may be requested to load.
Resolution Directive â The resolution directive on an import definition
specifying the value optional. A bundle may successfully resolve if a
suitable optional package is not present.
The key difference between these two mechanisms is when the wires are
made. An attempt is made to establish a wire for a dynamic import every
time there is an attempt to load a class in that package, whereas the wire for
a resolution optional package may only be established when the bundle is
resolved.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4252390#4252390
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4252390
15 years, 4 months
[JBoss ESB Development] - Re: Http Gateway - requirements please...
by tfennelly
"jtyrrell" wrote : A few thoughts from this page:
| http://www.jboss.org/community/wiki/HTTPGateway
Hey Jim... thanks for ahving a look and providing some feedback...
"jtyrrell" wrote : What about performance and tuning considerations?
I'm fairly sure this would be done at a container level and that there's nothing in the servlet spec wrt performance tuning etc. So, I think the answer to your question is... same as for any other war deployment in the JBossWeb container.
"jtyrrell" wrote : From that link:
| In the "Synchronous/Asynchronous Responses"
| To be worked out!! Currently using the Service MEP to decide whether or not the gateway should wait on the Service response (mep=RequestResponse), or deliver an empty response immediately (mep="OneWay"). Kev has indicated that we can't use the mep, so we need to find out how it should work.
| section.
|
| Why should we mandate one or the other, why can this not be configurable. Why would we change the "semantics" for this option around mep, although maybe that is not a valid thought either.
|
| I think both sync and async should be support with this, with hopefully the same kind of configurations as the mep parameter?
Not sure what you mean here Jim. Both sync and async are/will be supported. The only outstanding question (AFAIK) is the how part i.e. if we can't use the associated service's mep to decide how the gateway should respond (and Kev has indicated that we can't), what do we use and how would that work ala the questions I asked a few posts back.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4252369#4252369
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4252369
15 years, 4 months