Hi, I did get this far indeed. My general question was rather: what's your general approach ?
Say I happen to have a config that loosely looks like: {:inputs [{:type :inputA ...} {:type :inputB ...}] :engine {:engine-opt1 :engine-arg1} :outputs [{:type :outputA ...} {:type :outputB ...}]} Would you directly assoc :inputA :inputB :outputA :outputB components in the first layer of the system map or would you retain a hierarchical structure and if so, are there any downsides to this ? Cheers, - pyr On 07/07/2015 07:07 PM, Stuart Sierra wrote: > Not sure if this helps, but remember that components and systems are > just records, and records behave like maps. You can construct an empty > `system-map` and then `assoc` components or even `merge` other maps into it. > > –S > > > On Tuesday, July 7, 2015 at 1:00:51 PM UTC-4, Pierre-Yves Ritschard wrote: > > Hi, > > I've been using an approximation of what component provides in my > applications for quite a while, and I'm trying to see if it's feasible > to move to component, in the sake of homogeneity with the rest of the > clojure world and to see if there are things that make my life easier. > > I have a couple of apps which expose a somewhat generic way of > manipulating data in a certain way. Most follow the pattern of having > several possible inputs (which must all adhere to a protocol), an > engine > that does its work and several possible outputs (again, adhering to a > protocol). > > While configuring each of these inputs or outputs as components is > straightforward, I failed to find a good strategy for storing them and > constructing the system-map correctly. > > Did anyone tackle this yet and if so are they willing to share their > approach ? > > Cheers, > - pyr > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to clojure+unsubscr...@googlegroups.com > <mailto:clojure+unsubscr...@googlegroups.com>. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.