[Design of JBoss ESB] - Re: Multithreaded services and their EPR(s)
by estebanschifman
When Mark first explained the concept of EPR to me, he assimilated an EPR to a simple 'address'. If many people live in the same address, even in the same apartment/suite, and we are looking for one of them in particular, we need to know the name of the person we are seeking (UID). One address, many people = one EPR, many UIDs
I don't share the description of many listeners in the same EPR being "...hundreds of EPRs...". It is the very same EPR with hundreds of listeners servicing it: each registration with a unique identifier. This concept is independent of if the many listeners are several threads in the same JVM, or distributed in disparate address spaces. If this is solved with one entry, or hundreds, in the registry underlying repository, it will be completely hidden for the user. They could't care less.
Having a UID added to the registration process would not alter the underlying architecture of alpha1. It would be a requirement of the registration API. That's why in a post on the public forum I made on friday, there was a suggestion for the Registry to return a UID at registration time, and that same UID be required at de-registration time.
E
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990818#3990818
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990818
18 years, 1 month
[Design of JBoss ESB] - Re: Multithreaded services and their EPR(s)
by mark.little@jboss.com
First, the EPR is on a per service basis, not a per thread basis. Threads are an implementation issue that should not be exposed to users/clients. If there are hundreds of threads working on behalf of a given service (aka business logic), it would be wrong to then have hundreds of EPRs.
In some ways I agree with Esteban, but in others I think this is related to the thread pool issue. I'm assuming that irrespective of the reloading issue, there is a single listener thread at the "bottom" of the hierarchy that does the registration for the service and all it does upon receipt of a message is to spawn a new worker thread. That's pretty much what most distributed systems have been doing since the mid 1990's when threads (or lightweight processes as they were known then) became more widely available. Assuming we follow this model and ignore reload for now, then we should be fine.
Now back to the reload issue. As I've said before, I think there are good reasons for reloading and reinstantiating the configuration/setup, but that is an implementation specific concern for services. It shouldn't be something that is mandated for all listener implementations. In fact, by default I think all that should happen is a reload of the parameters and if anything has changed we trigger an event and leave it up to the event handler to figure out. If that handler wants to re-instantiate, then it's up to it to figure out how to do it without screwing up anything else. We could provide a handler for JMS, but does anything else really need it at the moment?
Assuming we can agree on what the issue(s) is(are) and potential solutions, the next question is: what can we do for the GA that is quick and gives us a solution? It may not be the best solution, but we can revisit that after the release.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990787#3990787
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990787
18 years, 1 month
[Design of Security on JBoss] - Re: SecurityContext
by scott.stark@jboss.org
We need to make the SecurityContext an interface (it already essentially is), and define some utility methods for accessing key Subject info so that consumers don't have to know how the Subject/SubjectInfo maintain info for things like:
- String getUsername(SubjectInfo s)
- Principal getUserPrincipal(SubjectInfo s)
For Resource, let's generalize the layer into a type and pull the know types out into a separate ResourceTypes constants class.
- MappingContext/MappingProvider, this seems restrictive in that one has to pass in a mutable mappedObject to the performMapping method. This won't work for Principals, Certificates, credentials. This should also be parameterized to support an expected type:
| public interface MappingProvider
| {
| /**
| * Initialize the provider with the configured module options
| * @param options
| */
| void init(Map options);
|
| /**
| * Map the passed object
| * @param map A read-only contextual map that can provide information to the provider
| * @param input an Object on which the mapping will be applied
| * @return the mapping of input
| * @throws IllegalArgumentException if the input is not understood by the
| * provider.
| */
| <T> T performMapping(Map map, T input);
| }
|
With this, we probably want the SecurityContext.getMappingContext(Class mappingType, String key) to allow selection of MappingProvider that support the T,key pair.
We also want to move away from requiring a thread local as an aspect of the spi. In general the call context metadata should contain the SecurityContext, and security aspects would access this. For some apis like JACC we may still need integration via thread locals.
I'm not seeing how the run-as identity and roles fits into the SecurityContext. How does it?
I would also like to sketch out how we do the following with the revised spis:
- Validate incoming calls that have no authentication info. This could be a trusted call based on internal run-as, external run-as with trust assertion, external run-as with trust based on known hosts, external run-as based on trusted transport cert.
- How would we implement the jsr196 authentication?
- How would we configure a scenario where the caller of an ejb was mapped to another identity/credentials for accessing resources like jca connections? For example, a caller derived username/password, principal/credential for a database or jms connection.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990783#3990783
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990783
18 years, 1 month