You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Angel.Figueroa" <af...@updatecom.com> on 2007/11/19 20:40:19 UTC

VMPIPE and IPC

1. Can i use VMPIPE for implementing ipc between to separate java process
applications?


2. Can VMPIPE be use in a production application, for decoupling the
connectivity layer from the business layer? In other word have a process for
received the connection from the outside  and business process for
processing the transaction, an both process establish a connectivity using
vmpipe. 

Regards
Angel Figueroa


-- 
View this message in context: http://www.nabble.com/VMPIPE-and-IPC-tf4838884s16868.html#a13843628
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.


Re: VMPIPE and IPC

Posted by mat <fo...@gmail.com>.
I feel deeply sorry to make you feel so uncomforable. MINA benefited me a
lot, however basically i am just
a naive USER of MINA(I only read tutorial, examples and make a server)
Sometimes I also feel sorry to myself since I can only be a user but not a
contributor due to lack of programming skill and no time to
read the all source code. However, I also tried to give some suggestions to
this maillist with my limited knowledge and tried to answer some questions.

Why I asked such a STUPID question because:

>From the example:
SocketAcceptorConfig cfg = new SocketAcceptorConfig();
cfg.getFilterChain().addLast("codec", new ProtocolCodecFilter(new
SumUpProtocolCodecFactory(true)));
acceptor.bind(new InetSocketAddress(SERVER_PORT), new
ServerSessionHandler(), cfg);

I thought that was the one way to configure a filter(need a
xxxAcceptorConfig). But i can't find a corresponding VMAcceptorConfig  in
the API.
I will think more before I raise a question.
Thank you.


On 12/8/07, Trustin Lee <tr...@gmail.com> wrote:
>
> In 1.x:
>
> VmPipeAcceptor acceptor = ...;
> acceptor.getDefaultConfig().getFilterChain().addLast("executor", new
> ExecutorFilter(...));
>
> In 2.x:
>
> acceptor.getFilterChain().addLast("executor", new ExecutorFilter(...));
>
> Now here comes some rant...
>
> I am really sorry to say this to you, but how could you ask this kind
> of question considering that you already know how to add a filter to
> other transports such as socket?  You have been participating in this
> mailing list for a long time and now you are behaving like you don't
> know nothing about how to add a filter.  It's too trivial to answer
> and simply wastes other community members' time.  Are you sure you
> really didn't know how to do that, or just didn't want to try a few
> lines of code by yourself but copy-and-paste?
>
> I don't want to discourage anyone in the mailing list, but I sometimes
> get really discouraged by this kind of post.  Yes, myself really loves
> this project and I spend much more than so-called full-time for this
> project - every day and night literally.  I hope you understand my
> feeling at this moment and what discourages the committers who spends
> enormous amount time for their little baby project.
>
> Trustin
>
> On Dec 8, 2007 12:44 AM, mat <fo...@gmail.com> wrote:
> > Can you tell me how? I can't find an example. Thanks.
> >
> >
> > On 12/7/07, Trustin Lee <tr...@gmail.com> wrote:
> >
> > > Yes.  Insert an ExecutorFilter to the filter chain like you did for
> > > other transports.
> > >
> > > HTH,
> > > Trustin
> > >
> > > On Dec 8, 2007 12:21 AM, mat <fo...@gmail.com> wrote:
> > > > Hi, can I config ExecutorFilter for VMPipe server?
> > > >
> > > >
> > > > On 11/26/07, Trustin Lee <tr...@gmail.com> wrote:
> > > > >
> > > > > On Nov 26, 2007 11:10 AM, mat <fo...@gmail.com> wrote:
> > > > > > The purpose of VM pipe is only for testing? I don't quite
> understand
> > > > > "the
> > > > > > performance will be much better, but not better
> > > > > > than the direct invocation."
> > > > >
> > > > > If you have direct access to the server business logic, you can
> call
> > > > > it directly rather than via vm-pipe.
> > > > >
> > > > > But, if your applications highly depends on MINA and they want to
> > > > > communicate with each other, you could use vm-pipe.
> > > > >
> > > > > Trustin
> > > > > --
> > > > > what we call human nature is actually human habit
> > > > > --
> > > > > http://gleamynode.net/
> > > > > --
> > > > > PGP Key ID: 0x0255ECA6
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > what we call human nature is actually human habit
> > > --
> > > http://gleamynode.net/
> > > --
> > > PGP Key ID: 0x0255ECA6
> > >
> >
>
>
>
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>

