Em 18/04/2014 13:30, Steve Atkins escreveu:
On Apr 18, 2014, at 9:11 AM, Edson Richter <edsonrichter@xxxxxxxxxxx> wrote:
Em 17/04/2014 09:00, Steve Spence escreveu:
I'm using a MySQL library on my arduino that allows me to directly
connect to a MySQL database and perform SQL queries on the Arduino.
I need something similar for Postgres. Anyone have the knowledge and
interest to work with me?
Here is a sample of what I'm doing currently, and the results:
http://arduinotronics.blogspot.com/2014/04/arduino-based-sql-queries.html
http://green-trust.org/lmanco/find.php
Steve Spence, KK4HFJ
Director, Green Trust
http://www.green-trust.org
Http://arduinotronics.blogspot.com
Is Arduino capable of running Java apps?
It's a microcontroller, with significantly less functionality than
my wristwatch. The big configurations have something like 8k
of RAM and a few hundred k or flash. The regular ones have
a couple of k of RAM and a few tens of k of flash.
There's no OS, just a single running application.
I'm pretty sure it'd be possible to implement a cut down version
of the PG protocol for it (though for the use case the original
poster mentioned it's a terribly idea, for system security reasons
as much as anything else). It'd be an interesting Saturday
afternoon project, at least.
But running virtual machines on it, or doing naive ports of
a full featured API isn't going to work - there's just not
enough space on the chip, for either code or storage.
Cheers,
Steve
Ok, in that case (and based on my experience with old Z80 tiny devices I
used to program 30 years ago), the best solution that would fit with any
database (not only with PostgreSQL or MySQL, but also making possible to
run other devices than Arduino) is to send data over TCP using
streamlined protocol to a server app - much faster and capable of
handling thousands of devices, and a correctly streamlined protocol will
be hundreds of times faster than any database protocol (a specific piece
of code is always faster than a generic purpose one).
All other's arguments about security, pooling, stability, etc, would be
easily addressed using this combination of customized protocol + custom
receiver server: with a "plus" - you don't have to upgrade your devices
if you want to upgrade database libraries, change schema structure (very
common after a while: change schemas to increase performance or opmize
storage), or similar adjustments that would happen after your app is
running.
That's my 2c,
Edson.
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general