You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Trustin Lee (JIRA)" <ji...@apache.org> on 2007/01/28 05:07:49 UTC

[jira] Created: (DIRMINA-341) Allow binding multiple SocketAddresses per IoAcceptor.

Allow binding multiple SocketAddresses per IoAcceptor.
------------------------------------------------------

                 Key: DIRMINA-341
                 URL: https://issues.apache.org/jira/browse/DIRMINA-341
             Project: MINA
          Issue Type: New Feature
          Components: Core
            Reporter: Trustin Lee
             Fix For: 2.0.0-M1


2.0-M1-SNAPSHOT allows only one SocketAddress to be bound per IoAcceptor.  People want to bind the same protocol handler into more than one NICs with different port.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRMINA-341) Allow binding multiple SocketAddresses per IoAcceptor.

Posted by "Niklas Therning (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRMINA-341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484056 ] 

Niklas Therning commented on DIRMINA-341:
-----------------------------------------

How about just adding setLocalAddresses(SocketAddress[] addresses)?

> Allow binding multiple SocketAddresses per IoAcceptor.
> ------------------------------------------------------
>
>                 Key: DIRMINA-341
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-341
>             Project: MINA
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Trustin Lee
>             Fix For: 2.0.0-M1
>
>
> 2.0-M1-SNAPSHOT allows only one SocketAddress to be bound per IoAcceptor.  People want to bind the same protocol handler into more than one NICs with different port.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DIRMINA-341) Allow binding multiple SocketAddresses per IoAcceptor.

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRMINA-341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny closed DIRMINA-341.
-------------------------------------


> Allow binding multiple SocketAddresses per IoAcceptor.
> ------------------------------------------------------
>
>                 Key: DIRMINA-341
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-341
>             Project: MINA
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Trustin Lee
>            Assignee: Trustin Lee
>             Fix For: 2.0.0-M1
>
>
> 2.0-M1-SNAPSHOT allows only one SocketAddress to be bound per IoAcceptor.  People want to bind the same protocol handler into more than one NICs with different port.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRMINA-341) Allow binding multiple SocketAddresses per IoAcceptor.

Posted by "Michael Newcomb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRMINA-341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484117 ] 

Michael Newcomb commented on DIRMINA-341:
-----------------------------------------

I am insterested in this capability, but I want to make sure there is an option to specify 1 selector thread per bound address.

> Allow binding multiple SocketAddresses per IoAcceptor.
> ------------------------------------------------------
>
>                 Key: DIRMINA-341
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-341
>             Project: MINA
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Trustin Lee
>             Fix For: 2.0.0-M1
>
>
> 2.0-M1-SNAPSHOT allows only one SocketAddress to be bound per IoAcceptor.  People want to bind the same protocol handler into more than one NICs with different port.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRMINA-341) Allow binding multiple SocketAddresses per IoAcceptor.

Posted by "Kenji Hollis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRMINA-341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506226 ] 

Kenji Hollis commented on DIRMINA-341:
--------------------------------------

When a message comes in in the message handler portion of the IO code, how do you get the bound address for which the message was intended?  Is this something that's in the IoSession for the getLocalAddress()?  If so, there's no way to get the port that the connection was bound to is there?  That would probably make the job a little easier for people to determine which port a connection was attached to.

I agree, using a single selector thread for the multiple bind addresses is a good thing(tm).

What may also be a good idea is to create a connection context or a service context that specifies the service space in which a connection has been connected to.  This way, the system can automatically "context switch" between different configurations based on the connected port that an IoSession is attached to.  Something like an IoSessionContext?  Just a thought.

> Allow binding multiple SocketAddresses per IoAcceptor.
> ------------------------------------------------------
>
>                 Key: DIRMINA-341
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-341
>             Project: MINA
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Trustin Lee
>             Fix For: 2.0.0-M1
>
>
> 2.0-M1-SNAPSHOT allows only one SocketAddress to be bound per IoAcceptor.  People want to bind the same protocol handler into more than one NICs with different port.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRMINA-341) Allow binding multiple SocketAddresses per IoAcceptor.

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRMINA-341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484058 ] 

Trustin Lee commented on DIRMINA-341:
-------------------------------------

That's what I was talking about.  What about Set<? extends SocketAddress> then?

