I am new in JPOS. I need some help. Please find below my requirement.
In TCP connection terms, the IST Switch is configured to be a Server and the MPOS server is configured to be a Client. MPOS server and IST Switch should communicate via a single TCP connection. Also there should be provision to have multiple TCP connections between MPOS server and IST Switch for scalability, load-sharing and handling fail-over. Once established a TCP connection is maintained continuously.
I have gone through jpos developer guide and get to know QMUX can be used for my requirement. Request to you kindly help me on this.
I couldn't understand your question exactly but QMUX has nothing to do with load-balancing or with fail-over. QMUX get bind with only one Channel Adaptor
Let me tell you what QMUX does so we can clear the understanding of when QMUX would be usefull. For example you have a channel connected to a server and server supports concurrent requests(i.e. second request on the same tcp link while client is waiting for response of the first request). Now here comes a problem to relate requests-response pairs (because its quite possible that second response arrives even before the response of first request) this is what exactly QMUX does. mux part actually stands for multiplexer.
For laod-balancing or fail-over you can use org.jpos.q2.iso.MUXPool class following is a sample q2 xml descriptor
<?xml version="1.0" encoding="UTF-8"?>
<muxpool name="MuxPool" class="org.jpos.q2.iso.MUXPool" logger="Q2">
<muxes>MuxPrimary MuxSecondary</muxes>
<strategy>PRIMARY_SECONDARY</strategy>
</muxpool>
MuxPool provides two strategies primary-secondary or round-robin depends whether you are looking for fail-over or load-balancing.
If you think that I understood your question correctly and I am pointing you toward right direction let me know I may be able to share you one sample application using QMux and Muxpool on coming weekend.
Please take a look at chapter 8.3 of the jPOS Programmer's guide draft conveniently titled "QMUX" you can download here: http://jpos.org/doc/proguide-draft.pdf - You'll need also the companion service "ChannelAdaptor" described in section 8.1
Related
So I have a VPS (Cent Os 7) and using openvpn I created VPN having an address of 10.0.8.1 now on my front end I connected to VPN using openvpn after connecting I get access to websocket on 10.0.8.1 but its not secure I want access to wss on the same address. I have also tried using a secure domain name to connect but it still fails I can only connect it with either http or ws and not with https or wss
This is very trivial as far as a question but all in all, without telling you how to perform anything in details - the question is WWAAAYYY too broad to even consider answering without unevitably creating more questions than solving a problem or helping you.
You need to add cryptography to your websocket server, same as a web server is able to run in HTTPS mode rather than unencrypted. I'm sure you can see the similarity between both abreviations of the respective protocols and how they are different from their original, unencrypted/vulnerable default configuration.
http -> https
ws -> wss
Start reading on adding a SSL certificate to your websocket server config and then you will have a WSS connection - if all goes well of course!
I believe in you
p.s. - this is not the type of question that is very well received by the majority of the community. It is too broad to be of any interrest to anyone.A complete, well-built, comprehensive answer isn't something that fits within the boudaries of most community members as there is WAY too many variables and unknowns here. Anything will most likely create more questions (of this quality) than help you or anyone else. You lack basic knowledge in order to construct a question that doesn't sound anything other than 'i need a full tutorial'. Community doesn't provide tutorials, custom solutions or anything that resssembles a full product/service. We rather help solve smaller, more precise and clear issues that pop up day to day in the field. Generally, when someone "talks the talk", it implies that the bases are covered and an issue arose. For now, you must learn to "walk the walk" i suppose.
Everyone wore the same shoes at some point or another and good memory comes from remembering such stuff from when we started playing with the wall socket angry pixies!
Cheers!
I'm trying to figure out the communication between an iOS app, and an online server. To my knowledge, a REST service is used.
With a tricky setup with two macs, an ethernet hub and an iPhone, I manage to capture the traffic between the device and the server.
So far so good. However, when I fire up the app, a trace is shown in Wireshark (also very good), but all that is listed is in TCP protocol, where I am expecting HTTP protocol.
Now, I'm running out of knowledge.
Does this mean, that there is no HTTP communication going on at all, or am I seeing raw TCP packages that need to be assembled into HTTP? If the latter, how do I approach that, and will I ever see readable xml?
Thanks for your insights!
Actually, this question became obsolete, since I found exactly what I wanted to do here:
http://nickfishman.com/post/50557873036/reverse-engineering-native-apps-by-intercepting-network
I'm looking for the name of a protocol and example code that permits handing off IP/port connections to establish unmediated P2P after introduction through a server.
Simple example:
You and I both start chat programs that connect to chatintroduce.com (fictional server). I send you a "Hi! Wanna chat?" message. It doesn't get sent. Instead my chat program tells chatintroduce to send your chat program a request for connection. You respond to a prompt and your chat program tells chatintroduce to broker the connection. Chatintroduce establishes an initial two-way connection between us. Now, this final step is important, chatintroduce releases control and our two chat programs now talk directly to each other without any traffic through chatintroduce.
In other words, I construct packets which have your IP address and you receive them without interference from firewalls, NATs or any other technologies. In other words, true peer-to-peer connection independent of intermediate server.
I need to know what search terms to use to find appropriate technology. An RFC name would suffice. I've been searching for days without success.
I think what you are looking for is TCP/UDP hole punching which typically coordinates the P2P connection using a STUN server to determine the "capabilities" of the firewalls (e.g. is it a full cone nat? symmetric?).
https://en.wikipedia.org/wiki/Hole_punching_(networking)
We employed this at a company I worked for to create a kind of BitTorrent that could circumvent firewalls for streaming video between two peers.
Note that sometimes it is NOT possible to establish a connection without the intermediary.
What you are looking for is ICE protocol. RFC 5245. This protocol is used for connecting two peers through NAT traversal. There are some open source libraries and also some proprietary libraries for this. You can search google with ICE implementation.
You will also need to read about some additional protocols. These are used with ICE protocol. They are STUN and TURN.
For some cases you can't make P2P call 100% time. You will have to use a relay server. Like if the NAT combination of two peers are Symmetric vs Symmetric/PRC. That relay server is called TURN server.
Some technique like Port forwarding and TCP/UDP hole punching will help you to increase P2P rates.
See this answer for more information about which combination of NAT will require a relay server and which don't.
Thank you. I will be looking further into ICE, STUN, TURN, and hole-punching.
I also found n2n which looks like almost exactly what I wanted.
https://github.com/meyerd/n2n
http://xmodulo.com/configure-peer-to-peer-vpn-linux.html
With n2n, one makes a VPN with a super node that all other edge nodes know.
But once the introductions are made, the super node can be absent.
This was exactly what I wanted. I hope it works across platforms (linux, MacOS, Windows).
Again, I am still researching before implementation, so your advice was very important to me.
Thank you.
Use PJNATH. Its open source.
http://www.pjsip.org/pjnath/docs/html/
There is not much open source on NAT Traversal. As far as I know PJNATH is good.
For server you can use Google's Open source STUN and TURN server.
I'm trying to get into an implementation of some kind of push notification for a Windows WPF client application and a java backed server.
The idea is to avoid as much as possible polling the server, so I thought to implement it with sockets and messages, and relying in some easy pulling solution in case a socket connection could not be done, (Firewalls, etc).
In the other hand is important that the data traveling get encrypted.
So I have a couple of question/"request for opinions" more related with the WPF client:
Perhaps already exist some solution for that, any tips?
Could be good to think in some SSL sockets connections for that?
If 2 is OK, there is some native solution for secure sockets in .net or any library?
If sockets solutions is an option, I guess i need to go through port 443 and by the way it will avoid many problems with firewalls and so on, am i right?
I know there is many question but all are related to the same problem.
Thanks in advance.
http://clientengine.codeplex.com/
Yes, SSL is good if you need to keep the data secure during transfer
Yes, http://clientengine.codeplex.com/ indicates it supports SSL/TLS
Well, it depends on whether you are controlling the server or not. If you have control over it you can use whatever port you want.
When the webbrowser control issues an HTTP request to a URL, it is assigned a port - which is utilized for the length of that connection.
Is there away to find out which port is being utilized for each connection the webbrowser control establishes/issues?
Every request is potentially using a different port. Since most requests are resolved in a couple of seconds and then closed, having the port information on the client isn't going to be very helpful.
If you're interested from a historical perspective, you can add the port number to the logs that many web servers generate.
In order to view this information live you can use a tool such as TCPView
Now for the real question. What are you trying to do? There may be an easier way.
you can run in background:
netstat -bn
and parse output to get information about your application (ports, ips, etc.)