Thread: [Quickfix-users] Quickfix and Ruby
Brought to you by:
orenmnero
From: Noel R. M. <noe...@gm...> - 2010-10-14 21:34:52
|
Hi Guys, Im trying to use ruby and quickfix. But Im a little confused about the MessageCracker. How does it works in using ruby? How do I implement an "onMessage" for Logon messages since ruby isn't type safe? Thanks in advance, -- Noel Rocha http://blog.noelrocha.com.br |
From: Noel R. M. <noe...@gm...> - 2010-10-14 22:10:38
|
I've checked the ruby examples in the quickfix source. But its an acceptor example. Im trying to build an initiator and didn't know how to logon. Cheers, -- Noel Rocha http://blog.noelrocha.com.br On Thu, Oct 14, 2010 at 6:34 PM, Noel R. Morais <noe...@gm...> wrote: > Hi Guys, > > Im trying to use ruby and quickfix. > > But Im a little confused about the MessageCracker. > > How does it works in using ruby? > > How do I implement an "onMessage" for Logon messages since ruby isn't type safe? > > Thanks in advance, > > -- > Noel Rocha > http://blog.noelrocha.com.br > |
From: Grant B. <gbi...@co...> - 2010-10-14 22:29:23
|
The interfaces for Initiator and Acceptor are very similar. As soon as you call Initiator::start(), it'll try to connect to whatever counterparty it's configured to connect to. Similarly, Acceptor::start() will make your acceptor start listening for connections. For basic SocketAcceptors/Initiators, you shouldn't need to do much with them besides start() and stop(). The Application class (given to the constructor) is where the interesting stuff happens. If you take your example and switch all instances of "acceptor" to "initiator", you should be most of the way there. -Grant On Thu, Oct 14, 2010 at 5:10 PM, Noel R. Morais <noe...@gm...> wrote: > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > I've checked the ruby examples in the quickfix source. But its an > acceptor example. Im trying to build an initiator and didn't know how > to logon. > > Cheers, > > -- > Noel Rocha > http://blog.noelrocha.com.br > > > > On Thu, Oct 14, 2010 at 6:34 PM, Noel R. Morais <noe...@gm...> wrote: >> Hi Guys, >> >> Im trying to use ruby and quickfix. >> >> But Im a little confused about the MessageCracker. >> >> How does it works in using ruby? >> >> How do I implement an "onMessage" for Logon messages since ruby isn't type safe? >> >> Thanks in advance, >> >> -- >> Noel Rocha >> http://blog.noelrocha.com.br >> > > ------------------------------------------------------------------------------ > Download new Adobe(R) Flash(R) Builder(TM) 4 > The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly > Flex(R) Builder(TM)) enable the development of rich applications that run > across multiple browsers and platforms. Download your free trials today! > http://p.sf.net/sfu/adobe-dev2dev > _______________________________________________ > Quickfix-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-users > |
From: Noel R. M. <noe...@gm...> - 2010-10-14 22:45:14
|
I did that and it worked. My problem now is that my counterparty requires logon and I need to implement the onMessage. How does MessageCracker works in ruby implementation? Cheers, -- Noel Rocha http://blog.noelrocha.com.br On Thu, Oct 14, 2010 at 7:29 PM, Grant Birchmeier <gbi...@co...> wrote: > The interfaces for Initiator and Acceptor are very similar. > > As soon as you call Initiator::start(), it'll try to connect to > whatever counterparty it's configured to connect to. Similarly, > Acceptor::start() will make your acceptor start listening for > connections. > > For basic SocketAcceptors/Initiators, you shouldn't need to do much > with them besides start() and stop(). The Application class (given to > the constructor) is where the interesting stuff happens. > > If you take your example and switch all instances of "acceptor" to > "initiator", you should be most of the way there. > > -Grant > > > On Thu, Oct 14, 2010 at 5:10 PM, Noel R. Morais <noe...@gm...> wrote: >> QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html >> QuickFIX Support: http://www.quickfixengine.org/services.html >> >> I've checked the ruby examples in the quickfix source. But its an >> acceptor example. Im trying to build an initiator and didn't know how >> to logon. >> >> Cheers, >> >> -- >> Noel Rocha >> http://blog.noelrocha.com.br >> >> >> >> On Thu, Oct 14, 2010 at 6:34 PM, Noel R. Morais <noe...@gm...> wrote: >>> Hi Guys, >>> >>> Im trying to use ruby and quickfix. >>> >>> But Im a little confused about the MessageCracker. >>> >>> How does it works in using ruby? >>> >>> How do I implement an "onMessage" for Logon messages since ruby isn't type safe? >>> >>> Thanks in advance, >>> >>> -- >>> Noel Rocha >>> http://blog.noelrocha.com.br >>> >> >> ------------------------------------------------------------------------------ >> Download new Adobe(R) Flash(R) Builder(TM) 4 >> The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly >> Flex(R) Builder(TM)) enable the development of rich applications that run >> across multiple browsers and platforms. Download your free trials today! >> http://p.sf.net/sfu/adobe-dev2dev >> _______________________________________________ >> Quickfix-users mailing list >> Qui...@li... >> https://lists.sourceforge.net/lists/listinfo/quickfix-users >> > |
From: Grant B. <gbi...@co...> - 2010-10-15 00:16:40
|
I don't know what you mean by "my counterparty requires logon". QuickFIX automatically sends a logon message when your initiator starts. The counterparty may refuse or reject your logon message for any number of reasons. Does your log tell you why? If your counterparty wants a user/password, you may need to put logic in toAdmin() so you can intercept the message and insert these fields. I'm not familiar with Ruby QuickFIX myself, but I see that the documentation often has Ruby examples along with other languages. Have you seen the "RUBY" links, for instance, on this page? http://www.quickfixengine.org/quickfix/doc/html/receiving_messages.html Since Ruby is not typesafe, the more typesafe practices for using QuickFIX do not apply, hence the "Most Type Safe... DO THIS!" section does not have a Ruby example. The "More Type Safe" section does, however, and it should work. You'll have to examine field 35 in the header to know what kind of message you received, though. -Grant On Thu, Oct 14, 2010 at 5:45 PM, Noel R. Morais <noe...@gm...> wrote: > I did that and it worked. > > My problem now is that my counterparty requires logon and I need to > implement the onMessage. > > How does MessageCracker works in ruby implementation? > > Cheers, > > -- > Noel Rocha > http://blog.noelrocha.com.br > > > > On Thu, Oct 14, 2010 at 7:29 PM, Grant Birchmeier > <gbi...@co...> wrote: >> The interfaces for Initiator and Acceptor are very similar. >> >> As soon as you call Initiator::start(), it'll try to connect to >> whatever counterparty it's configured to connect to. Similarly, >> Acceptor::start() will make your acceptor start listening for >> connections. >> >> For basic SocketAcceptors/Initiators, you shouldn't need to do much >> with them besides start() and stop(). The Application class (given to >> the constructor) is where the interesting stuff happens. >> >> If you take your example and switch all instances of "acceptor" to >> "initiator", you should be most of the way there. >> >> -Grant >> >> >> On Thu, Oct 14, 2010 at 5:10 PM, Noel R. Morais <noe...@gm...> wrote: >>> QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html >>> QuickFIX Support: http://www.quickfixengine.org/services.html >>> >>> I've checked the ruby examples in the quickfix source. But its an >>> acceptor example. Im trying to build an initiator and didn't know how >>> to logon. >>> >>> Cheers, >>> >>> -- >>> Noel Rocha >>> http://blog.noelrocha.com.br >>> >>> >>> >>> On Thu, Oct 14, 2010 at 6:34 PM, Noel R. Morais <noe...@gm...> wrote: >>>> Hi Guys, >>>> >>>> Im trying to use ruby and quickfix. >>>> >>>> But Im a little confused about the MessageCracker. >>>> >>>> How does it works in using ruby? >>>> >>>> How do I implement an "onMessage" for Logon messages since ruby isn't type safe? >>>> >>>> Thanks in advance, >>>> >>>> -- >>>> Noel Rocha >>>> http://blog.noelrocha.com.br >>>> >>> >>> ------------------------------------------------------------------------------ >>> Download new Adobe(R) Flash(R) Builder(TM) 4 >>> The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly >>> Flex(R) Builder(TM)) enable the development of rich applications that run >>> across multiple browsers and platforms. Download your free trials today! >>> http://p.sf.net/sfu/adobe-dev2dev >>> _______________________________________________ >>> Quickfix-users mailing list >>> Qui...@li... >>> https://lists.sourceforge.net/lists/listinfo/quickfix-users >>> >> > |