Groovy. Was: Lazy loadable controllers - improving startup time

7 views
Skip to first unread message

Doug Hughes

unread,
May 19, 2009, 9:11:04 AM5/19/09
to model...@googlegroups.com
I would tend to say yes, it's that hot.  But, with that in mind, it has a steep learning curve, much like getting started with OO to begin with.  But you don't have the object penalty you have in CF. 

The way I've been working towards using Groovy has been to create a Groovy project in which has no web-related features.  It's just a collection of classes wrapped up in service objects.  I can then build this into a JAR which I can deploy into my CF server. 

The main challenge here is the notion that most JEE applications are really just ONE application and CF makes it possible to sorta fake more than one.  So, with your JEE application you have to set up your Spring application context (assuming you're using spring, and you should!) and that's per ONE application.

In general, there's a LOT to learn and that's the biggest drawback.

Doug Hughes, President
Alagad Inc.
dhu...@alagad.com
888 Alagad4 (x300)
Office: 919-550-0755
Fax: 888-248-7836


On Tue, May 19, 2009 at 9:05 AM, James Allen <sling...@googlemail.com> wrote:

Hi Doug,

 

I keep hearing about this Groovy but have yet to look into it as I’m not sure it would be my cup of tea. Is it really as hot as it sounds and can it be used to replace the CF model or would you just replace certain services with it?

 

---

James Allen

E: sling...@googlemail.com

 

From: model...@googlegroups.com [mailto:model...@googlegroups.com] On Behalf Of Doug Hughes
Sent: 19 May 2009 13:59
To: model...@googlegroups.com
Subject: [Model-Glue] Re: Lazy loadable controllers - improving startup time

 

One other point to add to this, MG is fairly light.  I'll bet that a lot of the extra time you may be seeing actually comes from CS-configured services or other objects being instantiated in the controller.  In the case of CS, if you have a lot of inter-dependent services (and what large app doesn't?), then there's not much you can do about that.  That's part of why we've been looking into Groovy so seriously at Alagad.

Doug Hughes, President
Alagad Inc.
dhu...@alagad.com
888 Alagad4 (x300)
Office: 919-550-0755
Fax: 888-248-7836

On Tue, May 19, 2009 at 8:51 AM, Dan Wilson <sipa...@gmail.com> wrote:

To Doug's point, I haven't chimed in before now because I wanted to see where the conversation went. I'm pretty sure that I could implement a controller selective reloading scheme, but I don't think it would be very useful to reduce start-up times. See my previous email if anyone disagrees with me...

 

I'd be willing to consider other methods on how to reduce start up time, but it would need to actually do more than save a single createobject() call.

 

 

DW

 

 

On Tue, May 19, 2009 at 8:45 AM, Doug Hughes <dhu...@alagad.com> wrote:

I've noticed that Dan hasn't chimed in on this.... and I suspect I know why.  This sort of change is likely to be a pain.  (With that said, it's been about a month since I've last looked at this code.  MG is now used to load itself and so there are phases which the framework goes through when loading.  One of these is the phase in which controllers are loaded.  Also, I've looked at ways to selectively reload controllers (in mg2) instead of the entire application and this was not practical.  My point in mentioning this is that these changes may not be highest on the list due to the difficulty and practicalities involved.


Doug Hughes, President
Alagad Inc.
dhu...@alagad.com
888 Alagad4 (x300)
Office: 919-550-0755
Fax: 888-248-7836



On Tue, May 19, 2009 at 8:41 AM, Bob Silverberg <bob.sil...@gmail.com> wrote:


I tend to agree with Chris, that I'd prefer to know that there would
be a single hit on application startup, rather than intermittent
unpredictable hits, but I can also see the value in allowing a
developer to implement lazy loading if that's what they choose to do.

I'm wondering how valuable this would be, though.  Before deciding to
devote development resources to something like this it would be nice
to see some metrics on what sort of gains would be possible. How much
of the loading time is general model-glue stuff, and how much is
per-controller? I humbly suggest that anyone interested in this
feature do some testing and generate some numbers showing the
difference in load times between a full "all-controller" load and a
load that initializes fewer controllers. Those numbers might be
enlightening.

Cheers,
Bob



On Mon, May 18, 2009 at 6:47 AM, Chris Peterson <overr...@gmail.com> wrote:
>

> I trying to decide if I like that idea.  I know MG has a load cost
> initially, but so far I have been able to work that into my app, and its
> expected to happen at one time (the beginning), so I can account for that.
> I'm not sure I like the idea of moving that load out somewhere  that I have
> no control over when it happens, seems like users would then see seemingly
> random pauses in the app, rather than just loading them all at the
> beginning.
>
> Just my $.02
>
> Chris Peterson
>

--
Bob Silverberg
www.silverwareconsulting.com

 






--

“Come to the edge, he said. They said: We are afraid. Come to the edge, he said. They came. He pushed them and they flew.”

Guillaume Apollinaire quotes

 






James Allen

unread,
May 19, 2009, 10:15:32 AM5/19/09
to model...@googlegroups.com
Yikes, yes it is.. Getting into JAR deployments and Spring does sound slightly complex to say the least. Though it is something I could perhaps get into down the line if the big .com we are launching in August takes off.. I can see performance being a major element as the site grows.

I thought I was ahead by using MG, Coldspring and Transfer.. lol.

Always room to grow though.. Might look like too big a step now but in future, who knows....

Like your approach of building the project without any web-related features. Makes sense.

2009/5/19 Doug Hughes <dhu...@alagad.com>

Doug Hughes

unread,
May 19, 2009, 10:22:48 AM5/19/09
to model...@googlegroups.com
Warning, Sales Pitch coming:

We have one of the leading experts on CF and Groovy integration on staff here at Alagad.  One of our favorite types of projects are the ones where we combine teams with our clients and lead a project on technology that's new to our clients.  We help them learn how to get setup, learn the new technology, and guide the project.  By the time we're off the client should have a solid understanding of the new technology and the ability to move forward. 

So, if you have a large .com project and want to implement Groovy + Spring + Hibernate, please contact us and we can talk about how we can work together on that project.


Doug Hughes, President
Alagad Inc.
dhu...@alagad.com
888 Alagad4 (x300)
Office: 919-550-0755
Fax: 888-248-7836


James Allen

unread,
May 19, 2009, 10:33:29 AM5/19/09
to model...@googlegroups.com

Heh.. I’ve already got you guys down on the server tuning expert list after we had a similar discussion on the list last year. J

Reply all
Reply to author
Forward
0 new messages