When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
114 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
"how difficult" questions are generally not helpful
since difficulty is based on experience and the innate difficulty of a task, not just the innate difficulty alone
but pretty difficult I would say
there are more difficult things, there are less difficult things
well what are the difficult aspects in developing this project
isnt it just a orderbook and matching engine
Like I am confused where the difficulties lie?
difficulty lies in the generic difficulity of networking
explain
sorry I am quite new to c++ I know C, python and R. I really don't know how this is a project that is not doable
oh don't get me wrong Im not saying don't try
ok
if you;ve never done c++ before its going to be hard because structuring c++ in a large project is itself an ordeal
and then you're going to need to learn a networking library/api on top of this
BUUT
go for it
if its something you're passionate about don't let difficulty be a reason not to do something
you learn the most from difficult things
well, you have to break this project in different pieces
you cant build an API off the bat
you probably should otherwise how are you going to test anything
what if it was manual click: buy stock of x and sell stock of x
sorry am I naive in building this project
See for yourself try to build a multiple client single server project in Boost asio.
like I might be
You want a GUi too?
Okay
im not saying start off with what you want from the beginning. IM saying you should probably have something to test as you go
Then that's gonna be really far more complicated
You are better off reading the QT framework
qt meaning quality testing?
idk I would say likely similar amount of complicated since you're jsut going to learn a UI library like QT anyway
not QT is the name of a gui library
QT Framework
okay
so how should I build this like if you were in my shoes and passionate about building a demo, what would you build first
sample QT app or a terminal networking example
Yeah its free for people with open license
My company doesn't use Qt even though we do have exchange trading system
For crypto and derivatives
is it built on c++?
Yes
how long did it take to develop it
how many years tho
okay but a demo
does not need to be 4M lines
lol
like that is a bit unreasonable
i just wanted to show buying and selling
on a single exchange server
maybe even skip the gui
just you know proof of concept
Try to build a single server multiple client
In boost asio
See how well you do
If you can make that work on your own then that's a start
within the single server multiple client you can build a orderbook
and matching engine correct?
Yes
how many lines of code should this be btw
To do this properly? Implement sha 256 properly, a synchronized order keeping queue. I estimate about 2k to 3k
Try it yourself build a simple single client multiple server project in boost asio. If just want to do it raw on the TCP then maybe take a look at websocketpp
Websocketpp is strictly a websocket library
And its easier
To use standardize payloads with other libraries
Like protobuf
I asked chatgpt: 1. Set Up Boost.Asio in Your Project
Make sure Boost and Boost.Asio are installed and configured in your development environment.
2. Create a Server Class
Start by creating a server class that will manage client connections.
The server should have an io_context object from Boost.Asio, which provides core synchronous and asynchronous I/O functionality.
Implement a method to start accepting client connections. This typically involves setting up an asynchronous accept operation with a socket that waits for new client connections.
3. Handle Client Connections
When a client connects, the accept operation should create a new session or connection object.
Each client connection can be handled in a separate session object, which holds a socket for client communication.
Implement read and write operations for the session. These can be asynchronous to handle I/O without blocking.
4. Create a Client Class
Similar to the server, create a client class that can connect to the server.
The client will also need an io_context and a socket.
Implement functionality to connect to the server, and to send and receive data.
5. Implement Asynchronous Operations
Both server and client should use asynchronous operations (like async_read, async_write, and async_accept) to handle I/O. This allows the server to manage multiple clients simultaneously without blocking on individual operations.
6. Run the io_context
The io_context's run method needs to be called to start processing asynchronous operations. This can be done in a separate thread if you need to perform other tasks concurrently.
7. Error Handling
Properly handle errors in network operations, such as disconnections and data transfer errors.
8. Testing
Test the server with multiple clients to ensure it handles simultaneous connections and data communication correctly.
but arent websockets platform dependent?
No when you use websocketpp
It's pretty cross platform
Only authentication is different
so websockets are better?
<@undefined>
Please don't delete forum posts. They can be helpful to refer to later and other members can learn from them. In the future you can use !solved to close a post and mark a post as solved.