Giter VIP home page Giter VIP logo

Comments (7)

chilimatic avatar chilimatic commented on June 18, 2024 1

coool :) i hope I got time tomorrow and have a look at it :) I was working till 5 minutes ago :)

from socialnetwork.

chilimatic avatar chilimatic commented on June 18, 2024 1

I'm not sure if it's over complex.

I think this article helps to understand that the problem is only really complex using the classic SQL RDBMs .
http://www.cray.com/blog/graph-databases-101/
he really nails the usecase for graph databases and as you will read networks are a specific target.

Then read this :) as an easy kickstarter for a timeline idea :)
http://www.sitepoint.com/efficient-user-timelines-php-application-neo4j/

If you don't like it at least I hope you had a good read meanwhile :)

from socialnetwork.

chilimatic avatar chilimatic commented on June 18, 2024

I think about a view that stores the score and btree indexes in that view for faster ordering. So the normal post inserts wont be affected.

this is just top of my head I would need to spend time looking at the model an experiment with it.

from socialnetwork.

andreas83 avatar andreas83 commented on June 18, 2024

my final query looks like this
SELECT *, count(Score.id) as score, Content.id AS id, User.id as user_id FROM Content INNER JOIN User on Content.user_id=User.id LEFT JOIN Score on Content.id=Score.content_id WHERE Content.id < 1000000000 group by Content.id order by DATE(from_unixtime(Content.date)) desc, score desc, Content.id desc

I will upload the soloution to demo and make some performance benchmark tests.

from socialnetwork.

andreas83 avatar andreas83 commented on June 18, 2024

i'm curious to see some performance benchmarks view vs left join, vs own column...

from socialnetwork.

andreas83 avatar andreas83 commented on June 18, 2024

mhm some user reported this feature as a bug, because the were confused by the new ordering ....

e9142c8

from socialnetwork.

andreas83 avatar andreas83 commented on June 18, 2024

Ordering by score can be interesting for sure, but maybe it makes more sense to order
by activity/popularity. comments, likes, views etc.
So we may end up with a tracking system, which can be useful for understanding the user habits.

❤️ how i make every task overcomplex and nearly impossible to solve.

from socialnetwork.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.