comp.lang.ada
 help / color / mirror / Atom feed
* AWS Entry into the TechEmpower Framework Benchmark Project
@ 2013-11-19  2:59 Shark8
  2013-11-19  2:59 ` Shark8
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Shark8 @ 2013-11-19  2:59 UTC (permalink / raw)


TechEmpower is Benchmarking different frameworks for web-development ( http://www.techempower.com/benchmarks/#section=motivation&hw=i7&test=json ).

There was no entry for AWS, or any other Ada showing (I know there's matreshka, and IIRC several Ada/CGI bindings), so I coded one up.

Unfortunately there is no DB-functionality in it right now, as I couldn't get the ODBC to work, nor could I find a working InterBase (or FireBird) binding for Ada.


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

* Re: AWS Entry into the TechEmpower Framework Benchmark Project
  2013-11-19  2:59 AWS Entry into the TechEmpower Framework Benchmark Project Shark8
@ 2013-11-19  2:59 ` Shark8
  2013-11-28 12:32   ` Graham Stark
  2013-11-21  7:21 ` Shark8
  2013-11-21 15:50 ` ake.ragnar.dahlgren
  2 siblings, 1 reply; 20+ messages in thread
From: Shark8 @ 2013-11-19  2:59 UTC (permalink / raw)


I suppose a link to what I've done would help:
https://github.com/OneWingedShark/web-framework-test


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

* Re: AWS Entry into the TechEmpower Framework Benchmark Project
  2013-11-19  2:59 AWS Entry into the TechEmpower Framework Benchmark Project Shark8
  2013-11-19  2:59 ` Shark8
@ 2013-11-21  7:21 ` Shark8
  2013-11-21  8:08   ` Dmitry A. Kazakov
                     ` (4 more replies)
  2013-11-21 15:50 ` ake.ragnar.dahlgren
  2 siblings, 5 replies; 20+ messages in thread
From: Shark8 @ 2013-11-21  7:21 UTC (permalink / raw)


I got a response from the TechEmpower guys and there're three options for DB:
MySQL, Postgres, and Mongo.

Well, I grabbed MySQL... tried to use GNADE, but that apparently linked in 16-bit code and couldn't be run on my system. I tried getting the GNADE 2.0 branch, but so far I cannot get it to link with mysqlclient.lib and/or libmysql.lib

Any suggestions?

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

* Re: AWS Entry into the TechEmpower Framework Benchmark Project
  2013-11-21  7:21 ` Shark8
@ 2013-11-21  8:08   ` Dmitry A. Kazakov
  2013-11-21  8:46     ` Shark8
  2013-11-21 12:46   ` Vadim Godunko
                     ` (3 subsequent siblings)
  4 siblings, 1 reply; 20+ messages in thread
From: Dmitry A. Kazakov @ 2013-11-21  8:08 UTC (permalink / raw)


On Wed, 20 Nov 2013 23:21:30 -0800 (PST), Shark8 wrote:

> I got a response from the TechEmpower guys and there're three options for DB:
> MySQL, Postgres, and Mongo.
> 
> Well, I grabbed MySQL... tried to use GNADE, but that apparently linked in
> 16-bit code and couldn't be run on my system. I tried getting the GNADE
> 2.0 branch, but so far I cannot get it to link with mysqlclient.lib and/or
> libmysql.lib
> 
> Any suggestions?

ODBC

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


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

* Re: AWS Entry into the TechEmpower Framework Benchmark Project
  2013-11-21  8:08   ` Dmitry A. Kazakov
