Hi John,
Re. Javascript being slow you may be interested in EJScript which is
an Embedded Javascript implementation with a Native Code Compiler.
See: http://www.ejscript.org/products/ejs/doc/guide/ejs/language/overview.html
and http://www.ejscript.org I have not (yet) used it so can't comment
furt
Mutliple threads in one process let me perform load balancing and share
the Sqlite cache. Cache sharing can be a big win.
Alex Katebi wrote:
> Hi John,
>
> Yes the negative with the single thread is single CPU utilization. Then
> again you can run 4 or more servers for a quad CPU. For secur
We make a JSON object of the selected rows and send it to a client in
one network access to minimize network traffic. Suitable for clients
with Javascript. Packaging of the object can suit the client. Limits
are set to avoid choking the client.
Alex Katebi wrote:
> Dennis,
>
> After your
Hi John,
Yes the negative with the single thread is single CPU utilization. Then
again you can run 4 or more servers for a quad CPU. For security I could
either use SSH Port Forwarding or use a MD5 implementation in my
client/server code.
Thanks,
-Alex
On Tue, Jun 10, 2008 at 11:25 PM, Joh
Dennis,
After your explanation the prefixing doesn't look so bad.
The client might do lots of queries before it exits. But I can drop that
temp table when client does finalize. I have to have a state machine for
clients so they don't crash the server by misusing the API anyways.
Thank you!
Alex Katebi wrote:
> However there are two things I don't like about this method. One is that I
> need to parse the prepared statments and prefix queries, and replace the
> table name with the temp table name in the surrogate query. Two is that if
> the client does lots of queries before disconnect
Alex,
Thankyou for the comments. I use non-blocking fd's also but implement
multiple threads to take advantage of multiple processor servers. Since
threads carry quite a bit of baggage your single thread approach would
probably be superior on a single processor machine.
It has been experienc
John,
My server uses epoll( ) and runs non-blocking in a single thread. I did
some google and found out that people who need a very fast server that is
highly scalable are using this model. non-blocking seems to be more
complicated at first glance but it actually makes the server design much
si
We use an application server I wrote which handles HTTP, serves file and
has embedded Sqlite for the RPCs. The RPC can deliver its result either
in XML for widely distributed applications or as JSON if it is
responding to a WWW browser in AJAX mode.
We keep a local library of SQL RPCs so that
Dennis,
My servers main connection itself is in :memory:, but your suggestion
will still work.
However there are two things I don't like about this method. One is that I
need to parse the prepared statments and prefix queries, and replace the
table name with the temp table name in the surrogat
Alex Katebi wrote:
> The only ugliness is that select locks the tables. I wish D. Hipp would give
> us an option for pStmt to create a temporary table of the select result set
> and delete that temp table after finalize automatically. This way a client
> can sit on a prepare/step for a long time.
>
John & John,
Actually my API used to be XML using SCEW a DOM like XML parser that uses
Expat.
For my particular application RPC made more sense to me. What could be
easier than a function call? Another advantage was that I did not have to
create any functions. I am just using SQLite's C API
Alex Katebi wrote:
> Yes I need to do it as 8 byte buffer. Convert the endianess to the network
> then back to host for 8 byte integer.
> I think XML is great for command validation and CLI auto typing, help etc.
> Besides parsing issue, XML can not handle binary data directly.
>
As John pointe
Hi,
Alex Katebi wrote:
> I am trying to implement remote procedure calls (RPC) for SQLite API to be
> used in my application.
> In particular sqlite3_column_double( ) returns a floating point double.
> How can I write this double value into a TCP socket?
> I have tried writing 8 bytes as integer v
Alex, the whole point of using XML is to avoid using binary data in an
RPC situation and to tag the data and thus make extensions less
traumatic. The radix change overhead is insignificant compared to the
network cost and the bonus is complete freedom from endian dilemmas.
The biggest performa
D. Hipp,
I have since identified and fixed my problem, thanks to our user group!
A lot of the networking gear like IP routers use big-endian machines
since this is the format used by the network protocol control messages.
PowerPC is an example.
Thanks,
-Alex
On Mon, Jun 9, 2008 at 10
Arjen,
Thanks!
On Tue, Jun 10, 2008 at 1:39 PM, Arjen Markus <[EMAIL PROTECTED]>
wrote:
> > I am going to guess yes.
> >
> > On Mon, Jun 9, 2008 at 9:58 PM, Russell Leighton
> > <[EMAIL PROTECTED]>
> > wrote:
> >
>
> >>
> >> Aren' t there aligment and endian issues as well as potential floating
>
Yes I need to do it as 8 byte buffer. Convert the endianess to the network
then back to host for 8 byte integer.
I think XML is great for command validation and CLI auto typing, help etc.
Besides parsing issue, XML can not handle binary data directly.
On Tue, Jun 10, 2008 at 12:31 PM, John Stanto
> I am going to guess yes.
>
> On Mon, Jun 9, 2008 at 9:58 PM, Russell Leighton
> <[EMAIL PROTECTED]>
> wrote:
>
>>
>> Aren' t there aligment and endian issues as well as potential floating
>> point representations between platforms?
>>
As most computers nowadays use the IEEE standard to represen
I am going to guess yes.
On Mon, Jun 9, 2008 at 9:58 PM, Russell Leighton <[EMAIL PROTECTED]>
wrote:
>
> On Jun 9, 2008, at 8:52 PM, Igor Tandetnik wrote:
>
> > "Alex Katebi" <[EMAIL PROTECTED]>
> > wrote in message
> > news:[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> >> I am trying to implement remot
Alex Katebi wrote:
> Peter,
>I am using my own implementation. I found RPC and others too complicated
> to use and it did not give me enough control on the transport layer. I need
> my socket to be non-blocking and I am using epoll( ) which is very
> efficient.
>
XDR is a separate specificat
Igor,
You are right. The answer is to use 8 byte buffer and don't forget to
account for the endianess.
I had a bug in my code.
On Mon, Jun 9, 2008 at 8:52 PM, Igor Tandetnik <[EMAIL PROTECTED]> wrote:
> "Alex Katebi" <[EMAIL PROTECTED]>
> wrote in message
> news:[EMAIL PROTECTED]<[EMAIL PROTEC
Peter,
I am using my own implementation. I found RPC and others too complicated
to use and it did not give me enough control on the transport layer. I need
my socket to be non-blocking and I am using epoll( ) which is very
efficient.
Thanks!
-Alex
On Mon, Jun 9, 2008 at 10:53 PM, Peter A. Friend
Can you explain how you are trying to write to the socket and how you
are receiving?
If you use write or send you just supply a pointer to the value and a
length to write, viz - written = write(sokfd, (char *)fptr, 8); where
fptr is a pointer to your floating point number.
We use Sqlite embedd
Alex Katebi wrote:
> I am trying to implement remote procedure calls (RPC) for SQLite API to be
> used in my application.
> In particular sqlite3_column_double( ) returns a floating point double.
> How can I write this double value into a TCP socket?
> I have tried writing 8 bytes as integer values
On Jun 9, 2008, at 9:58 PM, Russell Leighton wrote:
>
> On Jun 9, 2008, at 8:52 PM, Igor Tandetnik wrote:
>
>> "Alex Katebi" <[EMAIL PROTECTED]>
>> wrote in message
>> news:[EMAIL PROTECTED]
>>> I am trying to implement remote procedure calls (RPC) for SQLite API
>>> to be used in my application.
Hello Alex,
How about a text representation? CSV over the network using the HTTP
protocol or something like that.
C
Monday, June 9, 2008, 8:40:39 PM, you wrote:
AK> I am trying to implement remote procedure calls (RPC) for SQLite API to be
AK> used in my application.
AK> In particular sqlite3_c
On Jun 9, 2008, at 8:52 PM, Igor Tandetnik wrote:
> "Alex Katebi" <[EMAIL PROTECTED]>
> wrote in message
> news:[EMAIL PROTECTED]
>> I am trying to implement remote procedure calls (RPC) for SQLite API
>> to be used in my application.
>> In particular sqlite3_column_double( ) returns a floating p
"Alex Katebi" <[EMAIL PROTECTED]>
wrote in message
news:[EMAIL PROTECTED]
> I am trying to implement remote procedure calls (RPC) for SQLite API
> to be used in my application.
> In particular sqlite3_column_double( ) returns a floating point
> double. How can I write this double value into a TCP s
29 matches
Mail list logo