comp.lang.ada
 help / color / mirror / Atom feed
* New AWS-based website
@ 2012-04-10 22:10 Maciej Sobczak
  2012-04-10 22:42 ` Ludovic Brenta
                   ` (4 more replies)
  0 siblings, 5 replies; 25+ messages in thread
From: Maciej Sobczak @ 2012-04-10 22:10 UTC (permalink / raw)


I'm pleased to announce the launch of a new Ada-based website:

http://www.vetoteka.pl/

This website is intended for veterinary doctors and their patients and
is supposed to provide new communication channels between them. The
majority of its functionality is hidden behind logins and passwords,
but some part of it is available to general public as well - well, at
least to those who understand Polish. ;-)

The website was implemented with the following software stack: Debian
+ PostgreSQL + AWS. This stack has proved to be a very solid
foundation and the implementation of the complete website was a very
easy-going experience, except for a few small bumps at the beginning
of the road. I believe that the support that these technologies give
to the programmer have no equivalent in the web development ecosystem.
In particular, the myth that dynamically typed languages are better
for web due to the fast turn-around (no compilation needed) is
irrelevant when the actual turn-around of the Ada-based solution is
observed in practice. I can recommend this solution to anybody who
attempts to implement a web service from the ground up.

Please feel free to use this website as a positive example of the Ada-
based (AWS in particular) web development.

I will be happy to share the insight and experience that was gained
during the development of this website - feel free to contact me here
or privately in case of any questions.

--
Maciej Sobczak * http://www.inspirel.com



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

* Re: New AWS-based website
  2012-04-10 22:10 New AWS-based website Maciej Sobczak
@ 2012-04-10 22:42 ` Ludovic Brenta
  2012-04-11  1:15   ` Jeffrey Carter
  2012-04-11  7:21   ` Maciej Sobczak
  2012-04-11  7:07 ` tonyg
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 25+ messages in thread
From: Ludovic Brenta @ 2012-04-10 22:42 UTC (permalink / raw)


Maciej Sobczak <see.my.homepage@gmail.com> writes:
> I'm pleased to announce the launch of a new Ada-based website:
>
> http://www.vetoteka.pl/
[...]
>
> The website was implemented with the following software stack: Debian
> + PostgreSQL + AWS. This stack has proved to be a very solid
> foundation[...]

Thanks a lot for that report.  I have two questions:

- what interface did you use between Ada and PostgreSQL?

- did you use the Debian packages, GNAT GPL or a supported GNAT?

-- 
Ludovic Brenta.



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

* Re: New AWS-based website
  2012-04-10 22:42 ` Ludovic Brenta
@ 2012-04-11  1:15   ` Jeffrey Carter
  2012-04-11  7:15     ` tonyg
  2012-04-11  7:21   ` Maciej Sobczak
  1 sibling, 1 reply; 25+ messages in thread
From: Jeffrey Carter @ 2012-04-11  1:15 UTC (permalink / raw)


On 04/10/2012 03:42 PM, Ludovic Brenta wrote:
> Maciej Sobczak<see.my.homepage@gmail.com>  writes:
>> I'm pleased to announce the launch of a new Ada-based website:
>>
>> http://www.vetoteka.pl/
> [...]
>>
>> The website was implemented with the following software stack: Debian
>> + PostgreSQL + AWS. This stack has proved to be a very solid
>> foundation[...]
>
> Thanks a lot for that report.  I have two questions:
>
> - what interface did you use between Ada and PostgreSQL?
>
> - did you use the Debian packages, GNAT GPL or a supported GNAT?

blazedialer.com is also AWS. Not much to look at without a login, I'm afraid.

-- 
Jeff Carter
"My legs are gray, my ears are gnarled, my eyes are old and bent."
Monty Python's Life of Brian
81



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

* Re: New AWS-based website
  2012-04-10 22:10 New AWS-based website Maciej Sobczak
  2012-04-10 22:42 ` Ludovic Brenta
@ 2012-04-11  7:07 ` tonyg
  2012-04-11 11:18   ` Maciej Sobczak
  2012-04-11  7:18 ` Pascal Obry
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 25+ messages in thread
From: tonyg @ 2012-04-11  7:07 UTC (permalink / raw)