Re: VMPIPE and IPC

Posted by Trustin Lee <tr...@gmail.com>.
In 1.x:

VmPipeAcceptor acceptor = ...;
acceptor.getDefaultConfig().getFilterChain().addLast("executor", new
ExecutorFilter(...));

In 2.x:

acceptor.getFilterChain().addLast("executor", new ExecutorFilter(...));

Now here comes some rant...

I am really sorry to say this to you, but how could you ask this kind
of question considering that you already know how to add a filter to
other transports such as socket?  You have been participating in this
mailing list for a long time and now you are behaving like you don't
know nothing about how to add a filter.  It's too trivial to answer
and simply wastes other community members' time.  Are you sure you
really didn't know how to do that, or just didn't want to try a few
lines of code by yourself but copy-and-paste?

I don't want to discourage anyone in the mailing list, but I sometimes
get really discouraged by this kind of post.  Yes, myself really loves
this project and I spend much more than so-called full-time for this
project - every day and night literally.  I hope you understand my
feeling at this moment and what discourages the committers who spends
enormous amount time for their little baby project.

Trustin

On Dec 8, 2007 12:44 AM, mat <fo...@gmail.com> wrote:
> Can you tell me how? I can't find an example. Thanks.
>
>
> On 12/7/07, Trustin Lee <tr...@gmail.com> wrote:
>
> > Yes.  Insert an ExecutorFilter to the filter chain like you did for
> > other transports.
> >
> > HTH,
> > Trustin
> >
> > On Dec 8, 2007 12:21 AM, mat <fo...@gmail.com> wrote:
> > > Hi, can I config ExecutorFilter for VMPipe server?
> > >
> > >
> > > On 11/26/07, Trustin Lee <tr...@gmail.com> wrote:
> > > >
> > > > On Nov 26, 2007 11:10 AM, mat <fo...@gmail.com> wrote:
> > > > > The purpose of VM pipe is only for testing? I don't quite understand
> > > > "the
> > > > > performance will be much better, but not better
> > > > > than the direct invocation."
> > > >
> > > > If you have direct access to the server business logic, you can call
> > > > it directly rather than via vm-pipe.
> > > >
> > > > But, if your applications highly depends on MINA and they want to
> > > > communicate with each other, you could use vm-pipe.
> > > >
> > > > Trustin
> > > > --
> > > > what we call human nature is actually human habit
> > > > --
> > > > http://gleamynode.net/
> > > > --
> > > > PGP Key ID: 0x0255ECA6
> > > >
> > >
> >
> >
> >
> > --
> > what we call human nature is actually human habit
> > --
> > http://gleamynode.net/
> > --
> > PGP Key ID: 0x0255ECA6
> >
>



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

Re: VMPIPE and IPC

Posted by mat <fo...@gmail.com>.
Can you tell me how? I can't find an example. Thanks.

On 12/7/07, Trustin Lee <tr...@gmail.com> wrote:

> Yes.  Insert an ExecutorFilter to the filter chain like you did for
> other transports.
>
> HTH,
> Trustin
>
> On Dec 8, 2007 12:21 AM, mat <fo...@gmail.com> wrote:
> > Hi, can I config ExecutorFilter for VMPipe server?
> >
> >
> > On 11/26/07, Trustin Lee <tr...@gmail.com> wrote:
> > >
> > > On Nov 26, 2007 11:10 AM, mat <fo...@gmail.com> wrote:
> > > > The purpose of VM pipe is only for testing? I don't quite understand
> > > "the
> > > > performance will be much better, but not better
> > > > than the direct invocation."
> > >
> > > If you have direct access to the server business logic, you can call
> > > it directly rather than via vm-pipe.
> > >
> > > But, if your applications highly depends on MINA and they want to
> > > communicate with each other, you could use vm-pipe.
> > >
> > > Trustin
> > > --
> > > what we call human nature is actually human habit
> > > --
> > > http://gleamynode.net/
> > > --
> > > PGP Key ID: 0x0255ECA6
> > >
> >
>
>
>
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>

Re: VMPIPE and IPC

Posted by Trustin Lee <tr...@gmail.com>.
Yes.  Insert an ExecutorFilter to the filter chain like you did for
other transports.

HTH,
Trustin

On Dec 8, 2007 12:21 AM, mat <fo...@gmail.com> wrote:
> Hi, can I config ExecutorFilter for VMPipe server?
>
>
> On 11/26/07, Trustin Lee <tr...@gmail.com> wrote:
> >
> > On Nov 26, 2007 11:10 AM, mat <fo...@gmail.com> wrote:
> > > The purpose of VM pipe is only for testing? I don't quite understand
> > "the
> > > performance will be much better, but not better
> > > than the direct invocation."
> >
> > If you have direct access to the server business logic, you can call
> > it directly rather than via vm-pipe.
> >
> > But, if your applications highly depends on MINA and they want to
> > communicate with each other, you could use vm-pipe.
> >
> > Trustin
> > --
> > what we call human nature is actually human habit
> > --
> > http://gleamynode.net/
> > --
> > PGP Key ID: 0x0255ECA6
> >
>



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

Re: VMPIPE and IPC

Posted by mat <fo...@gmail.com>.
Hi, can I config ExecutorFilter for VMPipe server?

On 11/26/07, Trustin Lee <tr...@gmail.com> wrote:
>
> On Nov 26, 2007 11:10 AM, mat <fo...@gmail.com> wrote:
> > The purpose of VM pipe is only for testing? I don't quite understand
> "the
> > performance will be much better, but not better
> > than the direct invocation."
>
> If you have direct access to the server business logic, you can call
> it directly rather than via vm-pipe.
>
> But, if your applications highly depends on MINA and they want to
> communicate with each other, you could use vm-pipe.
>
> Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>

Re: VMPIPE and IPC

Posted by Trustin Lee <tr...@gmail.com>.
On Nov 26, 2007 11:10 AM, mat <fo...@gmail.com> wrote:
> The purpose of VM pipe is only for testing? I don't quite understand "the
> performance will be much better, but not better
> than the direct invocation."

If you have direct access to the server business logic, you can call
it directly rather than via vm-pipe.

But, if your applications highly depends on MINA and they want to
communicate with each other, you could use vm-pipe.

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

Re: VMPIPE and IPC

Posted by mat <fo...@gmail.com>.
The purpose of VM pipe is only for testing? I don't quite understand "the
performance will be much better, but not better
than the direct invocation."

On 11/23/07, Trustin Lee <tr...@gmail.com> wrote:
>
> On Nov 23, 2007 9:19 AM, mat <fo...@gmail.com> wrote:
> > Hi Trustin,
> >
> > What about performance (throughput)comparing VMPipe to Socket?
>
> You can drop ProtocolCodecFilter, which means you save a lot of CPU
> time.  Therefore, the performance will be much better, but not better
> than the direct invocation.
>
> HTH,
> Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>

Re: VMPIPE and IPC

Posted by Trustin Lee <tr...@gmail.com>.
On Nov 23, 2007 9:19 AM, mat <fo...@gmail.com> wrote:
> Hi Trustin,
>
> What about performance (throughput)comparing VMPipe to Socket?

You can drop ProtocolCodecFilter, which means you save a lot of CPU
time.  Therefore, the performance will be much better, but not better
than the direct invocation.

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

