'new module' &c

Poster Content
nk4um Administrator
Posts: 158
December 15, 2009 15:07"Getting" NetKernel
Miles,

You are not alone!

It took me a while to "get" NetKernel. And, the honest truth is, I didn''t fully understand the fundamental ideas behind it until NetKernel 4. With NetKernel 3, I found too many corner cases for my taste. The good news is that NetKernel 4 delivers - it is an elegant, simple system with corner cases removed. I understand that you are "stuck" using NetKernel 3 for now. However, since you said you are willing to keep an open mind about it, if you venture to learn NetKernel 4, I think you''ll see how and why this abstraction works and can then apply it to your projects running on NetKernel 3. (I find that I write much better NetKernel 3 applications now that I''ve used NetKernel 4).

I have a proposal for you - I''m deep in the process of developing the training materials for NetKernel 4 - would you be willing to review this as I write it? If so, the benefit to you would be that you would see an early version of materials that does explain how it all works. The benefit for me would be that I would get feedback from someone in the real world who is frustrated and skeptical about the whole thing. If I can convince you through this material, then it may serve others well who attend the training.

I''ll send you a direct message with my email address. If you are interested, please contact me via email. I have one topic on "modules" in rough draft state that I can send you and I''m working on a rather large topic, "Spaces", that should be in rough draft state by the end of this week.

Interested?

I could use your feedback!

Thanks -- Randy
nk4um Moderator
Posts: 485
December 14, 2009 22:06
Oh Miles! I''m sorry you are being ordered to NetKernel against your will. A lot of people enjoy using it, even learning it in their spare time to attempt to get it introduced into their organization.

I don''t think anything I could say here is going to get you to change your mind. You sum it up in the first sentence of your last post "...so I''ve noticed ... that when new technology turns out to be useful, it is manifestly evident from the start". You''ve rationalized what you''ve read as "abstract confusion" and "buzzwords and gibberish" so I suspect anything I say will just re-enforce your world view.

If you can''t see anything in it yourself then maybe consider what other people see in it? You''re weren''t at findlaw last time we did some training. We are currently finalizing a new Netkernel training course. Would you like to get some drafts of that? Randy would welcome your cynical eye to weed any buzzwords or their like.

Cheers,
Tony
nk4um User
Posts: 24
December 14, 2009 19:42response
My background ... so I''ve noticed (having been using computers since 1973) that when new technology turns out to be useful, it is manifestly evident from the start, even when the initial result is not polished.  Examples: the Xerox Alto, the worldwide web, Unix, Perl, Java.

I have been ordered to use NK for the project I am now working on.  It is not my choice - I find that Tomcat is generally much more useful and supports more rapid development of reliable code.

With netkernel, I''ve been hearing promises and excuses for about 3 years now, and I''ve read a good amount of the documentation and philosophical justification, and I feel like I have given it a fair chance to prove itself. 

I have to say: I just don''t get it.  I don''t see anything that is truly revolutionary or beneficial.  Most of what I hear is a lot of abstract confusion.  I would describe the rhetoric as buzzwords and gibberish.

Maybe you can put it into straightforward terms that a simple-minded person such as myself can understand.  Or maybe there''s really nothing there, and the emperor really is naked.

I will persist in keeping an open mind.  I realize that maybe I''m wrong.  However, I will not change my mind until I see clear, verifiable evidence to the contrary of what I believe.  I think that''s reasonable.

Thanks,
  -= miles =-

nk4um Moderator
Posts: 485
December 14, 2009 11:59Good Feedback
Hi Miles,

Thank you for your feedback. You are blunt but that''s OK - many of the people who bounce off of NetKernel don''t tell us why. So I do appreciate you spending the time to let us know areas that you are struggling with and that need refinement. We''ll look at refining the new module wizard. I think your idea of providing recipes is a great idea too. We''ll be continuing to work on this tools and your input is definately appreciated.

Let me just give you a little background which I hope will explain, if not excuse, the rough edges you stumble against. The process of getting to where we are today with NetKernel has been long. The foundation of NetKernel is fundamentally different to the object oriented systems which are the norm in the enterprise software market. I don''t know what your background is so I don''t know if you realise just how many design decisions, prototypes and experiments and iterations go into creating something completely and radically different. We''re all pretty happy with the core of NetKernel and I think that is justified, we certainly get a lot of feedback from enthusiastic people. But because the foundation is different we''ve had to invest in developing all the layers on-top. NKF, libraries, orchestration languages, and lots of tools and technologies. Some of these haven''t had the refinement that we would like but that is a very concious compromise we have made. Heard of the mythical man month? We would never have been able to create a NetKernel with the integrity of design at the core with a large team. We''ve focused on building up the layers but needed to provide outer stuff too to help users. With this kind of stuff we knock it up quick and aim to provide iterations based on feedback both from our usage and our community.

We''ve helped a lot of projects into production with NetKernel and usually they are lead by somebody who is using NetKernel because of it''s unique foundation. They are prepared to put up with unpolished outer edges because they understand that the important part is right. It''s like a super car - many people would never drive one, regardless of expense, because they often lack the refinements such as an integrated sound system and air-con. However the driver knows that these are compromises that only add weight and detract from pure driving pleasure.

What I saying is that people who love NetKernel understand that the foundation is right and the compromises on top are incidental. People who trip up on every detail but don''t see the reason why everything has to change will hate NetKernel.

From a marketing perspective we need to get these outer layers polished. Because it does impede adoption - no doubt. But for those who buy into the concept, it doesn''t hold them back.

Cheers,

Tony
nk4um User
Posts: 24
December 11, 2009 21:47'new module' &c
So I''m trying out the ''new module'' wizard. 

The first thing I wonder is why the naming is different here than in the new module tutorial?  ie. in the tutorial it is recommended that if your module URN is urn:some:thing then the directory name should be project-modules/some.thing ; instead, the new module wizard goes by the name.

OK, fine.

(Another thing I have to wonder is why is it so stupid about slashes?  Meaning: if it don''t put the / at the end of a directory name in modules.xml. it complains that it can''t find the file named.  Why is it too dumb to notice that there''s a directory there by that name? 

The new module wizard is similarly lacking in intelligence - it fails for want of a slash, instead of just putting the slash at the end.  I suppose I must repent my non-slash-typing ways, by means of incoherent error messages.)

So now I create my new module with the wizard, like this:
----------------------------------
identifier: urn:com:findlaw:newmodule:test
name: test of new-module

source directory /var/shiva/nk/plain-4.0.1/modules/test_of_new_module
changed to: project-modules/test_of_new_module

external path: /test_of_new_module/ - It tells me the URL should be http://localhost:8080/test_of_new_module/
internal path: /resources/
------------------------------------
I create the module.  Now I try testing.... testing....

http://localhost:8080/test_of_new_module/example.gy :
Request Resolution Failure
SOURCE res:/test_of_new_module/example.gy as IBinaryStreamRepresentation


http://localhost:8080/test_of_new_module/service
same thing.

http://localhost:8080/test_of_new_module/service/example.gy
same thing

It doesn''t tell me where I''m supposed to look for the silly example.  So I look at modules.xml, and find this:


        <config>
                <!-- define a logical endpoint which is mapped to the Groovy runtime -->
                <endpoint>
                        <id>urn:com:findlaw:newmodule:test:ExampleEndpoint</id>
                        <name>Example Service</name>
                        <description>Example Groovy service generated by New Module Wizard</description>
                        <grammar>res:
                                <group name="service">/test_of_new_module/service</group>
                                /<group name="value">
<regex type="anything"/>
</group>
                        </grammar>
                        <request>
                                <identifier>active:groovy</identifier>
                                <argument name="operator">res:/resources/endpoints/example.gy</argument>
                                <!-- relay value argument through to Groovy -->
                                <argument method="as-string" name="value">arg:value</argument>
                        </request>
                </endpoint>
        </config>


Aside from the general ugliness of the indentation, I wonder, is the / after the first <group>....</group> an error?  Or is it supposed to be there?  How can I tell?  I look at the grammar page, and it is laid out so that in order to understand anything on the page, you first have to understand everything on the page.

At least when I followed the ''create module'' tutorial, I could get the endpoint to work.  It was not at all clear how to create a generalized endpoint (i.e. so I can create a *.groovy file and have it do the right thing, without creating an endpoint for each file, as the example demonstrates)



Now a general comment: I''m a longtime tomcat user (and before that enhydra).  Perhaps tomcat is less "advanced" than netkernel, but the thing is, you create a file called abc.html and go to the site, and you see it.  You create a file called abc.jsp and it executes the jsp code.  It''s coherent, simple, and clear.  Working examples are abundant.

Netkernel seems to provide all sorts of fancy abstractions I could care less about, but just getting a simple page to display seems inordinately painful.

I want to set it up so that it can see all my *.groovy files and execute/display them using groovy.  In Tomcat, this is a snap.  You just drop some XML in the config file, include the libraries, and you''re there.  The instructions are clear.

Netkernel offers many "advanced" abstractions, but at the expense of simple usability.  What that amounts to for me as a lot of wasted time trying to get basic things to work.

For starters, some simple, easy-to-find recipes would be a big help. And making the beginning example consistent with the ''create new module'' feature would also help.

MORAL:


It''s easy to come up with a complex solution.  What''s a challenge is to come up with a simple solution that works.

NK is clearly a complex solution.



[/i]