My first question after congratulating you , Well done ! is to ask did you use any javascript or AJAX, and my second is to ask if you are a professional programmer or a professional vet, because I need my cat reprogramming to behave itself better.



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

* Re: New AWS-based website
  2012-04-11  1:15   ` Jeffrey Carter
@ 2012-04-11  7:15     ` tonyg
  0 siblings, 0 replies; 25+ messages in thread
From: tonyg @ 2012-04-11  7:15 UTC (permalink / raw)


If its useful for you Ludovic, (You probably know this having answered my demos post)

I am doing a website using the debian gnat, aws, gnade, with Dmitry Kazonovs database access package (which really simplifies the db stuff). 



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

* Re: New AWS-based website
  2012-04-10 22:10 New AWS-based website Maciej Sobczak
  2012-04-10 22:42 ` Ludovic Brenta
  2012-04-11  7:07 ` tonyg
@ 2012-04-11  7:18 ` Pascal Obry
  2012-04-11 18:40 ` Shark8
  2012-04-12  7:45 ` Thomas Locke
  4 siblings, 0 replies; 25+ messages in thread
From: Pascal Obry @ 2012-04-11  7:18 UTC (permalink / raw)
  To: Maciej Sobczak


Maciej,

> I'm pleased to announce the launch of a new Ada-based website:
> 
> http://www.vetoteka.pl/

Congrats!

> The website was implemented with the following software stack: Debian
> + PostgreSQL + AWS.

One question, did you use Ajax? If so, have you used the XML based Ajax
support from AWS? And if so, did you used the macro support for hooking
callbacks to HTML events?

> This stack has proved to be a very solid
> foundation and the implementation of the complete website was a very
> easy-going experience, except for a few small bumps at the beginning
> of the road. I believe that the support that these technologies give
> to the programmer have no equivalent in the web development ecosystem.

My thinking too, but I may be biased :)

> In particular, the myth that dynamically typed languages are better
> for web due to the fast turn-around (no compilation needed) is
> irrelevant when the actual turn-around of the Ada-based solution is
> observed in practice.

My experience too!

Anyway thanks for sharing these feedback.

Pascal.

-- 

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




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

* Re: New AWS-based website
  2012-04-10 22:42 ` Ludovic Brenta
  2012-04-11  1:15   ` Jeffrey Carter
@ 2012-04-11  7:21   ` Maciej Sobczak
  1 sibling, 0 replies; 25+ messages in thread
From: Maciej Sobczak @ 2012-04-11  7:21 UTC (permalink / raw)


On 11 Kwi, 00:42, Ludovic Brenta <ludo...@ludovic-brenta.org> wrote:

> Thanks a lot for that report.  I have two questions:
>
> - what interface did you use between Ada and PostgreSQL?

My own. The PostgreSQL API is very simple and easy to bind - I had a
working thick wrapper from previous experiments and it worked very
well.
The other alternative that I would take into account is SOCI-Ada, but
to be frank it would be unnecessarily big for what was needed.
I strongly oppose any idea of using ODBC-based solutions.

> - did you use the Debian packages, GNAT GPL or a supported GNAT?

All relevant components above the base system (GNAT, PostgreSQL and
AWS) are regular Debian packages.
This was actually related to the "initial bump" that I have mentioned
- the development started on a different system with most recent AWS
version, while the package available on the target machine was a bit
older and missing one or two features related to cookie setting or
such. Fortunately these are simple functions, and were easily
implemented separately.
No other issues were found and the development work was in general
problem-free.

--
Maciej Sobczak * http://www.inspirel.com



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

* Re: New AWS-based website
  2012-04-11  7:07 ` tonyg
@ 2012-04-11 11:18   ` Maciej Sobczak
  0 siblings, 0 replies; 25+ messages in thread
From: Maciej Sobczak @ 2012-04-11 11:18 UTC (permalink / raw)


On 11 Kwi, 09:07, tonyg <tonytheg...@gmail.com> wrote:
> My first question after congratulating you , Well done ! is to ask did you use any javascript or AJAX,

No, there was no such a need for the moment (and we consider the site
to be relatively complete already).
Even though the use of JavaScript might be useful, for example to
implement client-side input validation (but of course not for
security, but rather to make the user's life easier) or some calendar-
like date input or other interactive components, I think AJAX is a
more distant option. The reason is that the original motivation for
using AJAX in the first place was to achieve the effect of reloading
parts of the page instead of full page in order to speed up the
interaction - this motivation is not very relevant here, as natively
compiled Ada is so fast that the efect of nearly instant content
reload can be achieved without complicating the communication scheme
with AJAX (that is, if there is any perceivable latency, it does not
come from the server-side processing).
This is yet another reason to use natively compiled language for web
development, it seems.

> and my second is to ask if you are a professional programmer or a professional vet, because I need my cat reprogramming to behave itself better.

As a professional programmer I can only guess that he got bored with
touchpads and misses a mouse.

--
Maciej Sobczak * http://www.inspirel.com



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

* Re: New AWS-based website
  2012-04-10 22:10 New AWS-based website Maciej Sobczak
                   ` (2 preceding siblings ...)
  2012-04-11  7:18 ` Pascal Obry
@ 2012-04-11 18:40 ` Shark8
  2012-04-12  7:35   ` Maciej Sobczak
  2012-04-12  7:45 ` Thomas Locke
  4 siblings, 1 reply; 25+ messages in thread
From: Shark8 @ 2012-04-11 18:40 UTC (permalink / raw)


On Tuesday, April 10, 2012 5:10:51 PM UTC-5, Maciej Sobczak wrote:
> 
> The website was implemented with the following software stack: Debian
> + PostgreSQL + AWS.

Very nice / congrats.

> This stack has proved to be a very solid
> foundation and the implementation of the complete website was a very
> easy-going experience, except for a few small bumps at the beginning
> of the road. I believe that the support that these technologies give
> to the programmer have no equivalent in the web development ecosystem.

I would tend to agree; though I do wonder about PostgreSQL*. I haven't used it so I don't know what its strengths & weaknesses are; what in particular made you choose it?

*My understanding is that it is very close in functionality/completeness to Firebird (based on Interbase), and that both of these are superior to MySql.

> In particular, the myth that dynamically typed languages are better
> for web due to the fast turn-around (no compilation needed) is
> irrelevant when the actual turn-around of the Ada-based solution is
> observed in practice. I can recommend this solution to anybody who
> attempts to implement a web service from the ground up.

I would go a bit further; the dynamically-typed language seem [IMO] to encourage sloppy, error-prone programming.

> I will be happy to share the insight and experience that was gained
> during the development of this website - feel free to contact me here
> or privately in case of any questions.
> 
> --
> Maciej Sobczak * http://www.inspirel.com

I'll keep your offer in mind should I come across any need (read excuse) to use AWS in any of my projects.



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

* Re: New AWS-based website
  2012-04-11 18:40 ` Shark8
@ 2012-04-12  7:35   ` Maciej Sobczak
  2012-04-13  8:05     ` Ludovic Brenta
  0 siblings, 1 reply; 25+ messages in thread
From: Maciej Sobczak @ 2012-04-12  7:35 UTC (permalink / raw)


On 11 Kwi, 20:40, Shark8 <onewingedsh...@gmail.com> wrote:

> I would tend to agree; though I do wonder about PostgreSQL*. I haven't used it so I don't know what its strengths & weaknesses are; what in particular made you choose it?

The reasons are its maturity, run-time stability, excellent and
readable documentation, stress on data integrity and independence from
short-term licensing/politics/ownership issuess (I find other
databases to be missing in at least one and sometimes even all of
these categories).

Oh, wait - aren't they the reasons to use Ada, too?

I just find that they fit each other very well.

--
Maciej Sobczak * http://www.inspirel.com



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

* Re: New AWS-based website
  2012-04-10 22:10 New AWS-based website Maciej Sobczak
                   ` (3 preceding siblings ...)
  2012-04-11 18:40 ` Shark8
@ 2012-04-12  7:45 ` Thomas Locke
  2012-04-12  8:30   ` tonyg
  2012-04-12 14:07   ` Maciej Sobczak
  4 siblings, 2 replies; 25+ messages in thread
From: Thomas Locke @ 2012-04-12  7:45 UTC (permalink / raw)


On 04/11/2012 12:10 AM, Maciej Sobczak wrote:
> I'm pleased to announce the launch of a new Ada-based website:
>
> http://www.vetoteka.pl/



Very nice! It's always a pleasure seeing this in the response headers:

Server: AWS (Ada Web Server) v2.7.0w



> I will be happy to share the insight and experience that was gained
> during the development of this website - feel free to contact me here
> or privately in case of any questions.



Is there any chance of getting to see the source code?

Did you use templates_parser for the HTML, or something else?


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



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

* Re: New AWS-based website
  2012-04-12  7:45 ` Thomas Locke
@ 2012-04-12  8:30   ` tonyg
  2012-04-12  9:17     ` Thomas Locke
  2012-04-12 14:07   ` Maciej Sobczak
  1 sibling, 1 reply; 25+ messages in thread
From: tonyg @ 2012-04-12  8:30 UTC (permalink / raw)



I would love to see it too, but I realise you may not want to show it publicly for reasons of security and livlihood etc. 
   I should also point out though that although I initially found using AWS quite intimidating to understand, it was quite straightforward to create a web database reporting tool and I'm now planning to use it in more stuff like maybe controlling a pseudo real time system through a web browser ( which is why I wanted to do some ajax with it).
   However the reason I will forever love AWS is that I avoided have to learn PHP.




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

* Re: New AWS-based website
  2012-04-12  8:30   ` tonyg
@ 2012-04-12  9:17     ` Thomas Locke
  0 siblings, 0 replies; 25+ messages in thread
From: Thomas Locke @ 2012-04-12  9:17 UTC (permalink / raw)


On 04/12/2012 10:30 AM, tonyg wrote:
>
> I would love to see it too, but I realise you may not want to show it publicly for reasons of security and livlihood etc.
>     I should also point out though that although I initially found using AWS quite intimidating to understand, it was quite straightforward to create a web database reporting tool and I'm now planning to use it in more stuff like maybe controlling a pseudo real time system through a web browser ( which is why I wanted to do some ajax with it).
>     However the reason I will forever love AWS is that I avoided have to learn PHP.
>


Hehe, I came at Ada with some 10 years of PHP "experience". My God.
I considered myself a decent programmer. Ada taught me differently.

Learning Ada has been a very rewarding experience for me, and AWS is
just another great bonus.

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



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

* Re: New AWS-based website
  2012-04-12  7:45 ` Thomas Locke
  2012-04-12  8:30   ` tonyg
@ 2012-04-12 14:07   ` Maciej Sobczak
  2012-04-12 14:28     ` Thomas Locke
  1 sibling, 1 reply; 25+ messages in thread
From: Maciej Sobczak @ 2012-04-12 14:07 UTC (permalink / raw)


On 12 Kwi, 09:45, Thomas Locke <tho...@12boo.net> wrote:

> Did you use templates_parser for the HTML,

No, I don't see any benefit from it (ironically, this is how PHP was
born!).

> or something else?

The HTML that is returned to the client is a combination of:
- static constants,
- generated (computed or obtained from the database or various local
data structures) content,
- files.

It depends on the expected frequency of changes in the given content,
but since each page is composed of elements from different categories,
it is always some combination of these. There are no strictly static
pages.

I also did not use the AWS session management, as I find it not very
convincing. Any nontrivial session-based operation requires the
implementation of additional data structures, which can easily
accommodate the complete session handling. There is no reason to use
multiple layers of mapping data structures for something that is a
consistent functional block.
Also, no SOAP.

In other words, considering that there are significant functionality
areas of AWS which I did not use, I would very welcome a streamlined
or core version of the library that provides only the most essential
features.
Let's call it "AWS Express Edition" or something like that... ;-)

--
Maciej Sobczak * http://www.inspirel.com



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

* Re: New AWS-based website
  2012-04-12 14:07   ` Maciej Sobczak
@ 2012-04-12 14:28     ` Thomas Locke
  2012-04-12 20:00       ` Shark8
  2012-04-13  7:35       ` Maciej Sobczak
  0 siblings, 2 replies; 25+ messages in thread
From: Thomas Locke @ 2012-04-12 14:28 UTC (permalink / raw)


On 04/12/2012 04:07 PM, Maciej Sobczak wrote:
> On 12 Kwi, 09:45, Thomas Locke<tho...@12boo.net>  wrote:
>
>> Did you use templates_parser for the HTML,
>
> No, I don't see any benefit from it (ironically, this is how PHP was
> born!).



I think it's nice when you have a few dedicated HTML people, who you'd
rather not have mucking around in the Ada code. You can agree on a set
of tags and leave them to work their magic on the GUI side of things.

At least that's how I've used templating systems in the past (primarily
XSLT based). It's a model I feel works very well.

I've yet to use templates_parser for anything "serious". The only thing
I've done with it is the AWS status page and some basic tests.




> I also did not use the AWS session management, as I find it not very
> convincing. Any nontrivial session-based operation requires the
> implementation of additional data structures, which can easily
> accommodate the complete session handling. There is no reason to use
> multiple layers of mapping data structures for something that is a
> consistent functional block.



Ahh yes, the AWS session management system. I too feel that it would be
nice if it were a bit more "flexible", for lack of a better word.




> In other words, considering that there are significant functionality
> areas of AWS which I did not use, I would very welcome a streamlined
> or core version of the library that provides only the most essential
> features.
> Let's call it "AWS Express Edition" or something like that... ;-)


AWS Express Edition - that's a pretty darn good idea! What say you
Pascal?  :o)


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



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

* Re: New AWS-based website
  2012-04-12 14:28     ` Thomas Locke
@ 2012-04-12 20:00       ` Shark8
  2012-04-12 20:31         ` mockturtle
  2012-04-13  8:14         ` [OT] " Jacob Sparre Andersen
  2012-04-13  7:35       ` Maciej Sobczak
  1 sibling, 2 replies; 25+ messages in thread
From: Shark8 @ 2012-04-12 20:00 UTC (permalink / raw)


On Thursday, April 12, 2012 8:28:16 AM UTC-6, Thomas Locke wrote:
> 
> > I also did not use the AWS session management, as I find it not very
> > convincing. Any nontrivial session-based operation requires the
> > implementation of additional data structures, which can easily
> > accommodate the complete session handling. There is no reason to use
> > multiple layers of mapping data structures for something that is a
> > consistent functional block.
> 
> 
> 
> Ahh yes, the AWS session management system. I too feel that it would be
> nice if it were a bit more "flexible", for lack of a better word.

Slightly off-topic, but it's my general impression that a lot of cruft/difficulty in web-development stems from the attempt to impose state on what was developed to be stateless. Would you agree?



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

* Re: New AWS-based website
  2012-04-12 20:00       ` Shark8
@ 2012-04-12 20:31         ` mockturtle
  2012-04-13  8:14         ` [OT] " Jacob Sparre Andersen
  1 sibling, 0 replies; 25+ messages in thread
From: mockturtle @ 2012-04-12 20:31 UTC (permalink / raw)


On Thursday, April 12, 2012 10:00:23 PM UTC+2, Shark8 wrote:
> On Thursday, April 12, 2012 8:28:16 AM UTC-6, Thomas Locke wrote:
> > 
> > > I also did not use the AWS session management, as I find it not very
> > > convincing. Any nontrivial session-based operation requires the
> > > implementation of additional data structures, which can easily
> > > accommodate the complete session handling. There is no reason to use
> > > multiple layers of mapping data structures for something that is a
> > > consistent functional block.
> > 
> > 
> > 
> > Ahh yes, the AWS session management system. I too feel that it would be
> > nice if it were a bit more "flexible", for lack of a better word.
> 
> Slightly off-topic, but it's my general impression that a lot of cruft/difficulty in web-development stems from the attempt to impose state on what was developed to be stateless. Would you agree?

Well, I never thought about it, but now that you say that... Yes, in my (small) experience of SW for web, what made the PHP code an horrible mess was to try to maintain a status between two different visits of the same site.



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

* Re: New AWS-based website
  2012-04-12 14:28     ` Thomas Locke
  2012-04-12 20:00       ` Shark8
@ 2012-04-13  7:35       ` Maciej Sobczak
  2012-04-13 14:11         ` Thomas Løcke
  2012-04-13 16:10         ` Pascal Obry
  1 sibling, 2 replies; 25+ messages in thread
From: Maciej Sobczak @ 2012-04-13  7:35 UTC (permalink / raw)


On 12 Kwi, 16:28, Thomas Locke <tho...@12boo.net> wrote:

> I think it's nice when you have a few dedicated HTML people, who you'd
> rather not have mucking around in the Ada code. You can agree on a set
> of tags and leave them to work their magic on the GUI side of things.
>
> At least that's how I've used templating systems in the past (primarily
> XSLT based). It's a model I feel works very well.

I fully agree with it - if there was such a need, I would divide the
work between XML served directly from the server (very likely as a
combination of sources as described previously) and the XSLT
transformations, which would be under responsibility of other
dedicated developers. CSS is on the same side.

That's why I see no place for template parsers built into AWS - in
other words, between generating HTML directly and generating XML (that
is transformed by XSLT on the client side) there is no space left and
therefore server-side template parser is a solution to the problem
that does not exist.

> I've yet to use templates_parser for anything "serious".

Exactly.

> Ahh yes, the AWS session management system. I too feel that it would be
> nice if it were a bit more "flexible", for lack of a better word.

I think it does not need to be. Doing it properly (that is, flexibly
enough to cover all needs) would be a huge amount of work and it would
always be a wrong solution for some purpose. Considering that doing it
right in the actual context of the target system is not difficult at
all (support for cookies is all that is neededd), there is again no
problem to solve with the library-based solution.

In other words - if the session management can be done entirely in
memory, then a screenful of code does the job and the library has
little added value; and if it requires support from the database, then
the general-purpose library feature will not be adequate anyway.

> AWS Express Edition - that's a pretty darn good idea! What say you
> Pascal?  :o)

