I’m engaged on an internet software as a interest and attempting to be taught some ideas associated to cloud improvement and distributed purposes. I’m presently focusing on an AWS EC2 occasion as a deployment atmosphere, and whereas I do not presently have plans to deploy the identical occasion of my API software to many servers, I want to design my software so that’s attainable sooner or later.
I’ve a search operation that I presently have carried out utilizing a Trie. I’m pondering that it will be sluggish to rebuild the trie each time I have to carry out the search operation, so I want to maintain it in reminiscence and insert into it because the search area grows. I do know that if I solely wished to have one server, I might simply implement the trie construction as a singleton and dependency inject it. If I do that in a probably distributed software, although, I’d be opening myself as much as knowledge consistency points.
My thought was to implement the trie in one other service and deploy it individually and make requests to it (this seems like micro service ideas, however I’ve no expertise with these). Is that this frequent observe? Is there a greater answer for sustaining persistent knowledge constructions on this means?