@ 2013-11-21  8:46     ` Shark8
  0 siblings, 0 replies; 20+ messages in thread
From: Shark8 @ 2013-11-21  8:46 UTC (permalink / raw)


> > Any suggestions?
> 
> ODBC

Thank you, but they said they're not doing ODBC:
https://groups.google.com/forum/?fromgroups=#!topic/framework-benchmarks/Lb6K6MZdgN0

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

* Re: AWS Entry into the TechEmpower Framework Benchmark Project
  2013-11-21  7:21 ` Shark8
  2013-11-21  8:08   ` Dmitry A. Kazakov
@ 2013-11-21 12:46   ` Vadim Godunko
  2013-11-21 17:38   ` Jeffrey Carter
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 20+ messages in thread
From: Vadim Godunko @ 2013-11-21 12:46 UTC (permalink / raw)


On Thursday, November 21, 2013 11:21:30 AM UTC+4, Shark8 wrote:
> I got a response from the TechEmpower guys and there're three options for DB:
> 
> MySQL, Postgres, and Mongo.
> 
> Any suggestions?

Matreshka ;-)

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

* Re: AWS Entry into the TechEmpower Framework Benchmark Project
  2013-11-19  2:59 AWS Entry into the TechEmpower Framework Benchmark Project Shark8
  2013-11-19  2:59 ` Shark8
  2013-11-21  7:21 ` Shark8
@ 2013-11-21 15:50 ` ake.ragnar.dahlgren
  2 siblings, 0 replies; 20+ messages in thread
From: ake.ragnar.dahlgren @ 2013-11-21 15:50 UTC (permalink / raw)


On Tuesday, November 19, 2013 3:59:04 AM UTC+1, Shark8 wrote:
> TechEmpower is Benchmarking different frameworks for web-development ( http://www.techempower.com/benchmarks/#section=motivation&hw=i7&test=json ). There was no entry for AWS, or any other Ada showing (I know there's matreshka, and IIRC several Ada/CGI bindings), so I coded one up. Unfortunately there is no DB-functionality in it right now, as I couldn't get the ODBC to work, nor could I find a working InterBase (or FireBird) binding for Ada.

Using GNATCOLL it's possible to "talk" to a SQLite or PostgreSQL database. To use it you use a text file to describe the tables of your database (the schema). Then you use the executable gnatcoll_db2ada to generate the tables in the database (I've only used it for PostgreSQL), and then you use the same tool to generate the Ada code to be used by your application. Example usage:

To create the tables in the PostgreSQL database:
gnatcoll_db2ada -dbmodel=database_description.txt -dbhost=localhost -dbport=5432 -dbname=database_name -dbuser=user_name -dbpasswd=some_password -createdb

To generate the Ada files:
gnatcoll_db2ada -dbmodel=database_description.txt -api=Auto_Generated_Database_API

When using the SQL database in the Ada code you need the Connection instance.

         Description : GNATCOLL.SQL.Exec.Database_Description;
         Connection  : GNATCOLL.SQL.Exec.Database_Connection;

      Description := GNATCOLL.SQL.Postgres.Setup(Database      => Database_Name,
                                 User          => User_Name,
                                 Host          => Host_URL,
                                 Password      => User_Password,
                                 SSL           => Postgres.Allow,
                                 Cache_Support => True);
      Connection := GNATCOLL.SQL.GNATCOLL.SQL.Exec.Get_Task_Connection(Description  => Description);

When you are finished talking to the database (i.e. when it's time to shutdown the application) you need to:

      GNATCOLL.SQL.Exec.Free (Connection);
      GNATCOLL.SQL.Exec.Free (Description);

You can for example construct an SQL statements by:

      Query_Insert : constant GNATCOLL.SQL.SQL_Query :=
        GNATCOLL.SQL.SQL_Insert(Values => ...);

Before using it you always need to reset the connection to the database by:
      Connection.Reset_Connection;
Then you can execute the SQL statement using the connection instance:
      ... := Connection.Insert_And_Get_PK(Query => Query_Insert,
                                          PK => Auto_Generated_Database_API...);

For further details please read the GNATCOLL documentation.

Best regards,
Åke Ragnar Dahlgren

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

* Re: AWS Entry into the TechEmpower Framework Benchmark Project
  2013-11-21  7:21 ` Shark8
  2013-11-21  8:08   ` Dmitry A. Kazakov
  2013-11-21 12:46   ` Vadim Godunko
@ 2013-11-21 17:38   ` Jeffrey Carter
  2013-11-22  7:53     ` J Kimball
  2013-11-21 19:32   ` Oliver Kleinke
  2013-11-22  7:38   ` Thomas Løcke
  4 siblings, 1 reply; 20+ messages in thread
From: Jeffrey Carter @ 2013-11-21 17:38 UTC (permalink / raw)


On 11/21/2013 12:21 AM, Shark8 wrote:
> I got a response from the TechEmpower guys and there're three options for DB:
> MySQL, Postgres, and Mongo.
>
> Well, I grabbed MySQL... tried to use GNADE, but that apparently linked in 16-bit code and couldn't be run on my system. I tried getting the GNADE 2.0 branch, but so far I cannot get it to link with mysqlclient.lib and/or libmysql.lib
>
> Any suggestions?

I've accessed MySQL using APQ.

-- 
Jeff Carter
"I didn't squawk about the steak, dear. I
merely said I didn't see that old horse
that used to be tethered outside here."
Never Give a Sucker an Even Break
103


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

* Re: AWS Entry into the TechEmpower Framework Benchmark Project
  2013-11-21  7:21 ` Shark8
                     ` (2 preceding siblings ...)
  2013-11-21 17:38   ` Jeffrey Carter
@ 2013-11-21 19:32   ` Oliver Kleinke
  2013-11-22  7:59     ` J Kimball
  2013-11-22  7:38   ` Thomas Løcke
  4 siblings, 1 reply; 20+ messages in thread
From: Oliver Kleinke @ 2013-11-21 19:32 UTC (permalink / raw)


Am Wed, 20 Nov 2013 23:21:30 -0800 (PST)
schrieb Shark8 <onewingedshark@gmail.com>:

> I got a response from the TechEmpower guys and there're three options
> for DB: MySQL, Postgres, and Mongo.
> 
> Well, I grabbed MySQL... tried to use GNADE, but that apparently
> linked in 16-bit code and couldn't be run on my system. I tried
> getting the GNADE 2.0 branch, but so far I cannot get it to link with
> mysqlclient.lib and/or libmysql.lib
> 
> Any suggestions?

There's Postgres-Ada.
https://github.com/io7m/coreland-postgres-ada

GNATCOLL.SQL supports Postgres.
http://docs.adacore.com/gnatcoll-docs/sql.html

I think it should be fairly simple to code a minimalistic binding to
the MongoDB C API.


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

* Re: AWS Entry into the TechEmpower Framework Benchmark Project
  2013-11-21  7:21 ` Shark8
                     ` (3 preceding siblings ...)
  2013-11-21 19:32   ` Oliver Kleinke
@ 2013-11-22  7:38   ` Thomas Løcke
  2013-11-22  8:37     ` Jacob Sparre Andersen
  4 siblings, 1 reply; 20+ messages in thread
From: Thomas Løcke @ 2013-11-22  7:38 UTC (permalink / raw)


On 11/21/2013 08:21 AM, Shark8 wrote:
> I got a response from the TechEmpower guys and there're three options for DB:
> MySQL, Postgres, and Mongo.
>
> Well, I grabbed MySQL... tried to use GNADE, but that apparently linked in 16-bit code and couldn't be run on my system. I tried getting the GNADE 2.0 branch, but so far I cannot get it to link with mysqlclient.lib and/or libmysql.lib
>
> Any suggestions?


Here's another vote for GNATColl:

http://docs.adacore.com/gnatcoll-docs/sql.html

It works very well. We use it quite extensively at AdaHeads for our
project.

-- 
Thomas Løcke | thomas@12boo.net | http://12boo.net

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

* Re: AWS Entry into the TechEmpower Framework Benchmark Project
  2013-11-21 17:38   ` Jeffrey Carter
@ 2013-11-22  7:53     ` J Kimball
  0 siblings, 0 replies; 20+ messages in thread
From: J Kimball @ 2013-11-22  7:53 UTC (permalink / raw)


The old APQ 2.1 is practically a disaster. It doesn't support prepared
statements, accessing columns by name in some instances and feels rather
archaic overall. Not something I would suggest.

There is a APQ successor that effectively rips apart Warren's APQ and
rebuilds it part of the KOW framework by Ogro.

https://bitbucket.org/kowframework

On 11/21/2013 11:38 AM, Jeffrey Carter wrote:
> On 11/21/2013 12:21 AM, Shark8 wrote:
>> I got a response from the TechEmpower guys and there're three options
>> for DB:
>> MySQL, Postgres, and Mongo.
>>
>> Well, I grabbed MySQL... tried to use GNADE, but that apparently
>> linked in 16-bit code and couldn't be run on my system. I tried
>> getting the GNADE 2.0 branch, but so far I cannot get it to link with
>> mysqlclient.lib and/or libmysql.lib
>>
>> Any suggestions?
> 
> I've accessed MySQL using APQ.
> 

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

* Re: AWS Entry into the TechEmpower Framework Benchmark Project
  2013-11-21 19:32   ` Oliver Kleinke
@ 2013-11-22  7:59     ` J Kimball
  0 siblings, 0 replies; 20+ messages in thread
From: J Kimball @ 2013-11-22  7:59 UTC (permalink / raw)


I added prepared statements and reorganized the packages in Postgres-Ada
and have it currently cramed into an assembla repo.

https://incendius.assembla.com/code/Ada-cx/git-6/nodes

On 11/21/2013 01:32 PM, Oliver Kleinke wrote:
> Am Wed, 20 Nov 2013 23:21:30 -0800 (PST)
> schrieb Shark8 <onewingedshark@gmail.com>:
> 
>> I got a response from the TechEmpower guys and there're three options
>> for DB: MySQL, Postgres, and Mongo.
>>
>> Well, I grabbed MySQL... tried to use GNADE, but that apparently
>> linked in 16-bit code and couldn't be run on my system. I tried
>> getting the GNADE 2.0 branch, but so far I cannot get it to link with
>> mysqlclient.lib and/or libmysql.lib
>>
>> Any suggestions?
> 
> There's Postgres-Ada.
> https://github.com/io7m/coreland-postgres-ada
> 
> GNATCOLL.SQL supports Postgres.
> http://docs.adacore.com/gnatcoll-docs/sql.html
> 
> I think it should be fairly simple to code a minimalistic binding to
> the MongoDB C API.
> 



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

* Re: AWS Entry into the TechEmpower Framework Benchmark Project
  2013-11-22  7:38   ` Thomas Løcke
@ 2013-11-22  8:37     ` Jacob Sparre Andersen
  2013-11-22  9:14       ` Shark8
  2013-11-22 17:45       ` Ludovic Brenta
  0 siblings, 2 replies; 20+ messages in thread
From: Jacob Sparre Andersen @ 2013-11-22  8:37 UTC (permalink / raw)


Thomas Løcke wrote:
> Shark8 wrote:

>> [...] there're three options for DB: MySQL, Postgres, and Mongo.

> Here's another vote for GNATColl:

And one more for me.  I use it both at AdaHeads (with Thomas) and for
other projects.

Greetings,

Jacob
-- 
xsnow | xshovel > /dev/null


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

* Re: AWS Entry into the TechEmpower Framework Benchmark Project
  2013-11-22  8:37     ` Jacob Sparre Andersen
@ 2013-11-22  9:14       ` Shark8
  2013-11-22 10:16         ` ake.ragnar.dahlgren
  2013-11-22 17:45       ` Ludovic Brenta
  1 sibling, 1 reply; 20+ messages in thread
From: Shark8 @ 2013-11-22  9:14 UTC (permalink / raw)


On Friday, November 22, 2013 1:37:14 AM UTC-7, Jacob Sparre Andersen wrote:
> Thomas L�cke wrote:
> 
> > Shark8 wrote:
> 
> >> [...] there're three options for DB: MySQL, Postgres, and Mongo.
> > Here's another vote for GNATColl:
> 
> And one more for me.  I use it both at AdaHeads (with Thomas) and for
> other projects.

That's the library I've had the most success with so far.
Unfortunately, the good build I got last night didn't include the Postgresql... so now I'm trying to get another good build, this time with it. Getting a persistent error from ld.exe: "cannot find -lpq"

*sigh*


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

* Re: AWS Entry into the TechEmpower Framework Benchmark Project
  2013-11-22  9:14       ` Shark8
@ 2013-11-22 10:16         ` ake.ragnar.dahlgren
  2013-11-23  0:14           ` Shark8
  0 siblings, 1 reply; 20+ messages in thread
From: ake.ragnar.dahlgren @ 2013-11-22 10:16 UTC (permalink / raw)


On Friday, November 22, 2013 10:14:33 AM UTC+1, Shark8 wrote:
> On Friday, November 22, 2013 1:37:14 AM UTC-7, Jacob Sparre Andersen wrote: > Thomas L�cke wrote: > > > Shark8 wrote: > > >> [...] there're three options for DB: MySQL, Postgres, and Mongo. > > Here's another vote for GNATColl: > > And one more for me. I use it both at AdaHeads (with Thomas) and for > other projects. That's the library I've had the most success with so far. Unfortunately, the good build I got last night didn't include the Postgresql... so now I'm trying to get another good build, this time with it. Getting a persistent error from ld.exe: "cannot find -lpq" *sigh*

I've seen that error too. When you do ./configure for gnatcoll you should have one parameter -with-postgresql=path_to_the_directory_where_postgres_is_installed

Last time I recompiled gnatcoll the installation couldn't find Postgresql if the path to it contained spaces. It required a reinstallation of Postgresql to relocate it.

Good luck,
Åke Ragnar Dahlgren


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

* Re: AWS Entry into the TechEmpower Framework Benchmark Project
  2013-11-22  8:37     ` Jacob Sparre Andersen
  2013-11-22  9:14       ` Shark8
@ 2013-11-22 17:45       ` Ludovic Brenta
  2013-11-23  9:41         ` Thomas Løcke
  1 sibling, 1 reply; 20+ messages in thread
From: Ludovic Brenta @ 2013-11-22 17:45 UTC (permalink / raw)


Jacob Sparre Andersen writes:
> Thomas Løcke wrote:
>> Shark8 wrote:
>
>>> [...] there're three options for DB: MySQL, Postgres, and Mongo.
>
>> Here's another vote for GNATColl:
>
> And one more for me.  I use it both at AdaHeads (with Thomas) and for
> other projects.

Is it possible to persuade you guys to package gnatcoll for the next
release of Debian[1]?

[1] http://bugs.debian.org/640532

-- 
Ludovic Brenta.


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

* Re: AWS Entry into the TechEmpower Framework Benchmark Project
  2013-11-22 10:16         ` ake.ragnar.dahlgren
@ 2013-11-23  0:14           ` Shark8
  2013-12-04  1:55             ` Shark8
  0 siblings, 1 reply; 20+ messages in thread
From: Shark8 @ 2013-11-23  0:14 UTC (permalink / raw)


>> Getting a persistent error from ld.exe: "cannot find -lpq" *sigh*
> 
> I've seen that error too. When you do ./configure for gnatcoll you should have one parameter -with-postgresql=path_to_the_directory_where_postgres_is_installed
> 
> Last time I recompiled gnatcoll the installation couldn't find Postgresql if the path to it contained spaces. It required a reinstallation of Postgresql to relocate it.

Just tried uninstall/reinstall (to a location w/ no spaces) no luck. I'm going to uninstall and try the 32-bit version, but if that fails I'll be well and truly out of ideas.


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

* Re: AWS Entry into the TechEmpower Framework Benchmark Project
  2013-11-22 17:45       ` Ludovic Brenta
@ 2013-11-23  9:41         ` Thomas Løcke
  0 siblings, 0 replies; 20+ messages in thread
From: Thomas Løcke @ 2013-11-23  9:41 UTC (permalink / raw)


On 11/22/2013 06:45 PM, Ludovic Brenta wrote:
> Is it possible to persuade you guys to package gnatcoll for the next
> release of Debian[1]?
>
> [1] http://bugs.debian.org/640532


I'm a Slackware guy, so I really have no idea how to package stuff for
Debian, but funnily enough Jacob and I actually talked about this a few
days ago. I mentioned to him that it would be nice to have as wide a
range of Ada stuff available for Debian as there are for FreeBSD.

Jacob did not look un-interested in packaging gprbuild/gnatcoll for
Debian.  :)

-- 
Thomas Løcke | thomas@12boo.net | http://12boo.net


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

* Re: AWS Entry into the TechEmpower Framework Benchmark Project
  2013-11-19  2:59 ` Shark8
@ 2013-11-28 12:32   ` Graham Stark
  0 siblings, 0 replies; 20+ messages in thread
From: Graham Stark @ 2013-11-28 12:32 UTC (permalink / raw)


On Tuesday, 19 November 2013 02:59:59 UTC, Shark8  wrote:
> I suppose a link to what I've done would help:
> 
> https://github.com/OneWingedShark/web-framework-test

That's interesting. I had a go at the first two database tests using the Posgres stuff in GnatColl and a little database code generator I wrote a couple of years ago (http://virtual-worlds-research.com/downloads/mill). The code is here:

https://github.com/grahamstark/techempower/

I suspect my version is much slower than their peak performers, though I've just tested it locally. They have a peak on the first database test of 105,939 whereas I'm struggling to get above 2,000; I'm guessing that's still under 10,000 on their hardware.

Graham


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

* Re: AWS Entry into the TechEmpower Framework Benchmark Project
  2013-11-23  0:14           ` Shark8
@ 2013-12-04  1:55             ` Shark8
  0 siblings, 0 replies; 20+ messages in thread