:-)

--
Maciej Sobczak * http://www.inspirel.com



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

* Re: New AWS-based website
  2012-04-12  7:35   ` Maciej Sobczak
@ 2012-04-13  8:05     ` Ludovic Brenta
  2012-04-13  9:31       ` Dmitry A. Kazakov
  2012-04-13 13:50       ` Maciej Sobczak
  0 siblings, 2 replies; 25+ messages in thread
From: Ludovic Brenta @ 2012-04-13  8:05 UTC (permalink / raw)


Maciej Sobczak wrote on comp.lang.ada:
> Shark8 wrote:
> 
>> I would tend to agree; though I do wonder about PostgreSQL*.
>> I haven't used it so I don't know what its strengths &
>> weaknesses are; what in particular made you choose it?
> 
> The reasons are its maturity, run-time stability, excellent
> and readable documentation, stress on data integrity and
> independence from short-term licensing/politics/ownership
> issues (I find other databases to be missing in at least one
> and sometimes even all of these categories).
> 
> Oh, wait - aren't they the reasons to use Ada, too?
> 
> I just find that they fit each other very well.

I too like PostgreSQL but my first choice of database would
be SQLite because it avoids all the network and administrative
overhead associated with a database server.  I would use
PostgreSQL as a second choice if I really needed to run the
database and the web server on different machines or if there
were more than one client connecting to the same database.  Is
that your case?

(Oh and in case you ask: you do not need ODBC to talk to an
SQLite database).

-- 
Ludovic Brenta.



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

* [OT] Re: New AWS-based website
  2012-04-12 20:00       ` Shark8
  2012-04-12 20:31         ` mockturtle
@ 2012-04-13  8:14         ` Jacob Sparre Andersen
  2012-04-13 16:09           ` Pascal Obry
  1 sibling, 1 reply; 25+ messages in thread
From: Jacob Sparre Andersen @ 2012-04-13  8:14 UTC (permalink / raw)


Shark8 <onewingedshark@gmail.com> writes:

> Slightly off-topic, but it's my general impression that a lot of
> cruft/difficulty in web-development stems from the attempt to impose
> state on what was developed to be stateless. Would you agree?

Definitely!

And now that you've got me started; why to most web developers insist on
keeping the details of my state hidden inside their system, instead of
storing the state in cookies?  (It would avoid the whole mess of
sessions timing out for no apparent reason.  And it would allow the more
adventurous visitors to adjust the state as needed.)

Greetings,

Jacob
-- 
"When we cite authors we cite their demonstrations, not their names"
                                                           -- Pascal



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

* Re: New AWS-based website
  2012-04-13  8:05     ` Ludovic Brenta
@ 2012-04-13  9:31       ` Dmitry A. Kazakov
  2012-04-13 13:50       ` Maciej Sobczak
  1 sibling, 0 replies; 25+ messages in thread
From: Dmitry A. Kazakov @ 2012-04-13  9:31 UTC (permalink / raw)


On Fri, 13 Apr 2012 01:05:11 -0700 (PDT), Ludovic Brenta wrote:

> I too like PostgreSQL but my first choice of database would
> be SQLite because it avoids all the network and administrative
> overhead associated with a database server.  I would use
> PostgreSQL as a second choice if I really needed to run the
> database and the web server on different machines or if there
> were more than one client connecting to the same database.  Is
> that your case?

But SQLite and full-scale RDBMS have just different applications. SQLite is
for single-file, single-client cases. If the standard Ada library provided
an OS-agnostic transaction safe persistence, you would not need SQLite at
all. A true stand-alone RDBMS is an absolutely different beast.

> (Oh and in case you ask: you do not need ODBC to talk to an
> SQLite database).

Yes, that follows from the above. You need no abstraction layer for the
cases where SQLite comes in question.

ODBC is about communication to a possibly unknown server in a more or less
independent way, since SQL failed to deliver. Well, ODBC failed too, but on
a lesser scale.

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



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

* Re: New AWS-based website
  2012-04-13  8:05     ` Ludovic Brenta
  2012-04-13  9:31       ` Dmitry A. Kazakov
@ 2012-04-13 13:50       ` Maciej Sobczak
  1 sibling, 0 replies; 25+ messages in thread
