Subject | Re: [Firebird-Java] Re: JayBird + Firebird on Android |
---|---|
Author | Mark Rotteveel |
Post date | 2011-11-30T15:19:43Z |
On Wed, 30 Nov 2011 17:09:03 +0200, mariuz <mariuz@...-dev.ro>
wrote:
specified by the JTA specification, and which are implemented in the core
of Jaybird.
the internet (granted SSH and SSL client side certificates could solve that
partly, but will mean deployment hassle)
I happen to disagree. It leads to an extreme proliferation of various
(error-prone or unsafe) ways to talk to a database, instead of a single
well-tested interface. The solution already exists: build webservices
specific to your application, handle the exact communication to and from
the database in that webservice, you could replace the entire backend
structure from flatfile to Firebird to Hadoop and back without having to
change your client application.
wrote:
>> It is more complex than that: Firebird internally uses animplementation
>> of the JCA ManagedConnectionFactory which is defined in the JEE JCAof
>> specification (one of the reasons Jaybird requires that
>> mini-j2ee.jar/jaybird-full.jar). These classes are definitely not part
>> Android and would therefor require a significant rewrite(*), and also Ido
>> am
>> not sure if the JSE and/or JEE licensing would allow recompiling the
>> required JCA, JTA and/or JDBC interfaces to Dalvik. That other drivers
>> this is - I think - not sufficient reason for us to do this (especiallyThose aren't method stubs, those are the XA transaction interfaces as
>> considering the other work that needs to be done on Jaybird).
> I have seen some idea to make some of the methods stubs
> but again is still a lot of work
> http://download.oracle.com/berkeley-db/docs/je/3.3.62/HOWTO-Android.html
specified by the JTA specification, and which are implemented in the core
of Jaybird.
>>on
>> But even more than that: in my opinion you really should not use JDBC
>> aphone
>> mobile phone to connect to a database (except for a *mobile-local* db
>> like
>> SQLLite). Database connection protocols, especially those of Firebird,
>> are
>> not really suitable for use over the relatively high-latency mobile
>> connections. Secondly the chattiness of the protocol and processingmultiple
>> required might not be entirely battery friendly. As I said before, I
>> think
>> you are seriously better off (in terms of performance, security,
>> flexibility and scalability) to build a webservice that is accessed by
>> the
>> phone app. The added benefit is a simpler, leaner phone app, a clear
>> separation of concerns and a much simpler way to port the app to
>> phone platforms (you don't need to replicate the entire databaseThat still doesn't remove the risk of having your database accessible over
>> connection
>> part, just the UI, interfacing with the webservice and maybe some
>> additional local logic).
> you can use firebird protocol over ssh/ssl if you want
> but that is another discussion :)
the internet (granted SSH and SSL client side certificates could solve that
partly, but will mean deployment hassle)
> It would be nice if firebird could talk jsonp or some rest protocolhttp://www.flamingspork.com/blog/2011/04/21/http-json-alsosql-interface-to-drizzle/
> directly
> Open http port , and then speak to the firebird directly
> something like
>
I happen to disagree. It leads to an extreme proliferation of various
(error-prone or unsafe) ways to talk to a database, instead of a single
well-tested interface. The solution already exists: build webservices
specific to your application, handle the exact communication to and from
the database in that webservice, you could replace the entire backend
structure from flatfile to Firebird to Hadoop and back without having to
change your client application.