comp.lang.ada
 help / color / mirror / Atom feed
* Communication between Ada and Java through named pipes
@ 2004-12-18 11:28 Mauro Riva
  2004-12-18 18:26 ` Freejack
  2004-12-19 11:12 ` Michael Paus
  0 siblings, 2 replies; 7+ messages in thread
From: Mauro Riva @ 2004-12-18 11:28 UTC (permalink / raw)


I have two applications written in Ada and Java respectively and I want them
to communicate using named pipes but I don't know how to do it.
What I need is simply this : the Ada program has to put a text string into
the pipe and the Java program must read the text, and they must do it in a
non blocking way.
I'm using these programs under windows, does anyone know how to do it? Does
anyone have an example of code?

Thanks,
Mauro





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Communication between Ada and Java through named pipes
  2004-12-18 11:28 Communication between Ada and Java through named pipes Mauro Riva
@ 2004-12-18 18:26 ` Freejack
  2004-12-19 11:12 ` Michael Paus
  1 sibling, 0 replies; 7+ messages in thread
From: Freejack @ 2004-12-18 18:26 UTC (permalink / raw)


On Sat, 18 Dec 2004 11:28:41 +0000, Mauro Riva wrote:

> I have two applications written in Ada and Java respectively and I want them
> to communicate using named pipes but I don't know how to do it.
> What I need is simply this : the Ada program has to put a text string into
> the pipe and the Java program must read the text, and they must do it in a
> non blocking way.
> I'm using these programs under windows, does anyone know how to do it? Does
> anyone have an example of code?
> 
> Thanks,
> Mauro

If you're using the GNAT compiler, look under section 8.5.2 of the GNAT
Reference Manual. That explains how to handle pipes. In fact, read the
whole section 8. Gives a lot of details on handling special files and
devices.

Freejack




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Communication between Ada and Java through named pipes
  2004-12-18 11:28 Communication between Ada and Java through named pipes Mauro Riva
  2004-12-18 18:26 ` Freejack
@ 2004-12-19 11:12 ` Michael Paus
  2004-12-19 16:43   ` Adrien Plisson
  1 sibling, 1 reply; 7+ messages in thread
From: Michael Paus @ 2004-12-19 11:12 UTC (permalink / raw)


Mauro Riva wrote:

> I have two applications written in Ada and Java respectively and I want them
> to communicate using named pipes but I don't know how to do it.

If you do not have the strict requirement to use named pipes I would switch to
sockets. That is much better documented, more general, more flexible and is
known to work with Ada and Java on almost any platform you can think of.
Why would you want to go through the pain getting ancient named pipes to work?

> What I need is simply this : the Ada program has to put a text string into
> the pipe and the Java program must read the text, and they must do it in a
> non blocking way.
> I'm using these programs under windows, does anyone know how to do it? Does
> anyone have an example of code?
> 
> Thanks,
> Mauro
> 
> 




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Communication between Ada and Java through named pipes
  2004-12-19 11:12 ` Michael Paus
@ 2004-12-19 16:43   ` Adrien Plisson
  2004-12-19 18:18     ` u_int32_t
  2004-12-19 21:38     ` Brian May
  0 siblings, 2 replies; 7+ messages in thread
From: Adrien Plisson @ 2004-12-19 16:43 UTC (permalink / raw)


Michael Paus wrote:
> If you do not have the strict requirement to use named pipes I would 
> switch to
> sockets. That is much better documented, more general, more flexible and is
> known to work with Ada and Java on almost any platform you can think of.
> Why would you want to go through the pain getting ancient named pipes to 
> work?

simply because of efficiency ? tcp/ip protocols have some overhead we 
can't always afford if we need high throughput.

i never used named pipes, but i used shared memory once to communicate 
straight between VB and C++. ultra platform specific, but extremely 
efficient...

-- 
rien




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Communication between Ada and Java through named pipes
  2004-12-19 16:43   ` Adrien Plisson
@ 2004-12-19 18:18     ` u_int32_t
  2004-12-19 21:36       ` Adrien Plisson
  2004-12-19 21:38     ` Brian May
  1 sibling, 1 reply; 7+ messages in thread
From: u_int32_t @ 2004-12-19 18:18 UTC (permalink / raw)


On Sun, 19 Dec 2004 17:43:48 +0100, Adrien Plisson wrote:

> i never used named pipes, but i used shared memory once to communicate 
> straight between VB and C++. ultra platform specific, but extremely 
> efficient...

I believe VB is ultra platform specific :)



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Communication between Ada and Java through named pipes
  2004-12-19 18:18     ` u_int32_t
@ 2004-12-19 21:36       ` Adrien Plisson
  0 siblings, 0 replies; 7+ messages in thread
From: Adrien Plisson @ 2004-12-19 21:36 UTC (permalink / raw)


u_int32_t wrote:
> I believe VB is ultra platform specific :)

VB is a fucking unconsistent anti-good-programming-practice language for 
fucking brainless pseudo-developper. unfortunately, my company hires a 
lot of those pricks and only believes in VB for GUI development. it 
gives people the feeling that they are programmers because they can 
place 2 buttons in a fucking window: they don't understand anything of 
what they do and don't even think a bit of software architecture.

the result is always the same: for each software we poorly design a 
one-shot GUI.

i __HATE__ vb.

-- 
rien




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Communication between Ada and Java through named pipes
  2004-12-19 16:43   ` Adrien Plisson
  2004-12-19 18:18     ` u_int32_t
@ 2004-12-19 21:38     ` Brian May
  1 sibling, 0 replies; 7+ messages in thread
From: Brian May @ 2004-12-19 21:38 UTC (permalink / raw)


>>>>> "Adrien" == Adrien Plisson <aplisson-news@stochastique.net> writes:

    Adrien> simply because of efficiency ? tcp/ip protocols have some
    Adrien> overhead we can't always afford if we need high
    Adrien> throughput.

"Sockets" does not mean "TCP/IP".

You can also have Unix domain sockets, which I don't have the
overheads of TCP/IP. An example: X-Windows usually uses Unix domain
sockets for communications to/from client applications because it is
considered better (for local applications) then TCP/IP.

However, the poster didn't make it clear what he was referring to when
he said "sockets".
-- 
Brian May <bam@snoopy.apana.org.au>



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-12-19 21:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-18 11:28 Communication between Ada and Java through named pipes Mauro Riva
2004-12-18 18:26 ` Freejack
2004-12-19 11:12 ` Michael Paus
2004-12-19 16:43   ` Adrien Plisson
2004-12-19 18:18     ` u_int32_t
2004-12-19 21:36       ` Adrien Plisson
2004-12-19 21:38     ` Brian May

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox