comp.lang.ada
 help / color / mirror / Atom feed
* DBF/Network Application
@ 2004-06-17  6:51 Brian May
  2004-06-17 20:10 ` Brian Catlin
  0 siblings, 1 reply; 12+ messages in thread
From: Brian May @ 2004-06-17  6:51 UTC (permalink / raw)


Hello,

I have been asked to write an application that reads/writes DBF files
and communicates via encrypted TCP connection over a slow network
(GPRS).

Writing this application without reinventing the wheel is obvious the
preferred approach ;-).

There is a push to use Delphi as some code is already written with
Delphi, but as I am unfamiliar with Delphi, especially on Linux (both
Windows and Linux platforms are required) where I don't know how much
I can trust it, I am tending to sway towards Ada.

Questions:

1. Are there any Ada libraries for reading/writing dbase DBF files
from Ada? Or would I need to write my own? Alternatively, are there
any C libraries that I could use?

2. What is the best way of getting encrypted network communications in
Ada?  I have considered:

* using SOAP over https with AWS, but I gather SOAP has relatively
high overheads, due to encoding everything in XML. This might be an
issue with slow network.

* Something like Glade or PolyORB might be more appropriate, but I
don't think these support encryption, making it necessarily to add
encryption elsewhere, eg. IPSEC. Also the issue remains that I don't
yet understand the different between the two, although I gather Glade
is specific to Ada, but PolyORB will allow programs written in
different languages to communicate.

* I probably could use openssl directly, but this probably requires
that I design my own network protocols.

3. What is the preferred way of accessing SQL databases via Ada on
Linux?  GNADE seems to be one way, except the authors of this article
<URL:http://www.adalog.fr/publicat/aws.pdf> concluded it was better to
use ODBC directly.

Any ideas/suggestions?

Thanks in advance.
-- 
Brian May <bam@snoopy.apana.org.au>



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

* Re: DBF/Network Application
  2004-06-17  6:51 DBF/Network Application Brian May
@ 2004-06-17 20:10 ` Brian Catlin
  2004-06-18  5:28   ` Brian May
  0 siblings, 1 reply; 12+ messages in thread
From: Brian Catlin @ 2004-06-17 20:10 UTC (permalink / raw)


Take a look at http://www.adalog.fr/publicat/aws.pdf  They dealt with many of 
the same issues that you are struggling with

 -Brian


"Brian May" <bam@snoopy.apana.org.au> wrote in message 
news:sa4r7ser82r.fsf@snoopy.apana.org.au...
> Hello,
>
> I have been asked to write an application that reads/writes DBF files
> and communicates via encrypted TCP connection over a slow network
> (GPRS).
>
> Writing this application without reinventing the wheel is obvious the
> preferred approach ;-).
>
> There is a push to use Delphi as some code is already written with
> Delphi, but as I am unfamiliar with Delphi, especially on Linux (both
> Windows and Linux platforms are required) where I don't know how much
> I can trust it, I am tending to sway towards Ada.
>
> Questions:
>
> 1. Are there any Ada libraries for reading/writing dbase DBF files
> from Ada? Or would I need to write my own? Alternatively, are there
> any C libraries that I could use?
>
> 2. What is the best way of getting encrypted network communications in
> Ada?  I have considered:
>
> * using SOAP over https with AWS, but I gather SOAP has relatively
> high overheads, due to encoding everything in XML. This might be an
> issue with slow network.
>
> * Something like Glade or PolyORB might be more appropriate, but I
> don't think these support encryption, making it necessarily to add
> encryption elsewhere, eg. IPSEC. Also the issue remains that I don't
> yet understand the different between the two, although I gather Glade
> is specific to Ada, but PolyORB will allow programs written in
> different languages to communicate.
>
> * I probably could use openssl directly, but this probably requires
> that I design my own network protocols.
>
> 3. What is the preferred way of accessing SQL databases via Ada on
> Linux?  GNADE seems to be one way, except the authors of this article
> <URL:http://www.adalog.fr/publicat/aws.pdf> concluded it was better to
> use ODBC directly.
>
> Any ideas/suggestions?
>
> Thanks in advance.
> -- 
> Brian May <bam@snoopy.apana.org.au> 





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

* Re: DBF/Network Application
  2004-06-17 20:10 ` Brian Catlin
@ 2004-06-18  5:28   ` Brian May
  2004-06-18 17:50     ` Brian Catlin
  0 siblings, 1 reply; 12+ messages in thread
From: Brian May @ 2004-06-18  5:28 UTC (permalink / raw)


>>>>> "Brian" == Brian Catlin <BrianC@sannas.org.bad> writes:

    Brian> Take a look at http://www.adalog.fr/publicat/aws.pdf They
    Brian> dealt with many of the same issues that you are struggling
    Brian> with

Thanks for the reference.

Unfortunately (for me at least!), it appears that they decided to
"upgrade" from their DBF files to a SQL based database, and a web
based/HTML communications meets there communication requirements.

Hence, they have not considered how to read/write DBF files or get two
programs communicating to each other with structured & low bandwidth
data.
-- 
Brian May <bam@snoopy.apana.org.au>



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

* Re: DBF/Network Application
  2004-06-18  5:28   ` Brian May
@ 2004-06-18 17:50     ` Brian Catlin
  2004-06-19  3:13       ` Brian May
  0 siblings, 1 reply; 12+ messages in thread
From: Brian Catlin @ 2004-06-18 17:50 UTC (permalink / raw)


"Brian May" <bam@snoopy.apana.org.au> wrote in message 
news:sa4d63xo2o1.fsf@snoopy.apana.org.au...
>>>>>> "Brian" == Brian Catlin <BrianC@sannas.org.bad> writes:
>
>    Brian> Take a look at http://www.adalog.fr/publicat/aws.pdf They
>    Brian> dealt with many of the same issues that you are struggling
>    Brian> with
>
> Thanks for the reference.
>
> Unfortunately (for me at least!), it appears that they decided to
> "upgrade" from their DBF files to a SQL based database, and a web
> based/HTML communications meets there communication requirements.
>
> Hence, they have not considered how to read/write DBF files or get two
> programs communicating to each other with structured & low bandwidth
> data.

You can access .DBF files using ODBC (at least on Windows).  To talk to ODBC 
using Ada (again, on Windows), see http://www.adapower.com/os/odbc.html
Also, take a look at http://perso.wanadoo.fr/pascal.obry/contrib.html

 -Brian





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

* Re: DBF/Network Application
  2004-06-18 17:50     ` Brian Catlin
@ 2004-06-19  3:13       ` Brian May
  2004-06-19  7:40         ` Pascal Obry
  0 siblings, 1 reply; 12+ messages in thread
From: Brian May @ 2004-06-19  3:13 UTC (permalink / raw)


>>>>> "Brian" == Brian Catlin <BrianC@sannas.org.bad> writes:

    Brian> You can access .DBF files using ODBC (at least on Windows).

Cool. I was wondering about this. At least some of the information I
have received seems to contradict itself, so just trying to work this
out is difficult. Presumably, you setup the DBF file in the Windows
control panel?

    Brian> To talk to ODBC using Ada (again, on Windows), see
    Brian> http://www.adapower.com/os/odbc.html

Thanks for the reference. It seems to use Win32 ODBC calls directly to
access the database.

    Brian> Also, take a look at
    Brian> http://perso.wanadoo.fr/pascal.obry/contrib.html

English would be a cool feature ... ;-).

No doubt you were referring me to databases.tgz, which looks like a
higher level layer on top of the Win32 calls.

Another solution is <URL:http://www.adapower.com/reuse/iodbc.tar.gz>,
although at a quick glance the quality of databases.tgz looks better.
Both appear to be Windows specific solutions.

I probably should re-investigate GNADE again, it would appear to be
the most portable solution.

Thanks!
-- 
Brian May <bam@snoopy.apana.org.au>



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

* Re: DBF/Network Application
  2004-06-19  3:13       ` Brian May
@ 2004-06-19  7:40         ` Pascal Obry
  2004-06-21  7:28           ` Jano
  0 siblings, 1 reply; 12+ messages in thread
From: Pascal Obry @ 2004-06-19  7:40 UTC (permalink / raw)



Brian May <bam@snoopy.apana.org.au> writes:

>     Brian> Also, take a look at
>     Brian> http://perso.wanadoo.fr/pascal.obry/contrib.html
> 
> English would be a cool feature ... ;-).

We need at least some Ada pages in French :)

> No doubt you were referring me to databases.tgz, which looks like a

Yep. But this was (an old) just a proof that Ada can talk ODBC. It can be used
for simple applications, works fine but is only Win32.

> higher level layer on top of the Win32 calls.

> I probably should re-investigate GNADE again, it would appear to be
> the most portable solution.

Certainly the best way to go. GNADE is the best Ada databases binding
around and works fine. Note that some have reported problems with embedded
SQL (or maybe this OBE?), can't comment as I have never use it.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.org
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



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

* Re: DBF/Network Application
  2004-06-19  7:40         ` Pascal Obry
@ 2004-06-21  7:28           ` Jano
  2004-06-23  2:45             ` Brian May
  2004-06-28 18:12             ` Michael Erdmann
  0 siblings, 2 replies; 12+ messages in thread
From: Jano @ 2004-06-21  7:28 UTC (permalink / raw)


Pascal Obry wrote:

> Certainly the best way to go. GNADE is the best Ada databases binding
> around and works fine. Note that some have reported problems with embedded
> SQL (or maybe this OBE?), can't comment as I have never use it.

I had some problems with embedded insertions in windows with and Access 
2000 database, so the problem may be highly specific. Never digged into 
it. I was recommended to use directly the ODBC packages, which I'll try 
if I need some "databasing" in the future.

The adbc packages in GNADE seemed particularly promising, but sadly last 
time I checked them they were linux only :/



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

* Re: DBF/Network Application
  2004-06-21  7:28           ` Jano
@ 2004-06-23  2:45             ` Brian May
  2004-06-23  8:11               ` Jano
  2004-06-28 18:51               ` Michael Erdmann
  2004-06-28 18:12             ` Michael Erdmann
  1 sibling, 2 replies; 12+ messages in thread
From: Brian May @ 2004-06-23  2:45 UTC (permalink / raw)


>>>>> "Jano" == Jano  <notelacreas@porfavor.no> writes:

    Jano> I had some problems with embedded insertions in windows with and
    Jano> Access 2000 database, so the problem may be highly specific. Never
    Jano> digged into it. I was recommended to use directly the ODBC packages,
    Jano> which I'll try if I need some "databasing" in the future.

    Jano> The adbc packages in GNADE seemed particularly promising, but sadly
    Jano> last time I checked them they were linux only :/

The ADBC interface seems to be marked highly experimental. No doubt the
situation with Windows support will improve. I also see "The future of
this interface is unclear since there is allmost no response from the
community."

I assume you can still use GNADE with Windows ODBC, eg. by directly
interfacing to the ODBC layer? (I am not familiar with the GNADE
architecture).
-- 
Brian May <bam@snoopy.apana.org.au>



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

* Re: DBF/Network Application
  2004-06-23  2:45             ` Brian May
@ 2004-06-23  8:11               ` Jano
  2004-06-28 18:51               ` Michael Erdmann
  1 sibling, 0 replies; 12+ messages in thread
From: Jano @ 2004-06-23  8:11 UTC (permalink / raw)


Brian May wrote:

>>>>>>"Jano" == Jano  <notelacreas@porfavor.no> writes:
> 
> 
>     Jano> I had some problems with embedded insertions in windows with and
>     Jano> Access 2000 database, so the problem may be highly specific. Never
>     Jano> digged into it. I was recommended to use directly the ODBC packages,
>     Jano> which I'll try if I need some "databasing" in the future.
> 
>     Jano> The adbc packages in GNADE seemed particularly promising, but sadly
>     Jano> last time I checked them they were linux only :/
> 
> The ADBC interface seems to be marked highly experimental. No doubt the
> situation with Windows support will improve. I also see "The future of
> this interface is unclear since there is allmost no response from the
> community."

I haven't looked at it recently, but I'm surprised. It seemed very 
straightforward to use, and the best option if embedded sql is not an 
option.

> I assume you can still use GNADE with Windows ODBC, eg. by directly
> interfacing to the ODBC layer? (I am not familiar with the GNADE
> architecture).

Yes, the ODBC package is there and in fact the precompiler for embedded 
sql uses it. However, I find it cumbersome and not-so-easy to get into 
it. Maybe I haven't devoted enough time.



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

* Re: DBF/Network Application
  2004-06-21  7:28           ` Jano
  2004-06-23  2:45             ` Brian May
@ 2004-06-28 18:12             ` Michael Erdmann
  2004-06-29  7:56               ` Jano
  1 sibling, 1 reply; 12+ messages in thread
From: Michael Erdmann @ 2004-06-28 18:12 UTC (permalink / raw)


Jano wrote:
> Pascal Obry wrote:
> 

> I had some problems with embedded insertions in windows with and Access 
> 2000 database, so the problem may be highly specific. Never digged into 
> it. I was recommended to use directly the ODBC packages, which I'll try 
> if I need some "databasing" in the future.
> 
> The adbc packages in GNADE seemed particularly promising, but sadly last 
> time I checked them they were linux only :/
The adbc package is not more maintained. The idea was quite nice in 
having a common API combining all native and the odbc into one
package, but ODBC does this any way. I would go for odbc.

Regards
     M.Erdmann




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

* Re: DBF/Network Application
  2004-06-23  2:45             ` Brian May
  2004-06-23  8:11               ` Jano
@ 2004-06-28 18:51               ` Michael Erdmann
  1 sibling, 0 replies; 12+ messages in thread
From: Michael Erdmann @ 2004-06-28 18:51 UTC (permalink / raw)
  To: Brian May

Brian May wrote:

>>>>>>"Jano" == Jano  <notelacreas@porfavor.no> writes:
> 
> 
>     Jano> I had some problems with embedded insertions in windows with and
>     Jano> Access 2000 database, so the problem may be highly specific. Never
>     Jano> digged into it. I was recommended to use directly the ODBC packages,
>     Jano> which I'll try if I need some "databasing" in the future.
> 
>     Jano> The adbc packages in GNADE seemed particularly promising, but sadly
>     Jano> last time I checked them they were linux only :/
> 
> The ADBC interface seems to be marked highly experimental. No doubt the
> situation with Windows support will improve. I also see "The future of
> this interface is unclear since there is allmost no response from the
> community."
Yes, this is true. Personally i would not use it, since the odbc 
bindings do the same.
> 
> I assume you can still use GNADE with Windows ODBC, eg. by directly
> interfacing to the ODBC layer? (I am not familiar with the GNADE
> architecture).
Yes, you can directly use the odbc bindings.




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

* Re: DBF/Network Application
  2004-06-28 18:12             ` Michael Erdmann
@ 2004-06-29  7:56               ` Jano
  0 siblings, 0 replies; 12+ messages in thread
From: Jano @ 2004-06-29  7:56 UTC (permalink / raw)


Michael Erdmann wrote:
> Jano wrote:
> 
>> Pascal Obry wrote:
>>
> 
>> I had some problems with embedded insertions in windows with and 
>> Access 2000 database, so the problem may be highly specific. Never 
>> digged into it. I was recommended to use directly the ODBC packages, 
>> which I'll try if I need some "databasing" in the future.
>>
>> The adbc packages in GNADE seemed particularly promising, but sadly 
>> last time I checked them they were linux only :/
> 
> The adbc package is not more maintained. The idea was quite nice in 
> having a common API combining all native and the odbc into one
> package, but ODBC does this any way. I would go for odbc.

The only drawback is that ADBC seemed very friendly, and ODBC seems to 
need quite some overwork for simple queries (?).



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

end of thread, other threads:[~2004-06-29  7:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-17  6:51 DBF/Network Application Brian May
2004-06-17 20:10 ` Brian Catlin
2004-06-18  5:28   ` Brian May
2004-06-18 17:50     ` Brian Catlin
2004-06-19  3:13       ` Brian May
2004-06-19  7:40         ` Pascal Obry
2004-06-21  7:28           ` Jano
2004-06-23  2:45             ` Brian May
2004-06-23  8:11               ` Jano
2004-06-28 18:51               ` Michael Erdmann
2004-06-28 18:12             ` Michael Erdmann
2004-06-29  7:56               ` Jano

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