From: Shark8 @ 2013-12-04  1:55 UTC (permalink / raw)


[UPDATE]
I've gotten the static build going, now it's failing on the relocatable with the same error.

I did this by (a) adding "-L." and "-L.." to the linker's options in, IIRC, the common gpr file for GNATcoll; (b) enclosing "-lpq" in parentheses -- apparently the & operator chokes on adding a single element; (c) copying the contents of Postgresql's lib dir to the source-dir [from which make and ./configure are run].


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

end of thread, other threads:[~2013-12-04  1:55 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-19  2:59 AWS Entry into the TechEmpower Framework Benchmark Project Shark8
2013-11-19  2:59 ` Shark8
2013-11-28 12:32   ` Graham Stark
2013-11-21  7:21 ` Shark8
2013-11-21  8:08   ` Dmitry A. Kazakov
2013-11-21  8:46     ` Shark8
2013-11-21 12:46   ` Vadim Godunko
2013-11-21 17:38   ` Jeffrey Carter
2013-11-22  7:53     ` J Kimball
2013-11-21 19:32   ` Oliver Kleinke
2013-11-22  7:59     ` J Kimball
2013-11-22  7:38   ` Thomas Løcke
2013-11-22  8:37     ` Jacob Sparre Andersen
2013-11-22  9:14       ` Shark8
2013-11-22 10:16         ` ake.ragnar.dahlgren
2013-11-23  0:14           ` Shark8
2013-12-04  1:55             ` Shark8
2013-11-22 17:45       ` Ludovic Brenta
2013-11-23  9:41         ` Thomas Løcke
2013-11-21 15:50 ` ake.ragnar.dahlgren

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