Tag Archives: socket

Working demo of basic C++ and Python socket programming

Working demo of basic Cpp and Python socket programming

I  just made a video to showcase low-level socket programming. After going through various complicated libraries including Kafka with other ones which were written in stranger languages like Scala or Erlang. I really don’t want to go down that path because of complexities versus simple ways. As a result, I looked into lower level simple socket programming for inter-process communications between C++ and Python. The simple results are in the video mentioned below.

Here’s that video to demonstrate this

You will be able to compare the few amount of lines of code to accomplish versus the heavy weighted libraries mentioned above. I even came up with a simple architecture to handle messages that have not been guaranteed for delivery. I’m hopefully thinking everything should work OK. If you got any suggestions to improve, let me know.

This brings me to the next fact of my promotion which will end on Sunday New Year’s Day. Details are below.

Thanks Bryan

P.S. I actually opened up the email thingy to invite you to an introductory promo starting today.

  • I will be switching over from our Quant ELITE service to the newer Quant Analytics in the next few months. Enjoy the last of coding demos and video walkthroughs learning R, math, Matlab, .NET, serious secretive research papers from biggest the banks and hedge funds, building out new open source trading, etc etc. I could go on with this but I it will also permanently disappear in coming months.
  • We are currently doing a futures/options course taking us up to the the first week of February. This will turn into a new separate course in coming months as well.
  • This will be replaced with an entirely different service. It will involve actual live trading analysis for all major asset classes in the this global market. It will cover all forex, pair trading/arbitrage stock trading, and options with futures. Exciting times ahead
  • I have unbundled the Infrastructure Building Blocks and Interactive Brokers API workshop. These are not  yet for sale individually but will be marketed at $497 each. Moving forwards, both will be used as an introduction to those who want to to build out the same high speed system I am constructing now. That is an extra $1000 value as of today. If you take this, I will  give you access to both for 30 days.
  • Not only that, I am doing a 2 for 1 deal for those interested in this new service. As this new service advances, I will be raising the cost on a monthly basis. This time next year, this Analytics service could be about $3k to join on an annual basis. If it works out, I do believe it will be worth a lot more.  I will only be making myself available personally for my members through this service with live private event Mondays nights Eastern Standard time.

As said, if this works out, You can expect it to go up over the next few months after introduction. I will be holding this promotion until Jan 1, 2017.

>>> GET THis OFFER NOW

P.P.S. Are you part of my Facebook programming group? There is lots of action going on it where we can all learn about software development in this exciting field.
Join here https://www.facebook.com/groups/quantlabsnet/
Also stay up to date on my Facebook Page https://www.facebook.com/quantlabsnet/
Twitter: twitter.com/quantlabs
Lasly, I do post about 20-30 Bloomberg ‘video charts’ on my Instagram at https://www.instagram.com/quantlabsnet/

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Working demo of basic Cpp and Python socket programming

Working demo of basic Cpp and Python socket programming

This is a demo finally after looking at so many other libraries which are too complex

Python http://stackoverflow.com/questions/7749341/very-basic-python-client-socket-example

C++ http://cs.ecs.baylor.edu/~donahoo/practical/CSockets/practical/

Join my FREE newsletter to learn more about these techniques for automated trading

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

C++ wrapper for asio socket programming

C++ wrapper for asio socket programming

A much easier way to do socket programming in C++

http://www.codeproject.com/Tips/1056017/A-Simple-Wrap-Library-for-boost-asio

Join my FREE newsletter to learn more about using C++ for your advanced algo trading 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Is IPC name pipes faster than socket?

Is IPC name pipes faster than socket?

After my video below, someone came back with this query.

i think sockets for messaging in the computer it self between the front end and back end is bad
look at windows messages or other
http://en.wikipedia.org/wiki/Inter-process_communication
Named Pipes look good

I am looking for security as priority where speed is not so important for mid frequency trading system

What you think? Let me know via Facebook

Join my FREE newsletter which path I go with for messaging with security

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Matlab socket programming best way to trigger events with real time data provider like IQFeed

Matlab socket programming best way to trigger events with real time data provider like IQFeed

I may finally getting closer to figuring out how to stream data into Matlab using sockets. From within Matlab, it will directly connect into the IQFeed client. Outside of what you would think is difficult event handling with listeners, the coding looks stupidly easier but communicating with .NET assemblies or Java JARs is more complicated.Using Sockets within Matlab is much easier to just use a filter on the stream to listen to. If something triggers, you would issue a listener. Once I figure it out, this HFT may become born.

