You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by minatds <na...@gmail.com> on 2007/11/15 01:34:33 UTC

Urgent data packet

Hi All,
I still have this problem where I cannot send urgent data packets.
In my Gateway application, I basically proxy between legacy applications and
a mainframe.
These legacy applications send urgent data packets for which mainframe sends
a  response and 
they use as their sync mechanism.
I cannot use SocketConnector as it does not implement raw Java sockets.
There is a defect opened in this regard.

I am trying to find any work around for this solution.

How can I combine raw socket with IOHandler.
Can I open the socket when the session is opened and store in the session as
attachment and
write to that socket.
and then immediately wait for any response from the socket inputstream and 
wrap it as bytebuffer and write it to session?

is this a good approach?
Any ideas

thanks
minatds


-- 
View this message in context: http://www.nabble.com/Urgent-data-packet-tf4808974s16868.html#a13759567
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.


Re: Urgent data packet

Posted by Trustin Lee <tr...@gmail.com>.
On Nov 17, 2007 12:54 AM, minatds <na...@gmail.com> wrote:
> How big is the task to create blocking Socket IO transport.

It's not that big, but there was just no demand so far.  If you are
going to implement it, you'd better start from VmPipe transport in
trunk.  I strongly recommend you to work against trunk because we
won't add any new feature to 1.x.

> is any one already working on it?

No one AFAIK.

> If I can get some guidance, I think I will work on it to develop and test
> it.

You will probably have to create 2 threads per connection; one for
read and the other for write, which means scalability will be
horrible.  As I told you above, starting from vmpipe transport might
be helpful because it's one of the simplest transport, which is almost
bare bone.  Please feel free to ask any questions about implementing a
new transport to the support forum.  We will support you closely if
you are going to contribute your work to MINA.

HTH,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: Urgent data packet

Posted by minatds <na...@gmail.com>.
How big is the task to create blocking Socket IO transport.

is any one already working on it?

If I can get some guidance, I think I will work on it to develop and test
it.

thanks
minatds

Trustin Lee wrote:
> 
> On Nov 16, 2007 3:38 PM, Trustin Lee <tr...@gmail.com> wrote:
>> On Nov 15, 2007 9:34 AM, minatds <na...@gmail.com> wrote:
>> > Hi All,
>> > I still have this problem where I cannot send urgent data packets.
>> > In my Gateway application, I basically proxy between legacy
>> applications and
>> > a mainframe.
>> > These legacy applications send urgent data packets for which mainframe
>> sends
>> > a  response and
>> > they use as their sync mechanism.
>> > I cannot use SocketConnector as it does not implement raw Java sockets.
>> > There is a defect opened in this regard.
>> >
>> > I am trying to find any work around for this solution.
>> >
>> > How can I combine raw socket with IOHandler.
>> > Can I open the socket when the session is opened and store in the
>> session as
>> > attachment and
>> > write to that socket.
>> > and then immediately wait for any response from the socket inputstream
>> and
>> > wrap it as bytebuffer and write it to session?
>> >
>> > is this a good approach?
>>
>> As I already commented in the JIRA issue you created, it's impossible
>> with current JDK implementation.  There's one alternative I can't
>> think of if you want to use MINA with your use case for now: the
>> implementation of blocking I/O based socket transport.  You could
>> contribute in this area, of course.
> 
> I can't think of if -> I can think of is
> 
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
> 
> 

-- 
View this message in context: http://www.nabble.com/Urgent-data-packet-tf4808974s16868.html#a13795830
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.


Re: Urgent data packet

Posted by Trustin Lee <tr...@gmail.com>.
On Nov 16, 2007 3:38 PM, Trustin Lee <tr...@gmail.com> wrote:
> On Nov 15, 2007 9:34 AM, minatds <na...@gmail.com> wrote:
> > Hi All,
> > I still have this problem where I cannot send urgent data packets.
> > In my Gateway application, I basically proxy between legacy applications and
> > a mainframe.
> > These legacy applications send urgent data packets for which mainframe sends
> > a  response and
> > they use as their sync mechanism.
> > I cannot use SocketConnector as it does not implement raw Java sockets.
> > There is a defect opened in this regard.
> >
> > I am trying to find any work around for this solution.
> >
> > How can I combine raw socket with IOHandler.
> > Can I open the socket when the session is opened and store in the session as
> > attachment and
> > write to that socket.
> > and then immediately wait for any response from the socket inputstream and
> > wrap it as bytebuffer and write it to session?
> >
> > is this a good approach?
>
> As I already commented in the JIRA issue you created, it's impossible
> with current JDK implementation.  There's one alternative I can't
> think of if you want to use MINA with your use case for now: the
> implementation of blocking I/O based socket transport.  You could
> contribute in this area, of course.

I can't think of if -> I can think of is

-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Re: Urgent data packet

Posted by Trustin Lee <tr...@gmail.com>.
On Nov 15, 2007 9:34 AM, minatds <na...@gmail.com> wrote:
> Hi All,
> I still have this problem where I cannot send urgent data packets.
> In my Gateway application, I basically proxy between legacy applications and
> a mainframe.
> These legacy applications send urgent data packets for which mainframe sends
> a  response and
> they use as their sync mechanism.
> I cannot use SocketConnector as it does not implement raw Java sockets.
> There is a defect opened in this regard.
>
> I am trying to find any work around for this solution.
>
> How can I combine raw socket with IOHandler.
> Can I open the socket when the session is opened and store in the session as
> attachment and
> write to that socket.
> and then immediately wait for any response from the socket inputstream and
> wrap it as bytebuffer and write it to session?
>
> is this a good approach?

As I already commented in the JIRA issue you created, it's impossible
with current JDK implementation.  There's one alternative I can't
think of if you want to use MINA with your use case for now: the
implementation of blocking I/O based socket transport.  You could
contribute in this area, of course.

HTH,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6