I am involved in an heterogeneous system and we use ICE(Zeroc) for component's communication. Unfortunately the system seems to be efficient critical and we need to do some investigate to estimate whether ICE could satisfy our requirement.
Firstly, I want to know for TCP proxy, when a connection should be established? I've read the ICE manual roughly and seems no such information to answer my question. So I think the best idea for me is to fall into the depth of ICE source code to find the answer but this is embarrassed to me at the researching stage. Because I'm not familiar to the ICE code so I cannot teach my self to find something I want quickly. So I go to the ICE forum and I want to find something such as the ICE architecture diagram or class diagram. But my ICE account has no privilege to ask even a simplest question.
And I also ask for your help for, do you have any ICE document for coding implementation?
There is a quite complete manual, see for connection establishment:
http://doc.zeroc.com/display/Ice/Connection+Establishment
Related
I am converting an old tcp only server to use SSL (via IBM's GSkit), and one of the problems is getting the SSL handle into the spawned program. The original code passes the raw socket in via calls to the givedescriptor() and then uses takedescriptor() to get and then use the passed in socket.
Is there a GSKit/SSL equivalent of the give/take descripter methods?
givedescriptor() API documentation
UPDATE:
The issue is that the socket and the SSLHandle are created in one process, which initialized the SSL environment, and then need to be passed on to another process entirely - hence the need to give/take descriptor, as the socket / SSLHandle need to 'given' to the new process (it is actually an RPG program that is submitted and runs independently from the original program).
UPDATE 2:
Looks similar to this question, so I'll have a read of that as well.
From the other article (which doesn't have a code based answer, but a written solution)
"It looks like the session handles are just pointers to some storage
in heap. Due to the design of Single Level Store, you could copy them
via shared memory (memmap, shmget/shmat, ...). You just have to ensure
that the process that opened the GSK environment doesn't die or the
activation group will get cleaned up and those pointers will become
invalid. You also will probably need to put a mutex or some other
locking primitive around them if you're going to have multiple threads
accessing the shared data structure."
UPDATE 3:
This is the example I am using to share the memory between processes - Example: Using semaphore set and shared memory functions, still not exactly solved the issue yet though.
UPDATE 4:
I thought I'd add more details of why I need to ask the question. I am changing a non-blocking TCP server that is used as a connection point to an IBM i. It has the 'standard' mechanism for handling connections as they come it, creating threads and negotiating the connections in these threads. The threads then create independent process (via sbmjob). In the vanilla TCP version we can then give the running job the handle of the socket via the give/takedescriptor function, and will merrily write to and from the socket.
So I need an equivalent way of getting the independently running program to be able to write to SSL.
It maybe that this is not possible with the current mechanism.
There is no such thing as an 'SSL handle' known to the operating system and inheritable by child processes or transferable to other processes. The 'SSL handle' will inevitably be a pointer into some opaque data structure in the originating process, as SSL is an application layer protocol, and therefore implemented in the process, not in the kernel. So you can't 'give' an 'SSL handle' to another process and expect it to work.
EDIT
The answers here don't really answer the underlying question, which how I should do this, so although the bounty has been awarded, I can't accept the only answer.
The answer is that you can't do it.
It maybe that this is not possible with the current mechanism.
Correct. As you've foreseen this possiblity in your question, it is difficult to understand why you can't accept it in an answer.
In principle your idea is not impossible! If you believe that is possible try to find the answer!
If all answerer from the SO will say that is impossible it is not all time the true!
For example: 15 years ago I had tried to find the answer how can I write an Java-applet which can write and read images on a server.
Everybody had said to me that is impossible, but I did not believed it. I
tried to find my answer again and again. And I had found the answer: I
disassembled one online apllet from one specialist and in the source
code I find my answer: using PHP server we can do it. I asked the
owner from this applet about details of communication between
Java-applet and PHP server and he has helped me.
You have to find your specialist. That is the first rule to find the correct answer. May be on the IBM forum you will find someone.
The second rule is to read a lot of books from specialist about this. Not only one book. May be three of them or more.
I would recommend you also to read How do I ask a good question?, because in your question you do not have any computer language. And I think we have on SO someone specialist which could give you the correct answer.
The first rule on SO for finding of correct specialist is to set the correct tags. Without correct tags only few people see your question and it is only question of luck that somebody from them is the correct specialist for you.
Be optimistic and try to believe in you! Good luck and success!
I have developed a WebRTC based sample, but I face problems like ICE Failed often, and then the entire app becomes unstable, how/what can I do to recover from this failure? AFAIK this is not related to code(at least I think so) still, if you need my code I can post it here. Further more I have gone through this question and google groups email but I didn't get much of it. Can anyone please explain this.
you need to do an ICE restart. There is a canonical sample for that available here
Just read this article, which made me curious to know about the benefits in terms of speeding up the negotiation phase. I'm developing an application, where I'm using a third-party util that makes use of ICE-only, but eventually will upgrade to trickle ICE in the next version. The upgrade would require quite some code refactoring, so I would like you to share any experiences/benchmarks on this subject.
The negotiation part will get a huge speed boost using Trickle ICE. Practically it is the time since the first viable ICE candidate was found until all the ICE candidates were found.
I want to learn more about sending and receiving packets with Obj C. I want to learn more about packet IDs and types. Any ideas on some easy tutorials apart from the Apple Documentation?
Thanks guys!
Note: I do have basic knowlage of how to send packets. But I need to learn more about types and IDs. At the moment Im failing to make a login with login.minecraft.net.
Holy layer violation, batman!
I think what you really want to learn about is HTTP communication under iOS, not TCP/IP packets. In this day and age, there is no reason to dip down to TCP/UDP unless you are inventing a new protocol. For every protocol that exists with any popularity, there is a library that encapsulates it.
In this case, it looks like Minecraft is built on HTTP. Which is no surprise; unless your game needs realtime interaction, HTTP is a ubiquitous protocol that routes through anything.
Thus, I'd suggest you start with one of the HTTP programming guides.
Is there a "smart" UDP protocol analyzer that can help me reverse engineer a message based protocol?
I'm using Wireshark to do the sniffing, but if there's a tool that can detect regularities in the protocol (repeated strings, bits of the protocol that are CRC/Checksum or length, ...) and aid the process that would help.
You are asking for a universal inference engine. The best way to try to recover the protocol (assuming you are in a jurisdiction that permits this) is to understand the underlying message transfer from the beginning of a session, and then trying to manually simulate the behaviour of each party through a sequence of ping-pong message trials. This way you develop an understanding of the message structures and their functioning.
Using the UDP frame boundaries is a good place to start looking for structure.
If you have no documentation, you will find that even if you gain a good understanding of the protocol, expect to be surprised many times during the project.
If you can, have your existing systems carry out exactly the scenario you need to use, and then simply replicate the same sequence with payload (and any checksum) changes only. This way you can possibly achieve the requirement without a comprehensive understanding of the protocol.
For an example of the effort in doing this you could look at a historical review of the Samba project at A bit of history and a bit of fun.