From neil.ellis at mangala.co.uk Wed Apr 2 00:18:44 2008 From: neil.ellis at mangala.co.uk (Neil Ellis) Date: Wed, 2 Apr 2008 00:18:44 +0100 Subject: [einstein-dev] Einstein update Message-ID: <6D67D221-5081-4258-8C30-C39544357C81@mangala.co.uk> Project Einstein Update ============== So work has continued on project:Einstein, I've been focussing on getting the key API interfaces correct, writing the parser and a simple set of implementations. The work is still sketchy and at present provides a good feel for what project:Einstein will be like but is far from usable yet. I'll start making these updates regular from now onwards, please make sure you are subscribed to dev at einstein.codecauldron.org There is a window over the next few months where ideas can really get melded into the whole language design, so if you have ideas then please speak now, email on the list and let's get some wicked features in. I know there are one or two language freaks out there, so if you are one then please throw your ideas in while we still can. There is a _lot_ already in the design of Einstein so I will try to make these updates more frequently to gradually allow all the features trickle out. PS: Keep an eye on http://einstein.codecauldron.org -------- So the major new design decisions have been: 1) To base the configuration not in XML but as a DSL, the host language is Deesel ( a Java variant which supports dialects, i.e. DSLs) - Deesel itself is a work in progress (but much further down the line than Einstein), it is now being developed alongside Einstein so that it is a good fit. 2) Support for operators, the Einstein DSL now supports operators of 5 types: i) Binary a+b ii) Unary ++a iii) Ternary a ? b : c iV) N-Nary a+b+c+d+e v) Operator Only (++) An example of operator logic is: Group group= einstein.asm :: { @pojoProfile; ++ (< "text:Goodbye World!"); ++ (< :::(helloWorldURL)); (--) > "std: Hello world:"; (??) > "std: Goodybye:"; ++ (< "text:1"); ++ (< "text:2"); ++ (< "text:3"); (~(>>=)) > "std: Testing ..." ; }; Which produces: Hello world: Hello World! Goodybye:Goodbye World! Testing ...[1, 2, 3] As output, if anyone is interested I'll walk through the operators used above :-) Don't be too scared by that example, each operator has a keyword sister to go with it, so ~ becomes merge. The option exists so the developer can choose which is the clearest way of expressing themselves. ------ Parallelism supporting language features: 1) The n-nary operators are designed for parallelism so for example: (< "jms://myqueue1") + (< "jms://myqueue1") + (< "jms://myqueue1") Would simultaneously retrieve messages from three queues (in parallel) and join the result together. The result would in itself be a form of Future and until the .realise() method is called on the message group might not actually contain realised messages but futures instead. 2) Independent blocks This is represented by [,] style syntax i.e.: [get "text:1", get "text:2"]; Each of the instructions will be executed independently and the results made available at the end as in 1) as a message group. ----- A working example: Example: import org.cauldron.einstein.api.assembly.group.Group; import org.cauldron.einstein.ri.core.instructions.context.*; import org.cauldron.einstein.ri.core.model.message.mock.*; import org.cauldron.einstein.ri.core.registry.scan.RegisterClasses; import org.cauldron.einstein.ri.core.model.data.object.*; import org.cauldron.einstein.ri.core.model.data.xml.dom.*; import org.cauldron.einstein.ri.core.model.message.mock.*; import org.cauldron.einstein.ri.core.runtime.*; pojo= new MockProfile(new ObjectGraphDataModel()); xml= new MockProfile(new XMLDOMDataModel()); runtime= new EinsteinStandaloneRuntime(); EinsteinRIRuntimeFactory.getInstance().setRuntime(runtime); feed= "camel:http://rss.news.yahoo.com/rss/topstories"; imaging= "java:org.cauldron.einstein.ri.examples.ImageMaker"; montage= "java:org.cauldron.einstein.ri.examples.MontageMaker"; splitByImageURL= "xpath://*[local-name()='content']/@url"; Group group= einstein.asm :: { @xml; while "bool:true" { (< :::(feed)); (split :::(splitByImageURL) { @pojo; > :::(imaging); }) > ::: (montage); }; }; InitializationContextImpl initContext= new InitializationContextImpl(); group.init(initContext); group.start(); group.execute(null, new MockMessage(null, null)); ---- All the best Neil -------------- next part -------------- An HTML attachment was scrubbed... URL: http://einstein.codecauldron.org/pipermail/dev/attachments/20080402/6da64e9e/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2431 bytes Desc: not available Url : http://einstein.codecauldron.org/pipermail/dev/attachments/20080402/6da64e9e/attachment-0001.bin From einstein at mangala-server.com Wed Apr 2 15:06:55 2008 From: einstein at mangala-server.com (einstein at mangala-server.com) Date: 2 Apr 2008 15:06:55 +0100 Subject: [einstein-dev] Welcome to Weekly(ish) Update at einstein.codecauldron.org Message-ID: Welcome to our newsletter! This email address has been added to the list of subscriptors of: Newsletter: Weekly(ish) Update Description: The almost-regular update on progress with project:Einstein. You can always cancel your subscription using: http://einstein.mangala-server.com/tw/tiki-newsletters.php?unsubscribe=2936247b8bf663b19eb8499b91779159 From einstein at mangala-server.com Wed Apr 2 15:12:00 2008 From: einstein at mangala-server.com (einstein at mangala-server.com) Date: 2 Apr 2008 15:12:00 +0100 Subject: [einstein-dev] Welcome to Weekly(ish) Update at einstein.codecauldron.org Message-ID: Welcome to our newsletter! This email address has been added to the list of subscriptors of: Newsletter: Weekly(ish) Update Description: The almost-regular update on progress with project:Einstein. You can always cancel your subscription using: http://einstein.mangala-server.com/tw/tiki-newsletters.php?unsubscribe=2936247b8bf663b19eb8499b91779159 From einstein at mangala-server.com Wed Apr 2 15:13:06 2008 From: einstein at mangala-server.com (einstein at mangala-server.com) Date: 2 Apr 2008 15:13:06 +0100 Subject: [einstein-dev] Welcome to Weekly(ish) Update at einstein.codecauldron.org Message-ID: Welcome to our newsletter! This email address has been added to the list of subscriptors of: Newsletter: Weekly(ish) Update Description: The almost-regular update on progress with project:Einstein. You can always cancel your subscription using: http://einstein.mangala-server.com/tw/tiki-newsletters.php?unsubscribe=2936247b8bf663b19eb8499b91779159 From susan.forshaw at ricston.com Wed Apr 2 14:48:07 2008 From: susan.forshaw at ricston.com (Susan Forshaw) Date: Wed, 02 Apr 2008 13:48:07 -0000 Subject: [einstein-dev] subscribe Message-ID: <006101c894c8$1b7d36a0$6502a8c0@SusanNB> Hi Neil/ Einstein, Can you please make sure I'm subscribed to your list. Cheers Susan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://einstein.codecauldron.org/pipermail/dev/attachments/20080402/6b26ac59/attachment.html From einstein at mangala-server.com Wed Apr 2 14:56:30 2008 From: einstein at mangala-server.com (einstein at mangala-server.com) Date: Wed, 02 Apr 2008 13:56:30 -0000 Subject: [einstein-dev] Newsletter subscription information at einstein.codecauldron.org Message-ID: Somebody or you tried to subscribe this email address at our site: einstein.codecauldron.org To the newsletter: Weekly(ish) Update Description: The almost-regular update on progress with project:Einstein. In order to confirm your subscription you must access the following URL: http://einstein.mangala-server.com/tw/tiki-newsletters.php?confirm_subscription=2936247b8bf663b19eb8499b91779159 From einstein at mangala-server.com Wed Apr 2 14:58:24 2008 From: einstein at mangala-server.com (einstein at mangala-server.com) Date: Wed, 02 Apr 2008 13:58:24 -0000 Subject: [einstein-dev] Welcome to Weekly(ish) Update at einstein.codecauldron.org Message-ID: Welcome to our newsletter! This email address has been added to the list of subscriptors of: Newsletter: Weekly(ish) Update Description: The almost-regular update on progress with project:Einstein. You can always cancel your subscription using: http://einstein.mangala-server.com/tw/tiki-newsletters.php?unsubscribe=2936247b8bf663b19eb8499b91779159