Answer the question
In order to leave comments, you need to log in
What engine do you think the site tjournal.ru is based on?
I really liked the system of comments and notifications, and the overall design.
There are similar sites - lifenews.ru
Answer the question
In order to leave comments, you need to log in
Hello, everything is self-written.
Pretty standard set of Nginx + Apache + Memcached + PHP + Gearman.
The comment system is its own, notifications have also recently been screwed up, there is just a separate table with events that fall into the user's feed.
Ilya,
TJournal
Yes, you are tired of coming here with such questions. The engine is suitable for Wordpress Joomla Drupal and the like. And buy a commentary system out of the discus and put the design, order it in the design studio in a different way, or come up with it yourself
Ask the technical director . Or the editor-in-chief or editor- in-chief .
I have stored as numbers, conversion through the INET_NTOA () / INET_ATON () functions.
On not very large volumes, probably without much difference, at least I usually store it as a string.
But when I looked inside other people's fairly serious projects with large amounts of data, it was stored there exactly as a number through INET_ATON, so I suspect that this particular option is considered a good form rule. For example, because of performance.
I may not answer your question, but ipv4 is 4 bytes separated by a dot
ping 0x5f.0x64.0xb4.0xc8
Обмен пакетами с 95.100.180.200 по с 32 байтами данных:
Ответ от 95.100.180.200: число байт=32 время=64мс TTL=53
An IP address is a number. For IPv4, this is 4 bytes. For IPv6, this is 16 bytes.
If you only need v4, then you can take INT. If you need both, then
a) I advise you to store both addresses independently, during the transition they are usually available at the same time (if one remains unknown - it's okay, mark it as NULL)
b) I don't see any sense in storing it as a string, the database this is a place to store data, not an interface for viewing, and you need to focus on storage. Who wants to display beautifully - let him build the necessary query with transformations, excellent functions have already been given above.
c) store in binary(4) and binary(16) to have a unified approach (it was more convenient for me, I advise you too)
d) just do not need varbinary - the size of the address is constant, there can be no var. Fixed-size data types (even binary) are much easier to store and manipulate than variable-sized data types. Do not torture the DBMS for no reason.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question