Mixing languages with Ada

This is a discussion on Mixing languages with Ada within the ADA forums in Programming Languages category; I need to do some co-op work in client-server environment. I have to write (some) server and I want to do this in Ada. Team mate has to write client communicating with my server and he wants to use, for example, Java. What is the best choice to mix those languages? Any simple solution? Protocol between server and client will be "simple"....

Go Back   Application Development Forum > Programming Languages > ADA

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 07-23-2008, 05:08 AM
Tomek Walkuski
Guest
 
Default Mixing languages with Ada

I need to do some co-op work in client-server environment. I have to
write (some) server and I want to do this in Ada. Team mate has to
write client communicating with my server and he wants to use, for
example, Java. What is the best choice to mix those languages? Any
simple solution? Protocol between server and client will be "simple".
Reply With Quote
  #2  
Old 07-23-2008, 05:12 AM
xavier grave
Guest
 
Default Re: Mixing languages with Ada

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tomek Walkuski a écrit :
> I need to do some co-op work in client-server environment. I have to
> write (some) server and I want to do this in Ada. Team mate has to
> write client communicating with my server and he wants to use, for
> example, Java. What is the best choice to mix those languages? Any
> simple solution? Protocol between server and client will be "simple".


Hi,

In order to ease you work you can use Web services (using AWS) or Corba
(using PolyORB) for your Ada server.

It will enable you to provide a "contract" for your client code that can
match your Ada specification, at least for AWS using the tool ada2wsdl.

Cordially, xavier
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkiG9foACgkQVIZi0A5BZF7dnACgvGot7tlFSW CK48W0yMtpd1uo
E0MAoIjKlW4TdYn6/zNBMl7SjEq9HKg7
=pK5D
-----END PGP SIGNATURE-----
Reply With Quote
  #3  
Old 07-23-2008, 07:44 AM
Tomek Walkuski
Guest
 
Default Re: Mixing languages with Ada

On 23 Lip, 11:12, xavier grave <xavier.gr...@ipno.in2p3.fr> wrote:
> In order to ease you work you can use Web services (using AWS) or Corba
> (using PolyORB) for your Ada server.
>

Corba? It is like using cannon to kill mosquito In my case, I
think.

I will have to try AWS.

The point is, that the server will be responsible for communication
with some Cisco devices via serial port and client(s) will talk to the
server based on my own protocol.

Reply With Quote
  #4  
Old 07-23-2008, 07:56 AM
xavier grave
Guest
 
Default Re: Mixing languages with Ada

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tomek Walkuski a écrit :
> On 23 Lip, 11:12, xavier grave <xavier.gr...@ipno.in2p3.fr> wrote:
>> In order to ease you work you can use Web services (using AWS) or Corba
>> (using PolyORB) for your Ada server.
>>

> Corba? It is like using cannon to kill mosquito In my case, I
> think.


I proposed Corba as an alternative. But AWS should do the job in a
simpler way (at least no naming services needed).

> I will have to try AWS.
>
> The point is, that the server will be responsible for communication
> with some Cisco devices via serial port and client(s) will talk to the
> server based on my own protocol.


Your can have an Ada library that handle the cisco system with a clean
interface (ie Ada specification) promoted by web services. That can make
available low level access to the client if you want so.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkiHHIcACgkQVIZi0A5BZF5NjQCgi5MK7rY97Q MA2FfAeyPn1wS0
YPoAnA1MtAVTzk8XTHDgnvzovPyBcAY4
=xcne
-----END PGP SIGNATURE-----
Reply With Quote
  #5  
Old 07-23-2008, 12:55 PM
anon
Guest
 
Default Re: Mixing languages with Ada

For client/server programming, once the Ada-2005 specs were adopted last
year Adacore has decided to stop using the RPC package based in Annex-E
by using the RM Annex E.2. (20). Also, back in 2005 they introduce the Java
based Partition Communication Subsystem (PCS) called Polyorb. And now it
the only PCS package supported by Adacore and GNAT-2008.

So, you only have three choices:
1. Use Polyorb, aka Cobra, MOM, etc. In this case, since Polyorb is
based from Java Cobra subsystem, I would use Java. Includes
examples written in Ada.

2. Write you own PCS. And you can use the language of your choice
so long as that language supports networks.

3. Or go back and get the Gnat-Glade-2007 package and build the
RPC. Which will not be supported, except maybe from those who
have used the package through talks in chatrooms and maybe
forums. For this package C or Java is a good bet for a secondary
language. Includes Ada examples.

Since you say the protocols will be simple I would write my own PCS.
Using both Ada and Java for the mixed languages. And you can find C
and Java network examples on the net that can be use to help you write
your Ada code. Skip the overhead of Polynorb or the updating/compiling
for GNAT-Glade-2007 subsystem.


In <4eb01401-f094-444d-8ab2-cebeab2d839c@b1g2000hsg.googlegroups.com>, Tomek Walkuski <tomek.walkuski@gmail.com> writes:
>I need to do some co-op work in client-server environment. I have to
>write (some) server and I want to do this in Ada. Team mate has to
>write client communicating with my server and he wants to use, for
>example, Java. What is the best choice to mix those languages? Any
>simple solution? Protocol between server and client will be "simple".


Reply With Quote
  #6  
Old 08-06-2008, 07:53 AM
Jacob Sparre Andersen
Guest
 
Default Re: Mixing languages with Ada

Tomek Walkuski wrote:

> I need to do some co-op work in client-server environment. I have to
> write (some) server and I want to do this in Ada. Team mate has to
> write client communicating with my server and he wants to use, for
> example, Java. What is the best choice to mix those languages? Any
> simple solution? Protocol between server and client will be
> "simple".


Consider implementing your protocol directly on top of TCP/IP (for
example using GNAT.Sockets).

If you need some examples, then you're welcome to take a look at
<http://edb.jacob-sparre.dk/Posix_in_Ada/11/> and
<http://edb.jacob-sparre.dk/Posix_in_Ada/12/>.

My students have solved several project exercises, where they have
written servers in Ada and clients in Java.

Greetings,

Jacob
--
Stop the proliferation of weapons of maths instruction!
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 04:57 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.