You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used system-toolbox-* in our online service in past 2 years, thanks for your hard work, your libs are excellent.
But recently I met a little trouble of system-toolbox, please see the background of problem as below:
I have a component, which will create some external resources in state-fn.
this component has a shutdown-fn as well for closing those external resources when restart the switchboard.
and then new external resources will be created in init phase.
what I expected is: when the handler of new component receives an event, I can get new resources from current-state.
but the actual result is: I get old closed resources now.
I have to make a workaround: use @(:cmp-state state) to get the new real current-state of new component
these are the timelines when I reproduce this issue.
Do you have any suggestion better than my workaround in this scene?
Or you may design a mechanism/option to allow the component to controll if they want to reserve the old state or not.
Please keep alive meo and system-toolbox-*, I believe they have many fans. :-)
Thanks a lot
Huabin Zhang
The text was updated successfully, but these errors were encountered:
Hey Huabin,
Great to hear from you and thanks a lot for the feedback. There is an option for not reloading a component but just rewiring the existing one upon system reload. But that could be more fine grained.
I’m on my lunch break so I can’t say exactly what the option was, I think :reload false.
I’ll have a look after work and get back to you with a more detailed response. What is your service doing?
Have a great day,
Matthias
On 11. Oct 2018, at 13:33, Huabin Zhang ***@***.***> wrote:
Hi, Matthias:
I used system-toolbox-* in our online service in past 2 years, thanks for your hard work, your libs are excellent.
But recently I met a little trouble of system-toolbox, please see the background of problem as below:
I have a component, which will create some external resources in state-fn.
this component has a shutdown-fn as well for closing those external resources when restart the switchboard.
and then new external resources will be created in init phase.
what I expected is: when the handler of new component receives an event, I can get new resources from current-state.
but the actual result is: I get old closed ones now.
I have to make a workaround: use @(:cmp-state state) to get the new real current-state of new component
these are the timelines when I reproduce this issue.
Do you have any suggestion better than my workaround in this scene?
Or you may design a mechanism/option to allow the component to controll if they want to reserve the old state or not.
Please keep alive meo and system-toolbox-*, I believe they have many fans. :-)
Thanks a lot
Huabin Zhang
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
I apply the Clojure/Script and system-toolkit-* in our two groups of services:
A deCAPTCHA service cluster, I define different algorithm as async component, and an individual component for message routing, the cluster is for load-balancing.
A whole web app of our internal OA system. For frontend, I refer to your meo project(websocket, reactjs, spa, etc). I use shadow-cljs for building, you may have a try, which is cool.
I knew that :reload option and I have tried, it worked but if we say we must close some resources during the restarting flow, that means we have to realize shutdown fn and enable :reload, that will cause the above problem.
Hi, Matthias:
I used system-toolbox-* in our online service in past 2 years, thanks for your hard work, your libs are excellent.
But recently I met a little trouble of system-toolbox, please see the background of problem as below:
state-fn
.shutdown-fn
as well for closing those external resources when restart the switchboard.init
phase.current-state
.@(:cmp-state state)
to get the new realcurrent-state
of new componentDo you have any suggestion better than my workaround in this scene?
Or you may design a mechanism/option to allow the component to controll if they want to reserve the old state or not.
Please keep alive meo and system-toolbox-*, I believe they have many fans. :-)
Thanks a lot
Huabin Zhang
The text was updated successfully, but these errors were encountered: