|
From: Toli K. <to...@ma...> - 2007-05-03 16:40:32
|
Hey. Welcome to Quickfix/J. I hope that you find it easy to use. > To that end, i have several questions... > 1. Is there a QuickFIX/J getting started guide ? I need a sample code > showing how to start/stop a session, and i couldn't find anything... In case you haven't seen it yet, take a look at http://www.quickfixj.org/quickfixj/usermanual/? The binary distribution comes with a few sample applications (banzai, executor), but you are probably better off checking out the code from SVN and looking at the code of these examples to see how things are setup. > 2. Is the above usage scenario suitable for use with QuickFIX/J ? > (as opposed to rolling-my-own low-level tcp/ip handling) Absolutely. That's essentially what we use it for, and that's why it was written. don't roll your own low-leve stuff. > 3. Do i have to use a database for this scenario ? There were several > chapters on the online docs that describes setting up the database, but > what if i don't need a database? Can i just use QuickFIX/J as an API ? You don't need to use the database at all. The DB is available as a logging store - you can store all the traffic (incoming/outgoing messages) in the DB but that's not necessary; and you can store the session info in DB but it's not necessary either. I think all the examples are setup to use FileStore which stores session info on disk, and you can use either the ScreenLog or the Slf4jLog, it's a lot simpler. > 4. On "setting up your project", the documentation said something about > "create a static initializer on your class, adding the line > System.loadLibrary("quickfix_jni") in order to load the appropriate > quickfix dll or shared object". > What does this bit do? What is a quickfix dll? I can't seem to find any > .dll or .jni files anywhere on my \quickfixj folder. Or am i missing > something here? this depends on what platform you run your code on. DLLs are for Windows machines. QFJ is 100% java, there's no native component, so you don't really need to load any JNI stuff. It is compatible with Quickfix (c++) JNI wrapper but if you are doing your stuff in Java then no need to do any JNI stuff. <disclaimer: obligatory plug> If you need more examples, feel free to check out the code for our OMS, it's posted at http://trac.marketcetera.org/trac.fcgi/browser/platform/trunk/ We use Spring for configuring all of QuickfixJ, but essentially it's the same setup. for your task, you need to create a QuickfixApplication, create a session and send a quote request. you'll handle the callback in the "fromApp" function in the qfApplication. QFJ handles all the logon/disconnect and heartbeats itself, if you setup the session correctly. happy coding. -- Toli Kuznets http://www.marketcetera.com: Open-Source Trading Platform download.run.trade. |