Skip to content

Conversation

@yahuio
Copy link

@yahuio yahuio commented Feb 12, 2025

Issue: https://github.com/Power-Trade/cplx-ops/issues/156

  • wss://api.wss.dev.power.trade/v1/fix_order_entry
  • wss://api.wss.dev.power.trade/v1/fix_drop_copy

using forked version of quickfix with websocket support added

- wss://api.wss.dev.power.trade/v1/fix_order_entry
- wss://api.wss.dev.power.trade/v1/fix_drop_copy

using forked version of quickfix with websocket support added
@yahuio yahuio requested a review from egor-pt February 12, 2025 06:38
@yahuio yahuio self-assigned this Feb 12, 2025

go 1.22

replace github.com/quickfixgo/quickfix => github.com/Power-Trade/quickfix v0.9.6-powertrade.1
Copy link
Collaborator

@egor-pt egor-pt Feb 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to use upstream quickfix but customise only some classes (e.g. Initiator)?
Experience with custom Initiator/Acceptor may be useful, because we want multiple connections (with same Sender&Target) and the easiest way to support it is to mark different connections' sessions with different SessionID.Qualifier.

Copy link
Author

@yahuio yahuio Mar 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to use upstream quickfix but customise only some classes (e.g. Initiator)?

Um.. don't think we can limit the changes to only Initiator/Acceptor. This is the changes I've made in quickfix.

The Dailer interface changes must be added given the current structure.

Experience with custom Initiator/Acceptor may be useful, because we want multiple connections (with same Sender&Target) and the easiest way to support it is to mark different connections' sessions with different SessionID.Qualifier.

Agree it would be good to gain the experience, but I think this can be treated as a separate problem to tackle.

DataDictionary=spec/FIX44-PT.xml
SocketUseSSL=Y
WebsocketLocation=wss://api.wss.test.power.trade/v1/fix_drop_copy
WebsocketOrigin=http://localhost/ No newline at end of file
Copy link
Collaborator

@egor-pt egor-pt Feb 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need WebsocketOrigin (I ignore HTTP headers on server side)? If yes, what about optional generic WebsocketHTTPHeaders?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems is a required field (golang.org/x/net/websocket) to start websocket connection. As a client library (quickfix), it's better to piggyback expose control over it to the user.

If yes, what about optional generic WebsocketHTTPHeaders?

yea, indeed we should expose those optional field as well, to allow user to have complete control over the ws connection

ResetOnLogon=Y
DataDictionary=spec/FIX44-PT.xml
SocketUseSSL=Y
WebsocketLocation=wss://api.wss.test.power.trade/v1/fix_drop_copy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a duplication of api.wss.test.power.trade in SocketConnectHost and WebsocketLocation.
Let's either use only WebsocketLocation (remove SenderConnection*) or use SocketConnectionHost (i.e. if it has schema ws/wss, use WebSocket initiator)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a duplication of api.wss.test.power.trade in SocketConnectHost and WebsocketLocation.

this can be fixed in quickfix layer indeed. I have to keep SocketConnectHost there because they are mandatory fields, but it should be optional if WebsocketLocation is provided.

(remove SenderConnection*)

sorry, not sure what you mean here?

Copy link
Author

@yahuio yahuio Mar 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated quickfix to allow SocketConnectHost to be optional

switch *loggerCmd {
case "file":
logFactory = NewBeautyLogFactory(quickfix.NewScreenLogFactory())
logFactory = NewBeautyLogFactory(screenlog.NewLogFactory())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is due to upstream refactoring, right?

Copy link
Author

@yahuio yahuio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@egor-pt are we determined to contribute back to quickfix ? then this example can eventually point back to upstream.


go 1.22

replace github.com/quickfixgo/quickfix => github.com/Power-Trade/quickfix v0.9.6-powertrade.1
Copy link
Author

@yahuio yahuio Mar 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to use upstream quickfix but customise only some classes (e.g. Initiator)?

Um.. don't think we can limit the changes to only Initiator/Acceptor. This is the changes I've made in quickfix.

The Dailer interface changes must be added given the current structure.

Experience with custom Initiator/Acceptor may be useful, because we want multiple connections (with same Sender&Target) and the easiest way to support it is to mark different connections' sessions with different SessionID.Qualifier.

Agree it would be good to gain the experience, but I think this can be treated as a separate problem to tackle.

ResetOnLogon=Y
DataDictionary=spec/FIX44-PT.xml
SocketUseSSL=Y
WebsocketLocation=wss://api.wss.test.power.trade/v1/fix_drop_copy
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a duplication of api.wss.test.power.trade in SocketConnectHost and WebsocketLocation.

this can be fixed in quickfix layer indeed. I have to keep SocketConnectHost there because they are mandatory fields, but it should be optional if WebsocketLocation is provided.

(remove SenderConnection*)

sorry, not sure what you mean here?

DataDictionary=spec/FIX44-PT.xml
SocketUseSSL=Y
WebsocketLocation=wss://api.wss.test.power.trade/v1/fix_drop_copy
WebsocketOrigin=http://localhost/ No newline at end of file
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems is a required field (golang.org/x/net/websocket) to start websocket connection. As a client library (quickfix), it's better to piggyback expose control over it to the user.

If yes, what about optional generic WebsocketHTTPHeaders?

yea, indeed we should expose those optional field as well, to allow user to have complete control over the ws connection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants