speed of VM vs. speed of database

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

speed of VM vs. speed of database

sergio_101-2
i am currently developing an app just for fun..

during my day job, i am a developer using a web framework that
directly connects to a database (mysql)..

one of the things we always do is craft our queries to use use the
database only for all queries and selections. when you use the
database for anything other than trivial queries, the difference is
the speed of the query is totally evident..


i am just wondering how the speed of the smalltalk VM compares to the
speed of pulling results from a database and shoving them into an
array..

thanks!

--
----
peace,
sergio
photographer, journalist, visionary

http://www.CodingForHire.com
http://www.coffee-black.com
http://www.painlessfrugality.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: speed of VM vs. speed of database

sebastianconcept@gmail.co
hey sergio,

if objects and tables with relations where truly comparable, objet-relational-impedance-mismatch [1] would not exist.

In the other hand if you use a BTree of objects indexed in the way you need, your speed will have no match in the RDBMS world.

Proper use of Gemstone, omnibase or even a modest index persisted in the image (a facade to a BTree or something like that) will satisfy quite high expectations.

Have in mind that, for performance, the only metric that really counts is the user experience.

Maximize anything else and you'll be heading to a non human centered artifact, faster.

BTW, this could be off topic but in the economy there is an anti-pattern familiar to this when you see companies maximizing profit instead of wealth creation.

for more I highly recommend this video:

Re-thinking IT by John Seddon


o/




On Dec 3, 2011, at 3:56 PM, sergio_101 wrote:

i am currently developing an app just for fun..

during my day job, i am a developer using a web framework that
directly connects to a database (mysql)..

one of the things we always do is craft our queries to use use the
database only for all queries and selections. when you use the
database for anything other than trivial queries, the difference is
the speed of the query is totally evident..


i am just wondering how the speed of the smalltalk VM compares to the
speed of pulling results from a database and shoving them into an
array..

thanks!

--
----
peace,
sergio
photographer, journalist, visionary

http://www.CodingForHire.com
http://www.coffee-black.com
http://www.painlessfrugality.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside





_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: speed of VM vs. speed of database

Philippe Marschall
In reply to this post by sergio_101-2
2011/12/3 sergio_101 <[hidden email]>:
> i am currently developing an app just for fun..
>
> during my day job, i am a developer using a web framework that
> directly connects to a database (mysql)..
>
> one of the things we always do is craft our queries to use use the
> database only for all queries and selections. when you use the
> database for anything other than trivial queries, the difference is
> the speed of the query is totally evident..

I have had good to very good experiences with RDBMs given they were
properly set up and I wasn't doing "stupid" things.

> i am just wondering how the speed of the smalltalk VM compares to the
> speed of pulling results from a database and shoving them into an
> array..

What do you mean with "speed of the WM"? Just the rendering speed?

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: speed of VM vs. speed of database

sergio_101-2
>
> What do you mean with "speed of the WM"? Just the rendering speed?
>

by speed, i mean the time from asking for a queried subset of results,
and getting the results..

thanks!

--
----
peace,
sergio
photographer, journalist, visionary

http://www.CodingForHire.com
http://www.coffee-black.com
http://www.painlessfrugality.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: speed of VM vs. speed of database

sergio_101-2
In reply to this post by sebastianconcept@gmail.co
> Proper use of Gemstone, omnibase or even a modest index persisted in the
> image (a facade to a BTree or something like that) will satisfy quite high
> expectations.
>

hey, sebastian..

just out of curiosity, which smalltalk are you using?

cincom looks fun, but i don't want to get involved in something i
can't directly get the price on..

thanks!



--
----
peace,
sergio
photographer, journalist, visionary

http://www.CodingForHire.com
http://www.coffee-black.com
http://www.painlessfrugality.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: speed of VM vs. speed of database

Philippe Marschall
In reply to this post by sergio_101-2
2011/12/4 sergio_101 <[hidden email]>:
>>
>> What do you mean with "speed of the WM"? Just the rendering speed?
>>
>
> by speed, i mean the time from asking for a queried subset of results,
> and getting the results..

Compared to what?

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: speed of VM vs. speed of database

sebastianconcept@gmail.co
In reply to this post by sergio_101-2
yeah, me too, Cincom has done a fantastic VM but is too enterprisey for me

I'm using Pharo 


o/


On Dec 3, 2011, at 11:16 PM, sergio_101 wrote:

Proper use of Gemstone, omnibase or even a modest index persisted in the
image (a facade to a BTree or something like that) will satisfy quite high
expectations.


hey, sebastian..

just out of curiosity, which smalltalk are you using?

cincom looks fun, but i don't want to get involved in something i
can't directly get the price on..

thanks!



--
----
peace,
sergio
photographer, journalist, visionary

http://www.CodingForHire.com
http://www.coffee-black.com
http://www.painlessfrugality.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside





_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: speed of VM vs. speed of database

