Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to get stored objects to call back to their originating client? #21

Open
munkinut opened this issue Jun 9, 2020 · 0 comments

Comments

@munkinut
Copy link

munkinut commented Jun 9, 2020

Hi all,

I have created a simple service call JBotNetService which at the moment stores and fetches JBot storage objects. JBot is an abstract representation of a JavaBot which is an IRC information service bot.

I want to be able to set a message on one JBot and for that JBot to propagate that message to all the others. I could simply set the message field on each of the JBots and then have all the originating JavaBots poll so see if the message has changed and to act on it. This is an approach I've seen and used in traditional Java RMI based client -server apps.

However, I want all the JavaBot's to act instantly when the message has been sent, so this polling idea is not good unless your polling interval is very short (in the order of milliseconds). This could be an issue if there are hundreds of JBots and put a lot of load on the system generally. Instead, can I have the JBot trigger an event on the originating JavaBot?

I have some ideas on this:

Could the JBot maintain an IO stream passed to it by the JavaBot in order to call back?

If not, could the JBot create its own IO stream back to the JavaBot, given an ip and port set in the JBot on creation?

Is there an easier and better way that is facilitated by las2peer?

Could the JBot be a Service that can talk to its originating JavaBot? - the JavaBot creates and registers the JBot service and that service talks back to the JavaBot. When JavaBot sends a message to the JBot service, that message gets propagated to all the other registered JBot services in the network?

Thanks in advance for thoughts and feedback on this.

Warren

@munkinut munkinut reopened this Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant