D
D
Denis Ogurtsov2014-01-04 19:26:22
MySQL
Denis Ogurtsov, 2014-01-04 19:26:22

How to implement a PHP+NodeJS+MySQL project?

The project itself is something like a twitter project.
Micro messages have links:
- tags,
- author
- status 1
- mood (status 2)
More precisely:
1. Many small transactions (adding, likes, comments of micro messages)
2. Real-time update on the client (new micro messages)
3. Storing a large number of micro messages in the database.
4. Quick selection by tag, author, status 1, status 2, possibly by a word inside a micro post.
5. API I don't plan to do an
architecture like that of Twitter right now.
I will do it on Yii.
What buns php, operating systems, Mysql, Nodejs to install?
I have never done such projects.
Caching? But as it were, you don’t need to cache anything, it’s still dynamic.
InnoDB plus indexing by "search" fields, plus queries by hand and not AR - this is also understandable.
What else do you recommend?
Thank you.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Guketlev, 2014-01-05
@Yavanosta

I recommend you start doing it.
In the question of porridge, nothing is clear. What do you want to know then?

U
urvalla, 2014-01-05
@urvalla

I would recommend Node.js with socket.io (for websockets) and MongoDB + Redis/Memcached (for cache). The cache is needed for entries that are frequently accessed (most likely just recent entries), as well as for things like the online status. Websockets - so as not to torment the server and the channel with Ajax. You can use Yii, you can use pure Node.js - it's not so important, because it's better to pass static pages with js to the user, connect to socket.io, and send JSON messages through your own API.

A
asheee, 2014-01-16
@asheee

I would also recommend NodeJS, socket.io, Mongo, Mongoose, perhaps Redis (sessions, cache), and ExpressJS. The latter, it seems to me, will be very convenient for creating an API. It is especially worth taking a closer look at the app.params methods (in order not to complicate controllers with collections, etc.). But I would not recommend using a basic ExpressJS scaffold, because in applications more than a small chat or a static site, the structure starts to look sloppy. I use a couple of helper modules from LocomotiveJS to organize (Framework over Express. I would use it, but it's not very flexible. There are some problems with web socket integration). An example of the Application Structure, which seems to me well suited for Express and not the smallest applications, can be seen on the example of a blog engine.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question