can i get your thoughts on my project: <https://gi...
# share-your-work
d
can i get your thoughts on my project: https://github.com/creact-labs/creact
j
A) From the readme I don't understand the problem you're trying to solve. B) If this is a cloud project, why the html/react syntax? It's not supposed to run in the browser right? I don't need an answer here, but it's a bit weird so I'd expect a rationale in the project description.
d
Hi Jouke, thanks so much for the feedback! The problem I'm trying to solve is pretty much the problem Vercel tries to solve, increase devEX, alonside making more dynamic architecture, did you the example application on the readme? imagine infra that could adjust, or better yet, imagine having reactive workflows think of it as "n8n" on steroids
with JSX syntax
the html/react syntax its a tool so that we can map dependencies, xml syntax allow for that
j
doesn't k8s do most of this already?
and my point is mostly that you're not supposed to try and convince people here, but in the docs 😉
d
got it
it's hard because I'm having a hard time defining it, its kinda of a paradigm shift in my vision
j
and people are busy, so before I try the example, I want to see a compelling problem it solves that I can relate to.
d
let me think, since you are here talking to me, which field do you work?
maybe I can give a practical example to see if it makes sense to you
j
cto typically
in web tech companies
d
do you know spot instances?
j
1
d
cheaper vm's based on demand
are you familiar with this concept?
j
1 = yes, 0 = no 😉
d
1
so, for instance, in this example, imagine that you have a microservice that always need to run, but it sudden peaks of demand what of the blue and most of the time its very little access
what if the infra itself could read the access patterns and adjust itself so the cost is lower?
thats the kinda of problem that my framework allows solving in a easy XML-friendly way with reusable components and a ecossystem that could grow to resemble what today we have on the react side
does that make sense?
j
how it works yes, why I would pick this over a k8s cluster that uses node pools with spot instances does not (yet)
kubernetes is the default at many organizations now, so if you think you have something that goes beyond what k8s can do, I'd at least explain in the docs how this is better 🙂
d
the main difference that K8s scaling in policy based, CReact scaling (or any other reactive behaviors) are state based
so that allows for more flexibility mean while keeping a familiar syntax
imagine the verticals owning everything?
that's possible withing the framework mindset
or even today where AI is on the forefront, this allows for a easier why to deploy an app (or even a "company") end to end, using only declarative modular syntax, very similar to react components
is it making sense so far?
the problem is that this kind of framework is kinda of a brand new category in my view, and I'm having hard problems getting the concept across, what exactly is and what it does
j
i can understand that
but in production systems, we care about simplicity and stability
so this is scary 😂
d
why do you think creact implies instability? what gives you that feel?
j
i don't understand where the scheduler runs, why it uses front-end syntax, what's happening under the hood, etc.
and everything new is scary
d
i will try to explain it working systems now
in simple concepts
pardon my english
j
in the FoC community it's great, experiments and stretching the limits of what's possible are the name of the game
d
imagine a company as a graph of nodes, these nodes are basically workflows (they execute a process and produce an output)
I call this graph of nodes the CloudDOM
doing a analogy with the HTML DOM model
but instead of HTML elements we have these units of action lets say
imagine that then the next state of the graph is determined by the outputs of the previous
thats an fair assumption to make
what I do is generate this CloudDOM model from the nested XML syntax, inferring its nodes from its structure
the "reactivity" comes when a node produces an output and that output doesn't change
so we have a 2 way binding that allows for the component to know the output have changed and react accordingly, and similar the workflow the produces the output has a way to trigger the reaction
is this making sense?
j
yes I am familiar with reactivity
d
there are a few key differences between the way reactivity works in React framework, compared to how it does on mine
j
I'm using Vue, which is also a bit different
d
its very different from UI Reactivity, in UI you expect thousands of cycles in a brief time, reactivity in a CReact app is very contained
not contained but lets say split, because in UI Programming you dont code the browser, so you dont have control on what makes it render
on CReact you code both ends
j
have you ever built a kubernetes operator?
d
what defines it?
j
it's a form of reactivity in custom resources in your kubernetes cluster. Desired state is expressed on high level descriptions (typically custom objects / CRDs), and the operator's job is to make that a reality by inspecting and manipulating the lower level resources.
d
thats exactly the kind of things CReact enables, but with the simplicity of React syntax and ecossystem support
also it enables for recursive deployment, CReact in theory deploy itself
which makes infra today a mere glance of what it could even be
j
Have to 💤 soon, but if you are going into infra/cloud territary, you have to show in the readme how you differ from k8s and how this is better than k8s operators. Saying "operators that work with familiar React syntax" might be an interesting pitch.
d
thats very helpful, do you have any reference for such operators?
j
just ask chatgpt, it can explain better than i can
d
thank you for the suggestion! I will def look into this
this is great feedback
j
i built one myself based on kopf and am using cnpg and a couple of others in production
d
I encourage you to play around with CReact just for fun if you have the chance, its fully functional (even lots of bugs I'm sure but the POC is totally functional)
with friendly cli
j
I'm afraid I have 0 time, was typing this while waiting for some CI runs and cloud deployments 🙈 anyway, it's interesting, good luck 🙂
d
I totally understand, thank you so much for the attention
if you ever get the chance, let me know how it it turns out
t
Hey interesting ideas. I really want to build adaptive predictive scaling into my production system, I think the dollars saved could be huge for us, tuning things like "provisioned concurrency" and "batch sizes" based on signals such as the traffic pattern of the last week, or the lambda memory consumptions. So
Copy code
const [errorRate, setErrorRate] = useState(0);
be a reference to a metric stream? Then the template re-renders on metric updates. I also think this loop is too small to be useful. The problem I face is decreasing lambda memory usages affects other scaling parameters, so if you have a bunch of small self-adaptive feedback loops together they form chaos. So I had a mental model of pull tons of signals to one global optimizer, and setting multiple parameters based on a model of the system I have. The interesting things to tune IMHO for me, is domain parameters not considered by infra providers. Application configuration, also resource allocation, but it should all be driven by Cloud metrics (e.g. CloudWatch). Cool ideas!
m
simplicity of React syntax
:)) sorry
d
@Tom Larkworthy thank you for feedback, I believe your use case should be totally possible within CReact framework, I would be happy to spin up a demo tackling this use case if you would be willing to check it out later
t
Probably will not use it but a metric driven Cloud App optimizer is very interesting to me and I would check it out. The starter template looks more like Terraform than something that runs live from metrics so I am not sure how you would handle that effectively.