Join my free newsletter to see how I implement this

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

No extra funding for Interactive Brokers FIX CTCI solutions vs sockets through TWS Trader Workstation desktop application

No extra funding for Interactive Brokers FIX CTCI solutions vs sockets through TWS Trader Workstation desktop application

I can confirm with a call to Interactive Brokers that you can still get access to the IB FIX gateway for the initial $10K required. You do not need an extra x amount to get access. Be aware that there is $500 for this but it does free from other limits if you went through the sockets with TWS.

http://www.interactivebrokers.com/en/pagemap/pagemap_APISolutions.php?ib_entity=llc

See what I plan to do with this by joining my newsletter. 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Youtube video demo java client socket connect to microsoft .net c sharp C# application server

Youtube video demo  java client socket connect to microsoft .net c sharp C# application server

Source links:

http://ferozedaud.blogspot.ca/2009/11/how-to-send-object-from-java-to-net.html

http://ferozedaud.blogspot.ca/2009/11/howto-serialize-data-from-object-from.html

Get more info here:

http://quantlabs.net/membership.htm

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Tips to increase socket (fds) on Linux or Unix systems for network admin

Tips to increase socket (fds) on Linux or Unix systems for network admin
If you ever come across a challenge in your Linux or Unix kernel development, one of the biggest roadblocks is the number of file descriptors (also known as fds or sockets) certain processes have access to. These are obviously set by network administrators with root access in to the box. These same file descriptors can either enhance or degrade the performance of any server using HTTP for the internet. The number you set depends on if the server will be used for either a client or used for something like an email server.
Note that the following instructions can be used by either PAM (pluggable authentication modules) or ssh-ing into a remote server.
You can check the system limits, do:
1. cat /proc/sys/fs/file-max
If you need any changes to surive after rebooting, make changes in /etc/sysctl.conf and edit:
# Maximum number of open files permitted
fs.file-max = 65535

To reload any changes to this file, do: sysctl -p /etc/sysctl.conf.
You can make further changes by following any of these recommendations:
[Find out where __FD_SETSIZE is defined]
% grep “#define __FD_SETSIZE” /usr/include/*.h /usr/include/*/*.h
/usr/include/bits/types.h:#define __FD_SETSIZE 1024
/usr/include/linux/posix_types.h:#define __FD_SETSIZE 1024

Alternately your system may use tabs in which case
something like this should do the trick:
% grep -E “#define\W+__FD_SETSIZE” /usr/include/*.h /usr/include/*/*.h

[Make a local copy of these files]
% cp /usr/include/bits/types.h include/bits/types.h
% cp /usr/include/linux/posix_types.h include/linux/posix_types.h

[Modify them so that they look something like
#define __FD_SETSIZE 65535

[Recompile httperf and/or your server so that it uses a larger file
descriptor set size by using -I include during compliation, this
will allow the compiler/pre-processor to use the new include files
rather than the default versions]

To check and modify limits per shell.
[Using csh: openfiles and descriptors show that the limit here is 1024]
% limit
cputime unlimited
filesize unlimited
datasize unlimited
stacksize 8192 kbytes
coredumpsize 0 kbytes
memoryuse unlimited
descriptors 1024
memorylocked unlimited
maxproc 8146
openfiles 1024

[To increase this to 65535 for all users (as root)]
# vi /etc/security/limits.conf

[Modify or add “nofile” (number of file) entries – note
that a userid can be used in place of *]
* soft nofile 65535
* hard nofile 65535

# vi /etc/pam.d/login
[Add the line]
session required /lib/security/pam_limits.so

[On many systems this will be sufficient – log in as a regular
user and try it before doing the following steps]

[These steps may be required depending on how PAM and ssh are configured
[Note on some systems – Debian?]
# vi /etc/pam.d/ssh
[Note on other systems – RedHat]
# vi /etc/pam.d/sshd
[Add the line]
session required /lib/security/pam_limits.so

# vi /etc/ssh/sshd_config
[May need to modify or add the line]
UsePrivilegeSeparation no

[Restart the ssh daemon]
[Note on some systems – Debian?]
# /etc/init.d/ssh reload
[Note on other systems – RedHat]
# /etc/rc.d/init.d/sshd reload

Also, if you need to do any of these manually. Do in In tcsh
limit descriptors 65535

In bash, do
ulimit -n 65535

Hopefully, these tips will help out any Linux or Unix network administrator. This is also helpful for those wanting to get into either Java or C++ development positions at investment banks.

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!