> Allow binding multiple SocketAddresses per IoAcceptor.
> ------------------------------------------------------
>
>                 Key: DIRMINA-341
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-341
>             Project: MINA
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Trustin Lee
>             Fix For: 2.0.0-M1
>
>
> 2.0-M1-SNAPSHOT allows only one SocketAddress to be bound per IoAcceptor.  People want to bind the same protocol handler into more than one NICs with different port.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRMINA-341) Allow binding multiple SocketAddresses per IoAcceptor.

Posted by "Kenji Hollis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRMINA-341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506933 ] 

Kenji Hollis commented on DIRMINA-341:
--------------------------------------

To make more sense, why not visualize it.  Here's a proposal to an idea for a change to the org.apache.mina.integration.spring.Binding class:

<bean class="org.apache.mina.integration.spring.Binding">
    <property name="address">
        <list>
            127.0.0.1:2525
            10.10.10.25:2525
            10.10.10.25:2526
        </list>
    </property>
</bean>

Which will allow the Binding to bind to those three addresses.  Then, you can use getLocalAddress and the port to which the connection was made.  It may make more sense to attach it specifically to a different IoSession so the IoSession only applies to the connected socket, and a context attached therein.  But either way would probably work for the first release of 2.0.0.  I think a context switch would make sense there, however, so different rules or connection rules can be applied to different binding ports.

Say, for instance, someone wants to do a blacklist on 10.10.10.25:2526, but not on 10.10.10.25:2525; this is why a context switch may make sense in this regard.  Just something to think about.

> Allow binding multiple SocketAddresses per IoAcceptor.
> ------------------------------------------------------
>
>                 Key: DIRMINA-341
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-341
>             Project: MINA
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Trustin Lee
>             Fix For: 2.0.0-M1
>
>
> 2.0-M1-SNAPSHOT allows only one SocketAddress to be bound per IoAcceptor.  People want to bind the same protocol handler into more than one NICs with different port.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DIRMINA-341) Allow binding multiple SocketAddresses per IoAcceptor.

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRMINA-341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Trustin Lee resolved DIRMINA-341.
---------------------------------

    Resolution: Fixed
      Assignee: Trustin Lee

Done.  You can call IoAcceptor.getLocalAddresses(...) to bind to multiple local addresses.  bind operation will fail and be rolled back if any of the specified local address is not bound.


> Allow binding multiple SocketAddresses per IoAcceptor.
> ------------------------------------------------------
>
>                 Key: DIRMINA-341
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-341
>             Project: MINA
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Trustin Lee
>            Assignee: Trustin Lee
>             Fix For: 2.0.0-M1
>
>
> 2.0-M1-SNAPSHOT allows only one SocketAddress to be bound per IoAcceptor.  People want to bind the same protocol handler into more than one NICs with different port.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRMINA-341) Allow binding multiple SocketAddresses per IoAcceptor.

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRMINA-341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484287 ] 

Trustin Lee commented on DIRMINA-341:
-------------------------------------

We could resolve this issue with 1 selector thread for multiple bind address first, and then implement more flexible thread model configuration as Michael pointed out in the other issue.

> Allow binding multiple SocketAddresses per IoAcceptor.
> ------------------------------------------------------
>
>                 Key: DIRMINA-341
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-341
>             Project: MINA
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Trustin Lee
>             Fix For: 2.0.0-M1
>
>
> 2.0-M1-SNAPSHOT allows only one SocketAddress to be bound per IoAcceptor.  People want to bind the same protocol handler into more than one NICs with different port.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRMINA-341) Allow binding multiple SocketAddresses per IoAcceptor.

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRMINA-341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506457 ] 

Trustin Lee commented on DIRMINA-341:
-------------------------------------

IoSession provides both getLocalAddress and getRemoteAddress, so user can determine which port it's bound to.  You will have to downcast the IoSession to SocketSession though.

Your idea is interesting...but I am not sure if it's a common use case.  It's very easy to implement by IoHandler implementor.

> Allow binding multiple SocketAddresses per IoAcceptor.
> ------------------------------------------------------
>
>                 Key: DIRMINA-341
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-341
>             Project: MINA
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Trustin Lee
>             Fix For: 2.0.0-M1
>
>
> 2.0-M1-SNAPSHOT allows only one SocketAddress to be bound per IoAcceptor.  People want to bind the same protocol handler into more than one NICs with different port.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.