V
V
Valery2017-03-26 14:39:39
MySQL
Valery, 2017-03-26 14:39:39

What are the best technologies and methods for developing an auction?

Hello.

Colleagues, the task is to write a rather cumbersome auction site . The main feature is, of course, a mega-fast update of real-time data on the page and in the admin panel, etc. Those. I made a bet and the data was updated as quickly as possible for all visitors to this page.

The backend is written in Yii2, the database is MySQL - there are no options here, because the system is complex - it does not consist of one site.

I plan to use sockets, of course, caching everything and everything - etc.

I would like reasoned advice on what is better to use, from which side it is better and more optimal to approach the task, etc. I will be very grateful.

UPD:
Doc, thanks for the correction. In fact, the level of load is not yet clear - but it will not be too great, because. the auction is held among a limited number of visitors. The structure of the database is quite heavy and cumbersome.

Thank you!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergeyj, 2017-03-26
@supervaleha

You will need a database with hot data, materialized data, etc.
You did not describe the most important thing, the amount of data, the number of connections, the number of requests per minute, etc.
Everything else is just a choice of technologies, which can be anything.
Such projects usually depend only on the database.
What do you mean by cumbersome?
The bottom line is, if in any table with large connections there is more than 6k data, then the table will slow down.
While there is a selection from a large table and indexes are stupid, other entities will be blocked.
Accordingly, this will not give real-time work.
To do this, you need to think about the architecture of the database. I have given examples above.
Sharding by a specific key can be applied.

M
Mikhail Konyukhov, 2017-03-26
@piromanlynx

You can also use php. Store data in a well-accessible storage - redis/memcached and take it out bypassing php - for example, nginx modules for working with memcached/redis - this will allow you to have hot and available data regardless of backend brakes.
It is important to understand that this data is a cache and this cache should be written at the time of changing/saving the data, and not at the time of the request; those. the cache should always be hot and generated when saving data, not have expires and will only change by events.
With this architecture, your data will always be available from fast storage directly from nginx (for example, ssi can be used in it to get this data into the page content).
Realtime js-frontend notification can be implemented on websockets, there are a lot of examples, but I would advise you not to drive a lot of data through it - only events about the fact of a change and minimal data (everything you need can be taken by Ajax when you need it).

S
Sergey, 2017-03-26
@begemot_sun

It is not necessary to produce a realtime server in PHP. Use something else more appropriate like Erlang

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question