Can I use bindable events on gui in roblox? - roblox

I'm trying to make a gui for phone users.If the player touches it, then it will run a script.My question is - Can I use Bindable Events to do this?

I'd recommend using RemoteEvents since BindableEvents don't communicate between the server and the client, as said in the official documentation for BindableEvent.
In this case, you want a script to execute once the client interacts with the GUI. RemoteEvents are helpful in this scenario since it communicates both with the server and the client.
You could also use RemoteFunctions to have two-way communication between the client and the server if you need the result from the server to the client.

Related

In socket.io, can the listener act as the emitter at the same time?

In my problem, I need to send some data from several devices to a centralized server. Then I need to view these received data in a UI from the centralized server.
I have sent data from a client to a server using socket.io methods and it worked. Now I want to send the data in the server to a UI. Can I use sockets for that? If so, is it possible and is it good to code in a way that server act as the listner and the emmiter at the same time? If this approach is not good, please provide your suggesions.

What type of protocol should be used to communicate with another computer?

I have a site and I want to allow users on that site to send information over to a second computer. That second computer would then take the information and make a physical robot do something.
The front end consists of an angularJS web app with a node.js server so that any device connected to the second computer can make the robot do something.
I'm struggling with what protocol to use in order to communicate with the second computer from the website. I tried using TCP but there were firewall issues and it doesn't seems hacky. I am thinking of either using REST or websockets but I am not sure which protocol is best suited for what I'm trying to do.
Thanks.

Distributing Netlogo commands using Hubnet Client?

Is there a way to allow for clients to run commands with hubnet?
I see a tag in a button, for example, which can send a message, but can the client dedicate some computational power?
No. The regular HubNet client doesn't do that; it's a thin client only.
It is possible to write your own custom HubNet client, that does anything you want; the server doesn't know the difference as long as the client sends the right messages. But you'd need to build such a client yourself. There's a repository on this theme at https://github.com/NetLogo/HubNetClients , but I see it hasn't been updated since 2011, so it might need tweaking to be usable in 2016.

Swift- how to retrieve messages in frequency from web service?

I am trying to develope chat app. I have done created my web service with php and mysql.
The respond of web service is json format.
In swift part; i post some paramaters to web address and retrieve json respond then show the messages. I used use nstimer to post and retrieve the respond of my json respond. And if there is new message the show it.
I dont want to use nstimer for retrieve the message. Is there any better way to do that?
Thank you
If you have a REST-ful service, periodically polling is pretty much the standard way to do it.
Instead of polling, you could consider using a real-time update mechanism to either deliver the message, or else inform your client that you need to sync with the server. Google has developed a pretty robust, cross-platform solution that allows you to achieve this using the Push Notification protocol:
Google GCM XMPP
Take a look at this tutorial. It uses XMPP to pass messages back and forward.
But if you want to do it yourself just to learn you have two options:
Use a restful api where you GET and POST. The timer you have isn't bad. I would recommend changing the time when the app is in the background or not doing it at all. You can use something like parse to send PUSH notifications and reinitiate the GET calls when the user relaunches the app.
You could use WebSockets. WebSockets work a lot like BSD sockets except that they are wrapped in a HTTP(S) tunnel. With web sockets, you can check to see if the client you are looking for is connected. If they are, you just send them the message. If they are not, you do something like in option one using parse to send them a notification.
Hope that helps.
Edit:
Since parse is shutting down, you can use another service like it. I've never used kinvey but it seems that they also provide similar services as parse like the push notification mentioned above

Asterisk 1.8 BLF Subscription for External Program

We're running Asterisk version 1.8.4.2 and I'm looking to create a server application that will allow several client programs to check on the "presence" of specific extensions, among other things. I understand that the AMI will allow me to poll this information, however I was hoping there might be a way to give the server an extension and subscribe it to the extensions in question to avoid having to poll the AMI constantly.
It seems like I might have to implement the SIP protocol into my server if BLF were the route I wanted to take. Is there a better and simpler solution that I've managed to overlook in my research?
You could implement these approaches:
AMI event hook and digging in incoming events
Make your application subscribing on notifies on extension status changes via SIP notifies
Make your asterisk publishing extensions status with XMPP