Chris Muller-3
In reply to this post by sergio_101-2
Work done straight with the VM will be at least 100X faster compared
to the "same" work done with a database.  To "read" a collection in
the VM (e.g., #do:), just a few bytecodes are executed.  But to do
that with objects in a database means it has to convert the objects in
the database into Smalltalk objects first.  This conversion requires
the execution of thousands of additional bytecodes.

But databases are still useful for the features they provide that
images don't, such has having large models that exceed the size of
memory, or letting multiple users access and update a model at the
same time, or high-availability and consistency, etc.

On Sat, Dec 3, 2011 at 11:56 AM, sergio_101 <[hidden email]> wrote:

> i am currently developing an app just for fun..
>
> during my day job, i am a developer using a web framework that
> directly connects to a database (mysql)..
>
> one of the things we always do is craft our queries to use use the
> database only for all queries and selections. when you use the
> database for anything other than trivial queries, the difference is
> the speed of the query is totally evident..
>
>
> i am just wondering how the speed of the smalltalk VM compares to the
> speed of pulling results from a database and shoving them into an
> array..
>
> thanks!
>
> --
> ----
> peace,
> sergio
> photographer, journalist, visionary
>
> http://www.CodingForHire.com
> http://www.coffee-black.com
> http://www.painlessfrugality.com
> http://www.twitter.com/sergio_101
> http://www.facebook.com/sergio101
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: speed of VM vs. speed of database

Boris Popov, DeepCove Labs (SNN)
The whole subject is like asking if a car goes faster with a trailer attached. Of course not, but it is often needed anyway.

-Boris

On 2011-12-04, at 12:29, "Chris Muller" <[hidden email]> wrote:

> Work done straight with the VM will be at least 100X faster compared
> to the "same" work done with a database.  To "read" a collection in
> the VM (e.g., #do:), just a few bytecodes are executed.  But to do
> that with objects in a database means it has to convert the objects in
> the database into Smalltalk objects first.  This conversion requires
> the execution of thousands of additional bytecodes.
>
> But databases are still useful for the features they provide that
> images don't, such has having large models that exceed the size of
> memory, or letting multiple users access and update a model at the
> same time, or high-availability and consistency, etc.
>
> On Sat, Dec 3, 2011 at 11:56 AM, sergio_101 <[hidden email]> wrote:
>> i am currently developing an app just for fun..
>>
>> during my day job, i am a developer using a web framework that
>> directly connects to a database (mysql)..
>>
>> one of the things we always do is craft our queries to use use the
>> database only for all queries and selections. when you use the
>> database for anything other than trivial queries, the difference is
>> the speed of the query is totally evident..
>>
>>
>> i am just wondering how the speed of the smalltalk VM compares to the
>> speed of pulling results from a database and shoving them into an
>> array..
>>
>> thanks!
>>
>> --
>> ----
>> peace,
>> sergio
>> photographer, journalist, visionary
>>
>> http://www.CodingForHire.com
>> http://www.coffee-black.com
>> http://www.painlessfrugality.com
>> http://www.twitter.com/sergio_101
>> http://www.facebook.com/sergio101
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: speed of VM vs. speed of database

Chris Muller-3
In reply to this post by sebastianconcept@gmail.co
> Have in mind that, for performance, the only metric that really counts is
> the user experience.
>
> Maximize anything else and you'll be heading to a non human centered
> artifact, faster.

Utility matters more than raw speed.  Applications that provide high
functional-density even at the cost of some raw "speed" before
returning control to the user provide a better user-experience than
hyperspace-speed apps.

Take a simple example.  Say I want to know why an object is not being
GC'd.  Compare the "speed" of explore pointers vs. chase pointers.
Explore pointers "performs" better in terms of getting back some kind
of response, but chase pointers gets me to the REAL answer I'm looking
for much faster.  The machine does all the work while I was taking a
sip of hot coffee, instead of me clicking around while my coffee gets
cold.

Now, I know some folks use computers as if they've already had two
cups of coffee.  They click around very fast but with lots of
misclicks, and lurching back and forth through a high-speed system but
which provides a very low functional-density.  The user often ends up
talking to themself (perhaps to keep their train of thought, "oops, I
didn't want to click that...  this is what I want..."), and so train
of thought about what they're doing is somewhat broken.

When using a system, ask yourself, how many gestures are solely for
manipulating the UI (e.g., maximizing, resizing) and how many are for
actually accessing/manipulating the domain?  For each of the former,
speed doesn't count -- in fact it counts negatively because its a
distraction from the users domain.  So, Interacting with software can
be as "slow" as interacting with another human and still be a great
experience.  e.g., 800-1000 ms response is "fast enough" as long as
the user feels the software is _doing_ useful things.

 - Chris
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: speed of VM vs. speed of database

sergio_101-2
thanks all for your input.. i think my concerns were unfounded.. i
just didn't want to spend time writing a bunch of test cases to figure
out the answer..

i am going to keep on my current trajectory..

thanks again!

--
----
peace,
sergio
photographer, journalist, visionary

http://www.CodingForHire.com
http://www.coffee-black.com
http://www.painlessfrugality.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside