Fork me on GitHub
#clara
<
2017-06-26
>
misha10:06:59

greetings! Is using clara for sessions as small as single UI form – an overkill in context of mobile applications (e.g. React Native apps, where performance is more expensive than on desktop websites or backend)?

mikerod14:06:39

@misha It could be. Even if not for performance, it may just be too complex of a tool for the job. What sort of reasons were you thinking that it may be helpful for a single form?

mikerod14:06:50

I guess I wouldn’t think a form would have enough complex control flow

misha14:06:34

by form I mean registration/billing/etc. form (just to clarify)

misha14:06:59

forms can get pretty complex, with all the fetching, autosuggesting, autocompleting, validation, etc.

misha14:06:19

but what I am really after, is a way to manage lots of state, it can be as complex, as entire application state: think many dependent and independent widgets on the same screen, or even many screens, but with routing implemented with rules too, instead of having it as a standalone thing with its own tools and approaches.

mikerod15:06:46

@misha yeah, that sounds interesting. I don’t know on the performance concerns. I’m not sure I’ve heard of someone using Clara on mobile applications to have anything to go off of.

mikerod15:06:12

Also, precept seems to be using Clara in a somewhat similar way as you describe. However, I’m not sure it is handling routing.

mikerod15:06:06

The space/time complexity of Clara is going to be reliant on the number of rules, complexity of the join conditions within the rules, and the size of facts in working memory.

mikerod15:06:22

So you can get a pretty large range of performance characteristics depending on your use-case

mikerod15:06:08

The tendency of the rules network is to favor time over space. e.g. intermediate match state is saved to avoid recomputing values later. So a space vs time tradeoff.

mikerod15:06:46

If your working memory state isn’t prohibitively large though, the space may still be reasonable

misha15:06:48

I am yet to read into precept, but guys do not hesitate to call it framework, so I am being "careful" there :)

misha15:06:41

as far as mobile apps performance concerns go, I am worried about cpu speed at the moment, since I was forced to move datascript to a separate RN thread because of pull calls speed on a somewhat large db.

misha15:06:13

But I am looking at rule based systems™ from an application state management pov, which might be only few hundred kvs at most, I think

zylox17:06:51

EDIT: i need to read better

mikerod21:06:56

@misha well if cpu is your worry than at least Clara favors that over space usage

mikerod21:06:29

It’d be cool if you could try it out and report back with how it performs in this mobile case

mikerod21:06:51

Nothing stands out to me as being too prohibitive

misha21:06:14

@mikerod first, I need to start thinking in terms of rules, but as soon as will have something to show – I'll let you know.

mikerod22:06:26

sounds fun!