From: Maciej Sobczak @ 2012-04-13 13:50 UTC (permalink / raw)


On 13 Kwi, 10:05, Ludovic Brenta <ludo...@ludovic-brenta.org> wrote:

> I would use
> PostgreSQL as a second choice if I really needed to run the
> database and the web server on different machines or if there
> were more than one client connecting to the same database.  Is
> that your case?

I cannot exclude this will be the case in some future. We might need
to scale up and making some scalability provisions from the very
beginning was important.
There are already several clients connecting, as there are some batch
processing jobs running in the background. They are managed separately
from the main server process, so having them as tasks/threads within
the server was not an option.
A "real" RDBMS has lots of useful features that we intend to benefit
from and SQLite is not a valid choice.
To be frank, SQLite belongs to the same category of solutions as
template parsers mentioned previously - they are not needed in hello
world programs and they don't offer anything adequate in complex
systems either.

> (Oh and in case you ask: you do not need ODBC to talk to an
> SQLite database).

I know.

--
Maciej Sobczak * http://www.inspirel.com



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

* Re: New AWS-based website
  2012-04-13  7:35       ` Maciej Sobczak
@ 2012-04-13 14:11         ` Thomas Løcke
  2012-04-13 16:10         ` Pascal Obry
  1 sibling, 0 replies; 25+ messages in thread
From: Thomas Løcke @ 2012-04-13 14:11 UTC (permalink / raw)


On 04/13/2012 09:35 AM, Maciej Sobczak wrote:
> That's why I see no place for template parsers built into AWS - in
> other words, between generating HTML directly and generating XML (that
> is transformed by XSLT on the client side) there is no space left and
> therefore server-side template parser is a solution to the problem
> that does not exist.



Client side XSLT transformations is not a trivial matter, especially not
if you're targetting browsers. It's more or less impossible to write XSL
that will work the same across a great many browsers (and versions), and
you cannot be sure that XSLT is even properly supported by all browsers.

So more often than not, you will have to do the transformation on the
server, in which case templates_parser might do the job just as well,
while also being a lot faster. Most XSLT processors are heavy beasts.

 From my meager tests templates_parser is very fast, so there might just
be a few situations where it could come in handy.



> I think it does not need to be. Doing it properly (that is, flexibly
> enough to cover all needs) would be a huge amount of work and it would
> always be a wrong solution for some purpose. Considering that doing it
> right in the actual context of the target system is not difficult at
> all (support for cookies is all that is neededd), there is again no
> problem to solve with the library-based solution.
>
> In other words - if the session management can be done entirely in
> memory, then a screenful of code does the job and the library has
> little added value; and if it requires support from the database, then
> the general-purpose library feature will not be adequate anyway.



You're probably right. I guess I'm just too used to thinking about
sessions and cookies in the context of PHP. Old (and bad) habits are
hard to kill.

Maybe the AWS.Session package could be made a bit more useful if we
could register our own create/destroy/read/write procedures?


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



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

* Re: [OT] Re: New AWS-based website
  2012-04-13  8:14         ` [OT] " Jacob Sparre Andersen
@ 2012-04-13 16:09           ` Pascal Obry
  0 siblings, 0 replies; 25+ messages in thread
From: Pascal Obry @ 2012-04-13 16:09 UTC (permalink / raw)



Jacob,

> And now that you've got me started; why to most web developers insist on
> keeping the details of my state hidden inside their system, instead of
> storing the state in cookies?  (It would avoid the whole mess of
> sessions timing out for no apparent reason.  And it would allow the more
> adventurous visitors to adjust the state as needed.)

Because cookies are limited in size and are sent with every request. So
to save bandwidth it is far far better to not use cookie for session
management. It is better to use them as id management and then store the
session data into an internal structure in the server.

BTW, using the Web Block support in AWS it is quite easy to build
complex templeted system with Ajax with an elegant session named
context. Give it a try!

Pascal.

-- 

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




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

* Re: New AWS-based website
  2012-04-13  7:35       ` Maciej Sobczak
  2012-04-13 14:11         ` Thomas Løcke
@ 2012-04-13 16:10         ` Pascal Obry
  1 sibling, 0 replies; 25+ messages in thread
From: Pascal Obry @ 2012-04-13 16:10 UTC (permalink / raw)



Maciej,

> That's why I see no place for template parsers built into AWS -

Speed!

> in
> other words, between generating HTML directly and generating XML (that
> is transformed by XSLT on the client side) there is no space left and
> therefore server-side template parser is a solution to the problem
> that does not exist.

