beginner question : getting started with quickfix/j

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

beginner question : getting started with quickfix/j

truesaint
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
Hello everyone,

I'm a complete beginner in QuickFIX/J and the FIX protocol in general.
Right now i'm having a hard time getting started, so any
pointers/suggestions will be very much appreciated.

At this point, i'm trying to write a proof-of-concept FIX client that
connects to a server, and get quotes data periodically. As far as i can
tell, here's what i need to do :
1. start a FIX session.
2. send a quote request.
3. receive quotes from server.
4. handle housekeeping stuffs...
        - heartbeat ??
        - other messages ??
5. disconnect when done.

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...

2. Is the above usage scenario suitable for use with QuickFIX/J ?
(as opposed to rolling-my-own low-level tcp/ip handling)

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 ?

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?


That's all for now. Thank you very much in advance,
best regards,
ts.










-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: beginner question : getting started with quickfix/j

toli
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
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.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: beginner question : getting started with quickfix/j

Tommy Hannon-5
In reply to this post by truesaint
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
TS,

There is a QuickFix/J user guide helps you get started that some  
sample code.  The QuickFix/J download has a few sample applications.

I would not suggest "rolling your own" network communications.  The  
combined packages accomplish all of this for you.

I would suggest configuring a session in the "settings" file.  
However, you may code session handling yourself if more control is  
desired.  The heartbeats are handled under-the-hood and are  
configurable.

You may disable persisting messages (although not recommended).  
Another option from the database would be to simply use flat file  
storage.  Although not obvious from the documentation, all you need  
to do is set the "FileStorePath" and "FileLogPath" in the settings  
file to accomplish this.

I will abstain from #4 as I run on Mac and Solaris platform only.

Hope this helps.  Good luck!

- Tommy

On May 3, 2007, at 5:54 AM, t.s. wrote:

> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
> Hello everyone,
>
> I'm a complete beginner in QuickFIX/J and the FIX protocol in general.
> Right now i'm having a hard time getting started, so any
> pointers/suggestions will be very much appreciated.
>
> At this point, i'm trying to write a proof-of-concept FIX client that
> connects to a server, and get quotes data periodically. As far as i  
> can
> tell, here's what i need to do :
> 1. start a FIX session.
> 2. send a quote request.
> 3. receive quotes from server.
> 4. handle housekeeping stuffs...
> - heartbeat ??
> - other messages ??
> 5. disconnect when done.
>
> 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...
>
> 2. Is the above usage scenario suitable for use with QuickFIX/J ?
> (as opposed to rolling-my-own low-level tcp/ip handling)
>
> 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 ?
>
> 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?
>
>
> That's all for now. Thank you very much in advance,
> best regards,
> ts.
>
>
>
>
>
>
>
>
>
>
> ----------------------------------------------------------------------
> ---
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Quickfixj-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: beginner question : getting started with quickfix/j

Joerg Thoennes
In reply to this post by truesaint
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
On 05/03/07 12:54, t.s. wrote:
> 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".

Where did you find this documentation? This seems to be part of the Java API of the native QuickFIX
engine. The QuickFIX/J engine is pure Java and the docs should not contain any System.loadLibrary()
calls. Otherwise, this is a documentation bug.

Cheers, Jörg

--
Joerg Thoennes
http://www.macd.com                 Tel.: +49 (0)241 44597-24
Macdonald Associates GmbH           Geschäftsführer: Roger Macdonald
Lothringer Str. 52, D-52070 Aachen  Amtsgericht Aachen, HRB 8151, Ust.-Id DE813021663

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: beginner question : getting started with quickfix/j

truesaint
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
>> 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".
> Where did you find this documentation? This seems to be part of the Java API of the native QuickFIX
> engine. The QuickFIX/J engine is pure Java and the docs should not contain any System.loadLibrary()
> calls. Otherwise, this is a documentation bug.
Ah, My bad, sorry....
I got mixed up with the quickfix documentation at
http://www.quickfixengine.org/quickfix/doc/html/project.html
since they have a 'java' section too.

Thank you all for the very informative answers,
I'll dig around on the example applications first.
Wish me luck :)

Regards,
t.s.





-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users