-
Notifications
You must be signed in to change notification settings - Fork 29
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
Could ONCRPC4J be embedded in an existing server? #4
Comments
Hi, thanks for your interest in oncrps4j. Tigran. |
Thanks for the quick reply. Here is our class that connects a channel in our MUX with the ONCRPC server using the MUX channel streams. The MUX can be descibed as wrapper around a socket that can talk different procols by opening different channels in the MUX and still talking through the same socket. public class MuxRPCConnector implements MuxChannelConnector {
} The MUX is our own code so we could possibly change that to communicate in an asynchronous way. We are using a really old version of Remote Tea (1.0.0), which is not in maven central. And when I asked the author he didn't have the source code any more. org.acplt.oncrpc oncrpc 1.0.0/Oscar |
Wow! Let look at it from a different point of view: If you need the RPC, then what you application expects Tigran. |
Yes, the MUX is a custom built binary protocol that enables tunneling of different protocols in the same socket. I've tried to explain it better in this picture: http://webwhiteboard.com/export/ucd3bgwqqyzd.png To not loose backward compatibility we need to stick to ONC RPC. |
It is still not clear to me. Is MUX a RPC based protocol or it uses some other mechanism from org.acplt.oncrpc to simulate stream? |
You can think of the MUX almost as a VPN tunnel (or an SSH tunnel). Just like you get streams from a network socket (the old I/O api in Java) we get streams from a MUX channel. The mux is our own binary protcol to achieve this tunneling. So yes it is another mechanism to simulate streams. And thus we are not using the network transport part of ONC RPC. Our main purpose for looking at another ONC RPC implementation than the one we use today is to have a more scalable solution and to avoid one thread per connection to be created in the RPC server. We can also change the server (java) side of the MUX channels to use non blocking I/O instead of streams. |
Now I am completely confused. I got the point with the tunneling. MUX provides a virtual stream and you need a RPC calls to utilize it. In other words, you need RPC to use stream provided by MUX as a transport. Is it correct? |
Sorry to confuse you :-). Yes you are correct. The MUX is the transport. So what do you think, would it be possible to use ONCRPC4J with another transport than TCP or UDP either by regular java streams or some non blocking I/O mechanism? |
Ok. It should be not too difficult to add it. I will thick a bit about it and will let you know. Thanks, |
Hello. In my project (Electronic Access Control) we are looking to replace an old ONCRPC implementation in the server with something new. But we still need ONCRPC to be compatible with existing door controller hardware. Our old implementation has the feature to embed the ONCRPC server in an existing server by creating the ONCRPC server with an input- and an output stream. Our solution is built that way because we have several protocols talking on the same server port.
So my question is can ONCRPC4J be embedded some way? Prefferably using asynchronous channels.
Regards, Oscar Lantz
The text was updated successfully, but these errors were encountered: