Thursday, July 10, 2014

Application routing, message busing and the irritating impossibility of programs as graphs

I had a hard time writing that title. What I want to write about is a simple thing, but somehow it is quite hard to express.

But to begin, I think that many programmers, like me, have a dream to some day do some or all of the following;

1) A multi-user d&d inspired game
2) A WYSIWYG web widget editor that 'just works' and create websites that can be generated in any of n languages or frameworks
3) Some kind of 'mini-SOA' framework where the program is broken down into parts which are wired up with some kind of bus system.


These things usually crash and crash and crash again, again and again. I keep trying, keep crashing and even though I realize what I want to do is still a laughably long way beyond my skill level, it's still something that I strive to achieve.

A couple of years age, thinking on one of these things, the application-routing, mini-SOA or, to call it by it's wiki-official name, dataflow programming framework (http://en.wikipedia.org/wiki/Dataflow_programming), I realized that it was practically impossible to create what I wanted.

It might seem obvious to anyone else, but what I realized then was that if you wire up your application like a kind of graph, how do you define connections between dynamically created objects?

Well, you can't, of course, or at least you have to break the circuit model, using some kind of API to programatically create connections, incidentally defeating the whole purpose of the framework.

So dataflow wiring would only work for programs made up of singletons, which was a bother and made me retreat from further experimenting. Until yesterday.

Again, this is probably super-obvious for anyone but me, but I just wanted to share my epiphany on why it's actually feasibly an indeed a very, very good idea to use dataflow abstractions for programs that create non-model objects dynamically (which most tend to do).

What I realized was that in an UI (for example) there can be many levels of multiple objects created in hierarchies, but for every level, all objects can be treated as singletons, thus simple to wire up with a dataflow template.

If one of these objects create a dynamic list of other objects, each of those objects will define a new 'level' or island, if you will, where all the relations can be wired up again using dataflow. So we have stable islands of instance relations, where one or more can create more islands, with implicit connections to them.



One of my favourite dataflow architectures has been JDA (JavaScript Dataflow Architecture) which recently has re-emerged as construtcibl.es (http://docs.constructibl.es/specs/js/). I think what I'll do now is have a drink, look over JDA/constructibl.es again and see how it can be applied to Polymer, because Polymer.

5 comments:

Michel said...

I enjoyed reading your post.. its really nice

web designing company in indore

maya baidya said...

nice post to learn from... thanks for sharing

mobile application development in indore

oakleyses said...

michael kors, nike roshe, michael kors pas cher, nike free pas cher, polo ralph lauren, nike blazer, sac burberry, air jordan, hollister, longchamp, nike trainers, nike roshe run, vanessa bruno, vans pas cher, north face, timberland, louis vuitton, longchamp, sac longchamp, oakley pas cher, ray ban sunglasses, hollister, michael kors, ray ban pas cher, polo lacoste, nike huarache, barbour, new balance pas cher, sac louis vuitton, sac hermes, nike roshe run, vans shoes, sac guess, mulberry, nike free, mac cosmetics, abercrombie and fitch, lululemon, louboutin, air max, air force, louis vuitton uk, hogan outlet, converse pas cher, north face, nike tn, ralph lauren, hollister, sac louis vuitton, nike air max

oakleyses said...

hollister clothing store, north face outlet, valentino shoes, air max, soccer jerseys, lululemon outlet, abercrombie and fitch, uggs outlet, moncler, moncler, nfl jerseys, jimmy choo outlet, new balance shoes, celine handbags, giuseppe zanotti, rolex watches, chi flat iron, ugg pas cher, mont blanc, herve leger, canada goose jackets, wedding dresses, canada goose, canada goose, moncler, bottega veneta, canada goose uk, babyliss pro, mcm handbags, baseball bats, ghd, ferragamo shoes, ugg australia, soccer shoes, canada goose, p90x, birkin bag, canada goose outlet, ugg boots, instyler, ugg, beats by dre, ugg boots, asics running shoes, north face jackets, iphone 6 cases, moncler outlet, reebok outlet, marc jacobs, insanity workout

oakleyses said...

tiffany and co, polo ralph lauren outlet, louboutin shoes, louis vuitton outlet, louboutin outlet, kate spade handbags, air max, michael kors outlet, polo ralph lauren outlet, louis vuitton outlet stores, nike shoes, louboutin, michael kors outlet, oakley sunglasses cheap, longchamp handbags, chanel handbags, kate spade outlet, michael kors outlet, true religion jeans, oakley sunglasses, louis vuitton, coach factory outlet, michael kors outlet, nike free, christian louboutin shoes, prada outlet, michael kors outlet, burberry outlet, tiffany and co, coach purses, burberry outlet, true religion jeans, ray ban sunglasses, prada handbags, michael kors outlet, coach outlet store online, louis vuitton handbags, tory burch outlet, air max, gucci outlet, jordan shoes, longchamp outlet, louis vuitton outlet, coach outlet, ray ban sunglasses, oakley sunglasses, longchamp handbags