473,320 Members | 2,180 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Implementing a database engine in javascript?

Hi folks. I'd really like some comments or flames please :).

I've ported my xsdb database engine to javascript. I put up
a demo page here:

http://www.xfeedme.com/xsdbXML/xsdbjs/runqueries.html

The xsdb framework provides a flexible and well defined
infrastructure to allow tabular data to be published,
retrieved, and combined over the Internet.

This demo page allows you to load example xsdb
queries from example files, optionally edit them, run
the queries and examine the results of the query
execution. Both the queries and the responses are
encoded in the xsdb data language -- a dialect of XML.

All live processing is done on the client using javascript.
The server provides static data files only. The ultimate goal
of this effort is to provide powerful and easy data manipulation
capabilities on the client. I've tested on IE and Firefox/win only.

For more information on xsdb please go to
http://xsdb.sourceforge.net
The javascript implementation is technically not released yet,
but you can see the current version at
http://www.xfeedme.com/xsdbXML/xsdbjs/xsdball.js
if you are interested.

Comments?
-- Aaron Watters

====
I'm out of my mind at the moment; please leave a message.
(from a teeshirt)

Jan 7 '06 #1
5 2485
aa***************@yahoo.com wrote:
I've ported my xsdb database engine to javascript. I put up
a demo page here:

http://www.xfeedme.com/xsdbXML/xsdbjs/runqueries.html

The xsdb framework provides a flexible and well defined
infrastructure to allow tabular data to be published,
retrieved, and combined over the Internet.

This demo page allows you to load example xsdb
queries from example files, optionally edit them, run
the queries and examine the results of the query
execution. Both the queries and the responses are
encoded in the xsdb data language -- a dialect of XML.

All live processing is done on the client using javascript.
The server provides static data files only. The ultimate goal
of this effort is to provide powerful and easy data manipulation
capabilities on the client. I've tested on IE and Firefox/win only.

For more information on xsdb please go to
http://xsdb.sourceforge.net
The javascript implementation is technically not released yet,
but you can see the current version at
http://www.xfeedme.com/xsdbXML/xsdbjs/xsdball.js
if you are interested.


There are inherent problems with this kind of client side applications.

They require a vast amount of memory from the client. Though your
software may work at acceptable speed on small data, I do not believe
it will be suitable for somewhat larger stuff. XML dialects such as XSL
suffer from the same shortcomings. It's all just too slow and too
limited, and there's not much that can be done about that. Benchmark
your results and compare those too classic RDBMS engines - you'll see a
huge performance difference.

Your software requires huge network traffic too. Queries need their
tables at their finger tips before they can even begin. So every table
needs to be fully transferred first. What about relational stuff like
SQL joins ? Your application would need to get every data file first,
parse it, query it and then output the result... Again, not much can be
done about this either. It's just the way client side queries work.

I think your javascript programme is okay to present/sort/group/parse
small data on the client side. At its best after some (server side)
data filtering method took place. It's like Microsoft's TDC - a pretty
browser thingie but not much more than that. For that purpose, I think
your application could be okay.

--
Bart

Jan 9 '06 #2
re: http://www.xfeedme.com/xsdbXML/xsdbjs/runqueries.html
Thanks. I agree. This approach is not good for large data
sets using javascript on the client.

The intention is to allow processing of larger data sets
on the server if needed, either using one of the other implementations
(java, C#, python) or using a gateway to another archiving
methodology. The client side component is best for simple
manipulations before presentation.

Thanks for the comment! -- Aaron Watters

===
% if I had a ( for every $ Bush spent how many ('s would I have?
too many ('s.
%

Jan 9 '06 #3
aa***************@yahoo.com wrote:
re: http://www.xfeedme.com/xsdbXML/xsdbjs/runqueries.html
Thanks. I agree. This approach is not good for large data
sets using javascript on the client.

The intention is to allow processing of larger data sets
on the server if needed, either using one of the other implementations
(java, C#, python) or using a gateway to another archiving
methodology. The client side component is best for simple
manipulations before presentation.


Then I wouldn't call it a 'javascript database engine'. Microsoft TDC
doesn't call itself a database engine either, simply because it is no
such thing. Also the word 'powerful' is IMO not at its place.

Not that I don't make them, but the javascript seems to have some bugs.
Quick test on MS IE 6.0.2900 XP SP2:

Load ~/xsdbXML/examples/SupplierParts/query_frame_html > hit 'load
query from file' > hit 'run query' > JS error 'Could not get document
element bad xml?' at line 6875.

Load ~/xsdbXML/examples/SupplierParts/remote_parts_query.xsdb > hit
'load query from file' > hit 'run query' > JS error 'Could not retrieve
[url]' at line 6849. Same error for
~/xsdbXML/examples/SupplierParts/rquery.xsdb.

If the Python/C#/Java implementations have acceptable CPU benchmarks,
then that will make a big difference in their applicability compared to
the javascript version. I've no idea how xsdb compares to, let's say,
some SQL database... xsdb will most likely be much slower - of course
this has also to do with the over-and-back XML conversions.

It would be a good idea to investigate how various (Open Source) data
processing software optimizes the read and query actions, to get it as
sharp as possible. Also, csv2xml or xml2csv optimizers should exist.

Good luck with it.

--
Bart

Jan 9 '06 #4
Thanks again.

Sorry about the 3 buggy data files. I have removed them from the page
http://www.xfeedme.com/xsdbXML/xsdbjs/runqueries.html.
One file was simply in the wrong format (html) and the other 2 tried to
get remote files from another server, which violates javascript
security limitations (but is supported by the other implementations).
These were bugs in the page, not bugs in xsdb.

I will continue to call xsdb a database engine, however, because it has
all of the query functionality of sql. It may be that if you need more
speed you will want to use something else, but for many projects the
xsdb approach may be very convenient and fast enough.

Thanks for the other comments. I will be looking into them.

-- Aaron Watters

===
The best performance enhancement is the transition from
"not working" to "working". -- John Ousterhout.

Jan 10 '06 #5
Thanks! I've fixed the problems you mentioned and added
a bunch of other stuff, including an explanatory essay
http://www.xfeedme.com/why.html and an AJAX zip code completion
example http://www.xfeedme.com/zip/zipcompletions_async.html.
Still under construction of course. :)

Please let me know if you have more comments!
-- Aaron Watters

===
February is a horrible month which should be avoided whenever possible.
(from a cookie program somewhere)

Jan 16 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: disaia | last post by:
2 problems: Example: If a person types in a part number into Yahoo: 1. Is there a way for Yahoo to list your web site as one of the results. 2. If the user clicks on your link, can your web...
3
by: Bob | last post by:
Hi! I need a standalone javascript engine so that I can run the javascript statements directly from the command line(just like the interpreted languages) without using any internet environment....
4
by: (Pete Cresswell) | last post by:
I would argue that it is not. JET is a desktop DB engine. Sybase is a database Oracle is a database DB2 is a database. VB 6 is a front-end development tool. PowerBuilder is a front-end...
3
by: PeterH | last post by:
I have an application written in VB.Net that opens an Access database (ie a Microsoft Jet 4 database mdb file). It does not use Access forms or reports, so there is no need for users to have...
5
by: Dennis | last post by:
I am totally confused between Access, SQL Express, and SQL Server and MSDE and OLEDB vs SQL in .net. Please someone tell me if I"m correct in the following: With MSDE installed, I can program...
6
by: LurfysMa | last post by:
I am working on an electronic flashcard application. I have one version up and running using Visual Basic (6.0) and Access 2000. My long-range plans are to put it up on a website and sell...
4
by: Java Guy | last post by:
I can find a lot of stuff on the internet about javascript, except how to I determine which version my IE6 is compatible with, or where to download javascript plugin/engine/what-ever for Windows...
9
by: raylopez99 | last post by:
What's the best way of implementing a multi-node tree in C++? What I'm trying to do is traverse a tree of possible chess moves given an intial position (at the root of the tree). Since every...
1
by: final farewell | last post by:
Hello, I am using Ekhau Location Tracking System for an assignment. It is a system that is able to track configured tags attached to people or objects. I am new to the Ekahau Location Tracking...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.