Re: VMPIPE and IPC

Posted by mat <fo...@gmail.com>.
Hi Trustin,

What about performance (throughput)comparing VMPipe to Socket?


On 11/22/07, Trustin Lee <tr...@gmail.com> wrote:
>
> Hi Angel,
>
> On Nov 20, 2007 9:07 PM, Angel.Figueroa <af...@updatecom.com> wrote:
> >
> > IF the two java process are executing on the same java virtual machine,
> it
> > meaning that they can no establish communication or Only in the context
> of
> > the same process executing on the same vm.?
>
> One Java virtual machine means one process.  Do you mean two java
> application (or thread) in the same virtual machine?  If I guessed
> correctly, yes you can exchange data without opening a socket with
> in-VM pipe transport.
>
> HTH,
> Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>

Re: VMPIPE and IPC

Posted by Trustin Lee <tr...@gmail.com>.
Hi Angel,

On Nov 20, 2007 9:07 PM, Angel.Figueroa <af...@updatecom.com> wrote:
>
> IF the two java process are executing on the same java virtual machine, it
> meaning that they can no establish communication or Only in the context of
> the same process executing on the same vm.?

One Java virtual machine means one process.  Do you mean two java
application (or thread) in the same virtual machine?  If I guessed
correctly, yes you can exchange data without opening a socket with
in-VM pipe transport.

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

Re: VMPIPE and IPC

Posted by "Angel.Figueroa" <af...@updatecom.com>.
IF the two java process are executing on the same java virtual machine, it
meaning that they can no establish communication or Only in the context of
the same process executing on the same vm.?


Regards,
angel Figueroa


Trustin Lee wrote:
> 
> Hi Angel,
> 
> On Nov 20, 2007 4:40 AM, Angel.Figueroa <af...@updatecom.com> wrote:
>>
>> 1. Can i use VMPIPE for implementing ipc between to separate java process
>> applications?
> 
> No.  It's for between services in the same VM.
> 
>> 2. Can VMPIPE be use in a production application, for decoupling the
>> connectivity layer from the business layer? In other word have a process
>> for
>> received the connection from the outside  and business process for
>> processing the transaction, an both process establish a connectivity
>> using
>> vmpipe.
> 
> Yes you can. Again, only when the two are in the same VM.
> 
> HTH,
> Trustin
> -- 
> 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/VMPIPE-and-Interprocess-Communication-tf4838884s16868.html#a13855813
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.


Re: VMPIPE and IPC

Posted by Trustin Lee <tr...@gmail.com>.
Hi Angel,

On Nov 20, 2007 4:40 AM, Angel.Figueroa <af...@updatecom.com> wrote:
>
> 1. Can i use VMPIPE for implementing ipc between to separate java process
> applications?

No.  It's for between services in the same VM.

> 2. Can VMPIPE be use in a production application, for decoupling the
> connectivity layer from the business layer? In other word have a process for
> received the connection from the outside  and business process for
> processing the transaction, an both process establish a connectivity using
> vmpipe.

Yes you can. Again, only when the two are in the same VM.

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

Re: VMPIPE and IPC

Posted by hezjing <he...@gmail.com>.
May I know what is VMPIPE?

I'm not able to find good explaination from Google though, and many
results are related MINA.


On 11/20/07, Angel.Figueroa <af...@updatecom.com> wrote:
>
> 1. Can i use VMPIPE for implementing ipc between to separate java process
> applications?
>
>
> 2. Can VMPIPE be use in a production application, for decoupling the
> connectivity layer from the business layer? In other word have a process for
> received the connection from the outside  and business process for
> processing the transaction, an both process establish a connectivity using
> vmpipe.
>
> Regards
> Angel Figueroa
>
>
> --
> View this message in context: http://www.nabble.com/VMPIPE-and-IPC-tf4838884s16868.html#a13843628
> Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
>
>


-- 

Hez