?

Pascal.

-- 

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




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

end of thread, other threads:[~2012-04-13 16:10 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-10 22:10 New AWS-based website Maciej Sobczak
2012-04-10 22:42 ` Ludovic Brenta
2012-04-11  1:15   ` Jeffrey Carter
2012-04-11  7:15     ` tonyg
2012-04-11  7:21   ` Maciej Sobczak
2012-04-11  7:07 ` tonyg
2012-04-11 11:18   ` Maciej Sobczak
2012-04-11  7:18 ` Pascal Obry
2012-04-11 18:40 ` Shark8
2012-04-12  7:35   ` Maciej Sobczak
2012-04-13  8:05     ` Ludovic Brenta
2012-04-13  9:31       ` Dmitry A. Kazakov
2012-04-13 13:50       ` Maciej Sobczak
2012-04-12  7:45 ` Thomas Locke
2012-04-12  8:30   ` tonyg
2012-04-12  9:17     ` Thomas Locke
2012-04-12 14:07   ` Maciej Sobczak
2012-04-12 14:28     ` Thomas Locke
2012-04-12 20:00       ` Shark8
2012-04-12 20:31         ` mockturtle
2012-04-13  8:14         ` [OT] " Jacob Sparre Andersen
2012-04-13 16:09           ` Pascal Obry
2012-04-13  7:35       ` Maciej Sobczak
2012-04-13 14:11         ` Thomas Løcke
2012-04-13 16:10         ` Pascal Obry

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