Brought to you by a team of early social networking veterans who experienced the pains of explosive growth, Phở Networks is the first social backend product that is:

Lightning-fast thanks to its RAM-first design

All social app solutions to date have been constructed with filesystem as the first point of touch for any data generated by users or the software. Given hard drives’ notorious slowness, the data is always stored in memory as well. That process, called “caching”, makes reads 5 to 20 times faster compared to solid-state and other types of hard drives.

Phở Networks is the first of its kind that is designed in a way the data is stored in RAM first, then copied to hard drives at desired intervals. This eventually persistent model enables the platform to run on minimal hardware while making the application extremely fast.

Social networking data, by design, is not mission critical and a few seconds to a few minutes data loss is acceptable. Phở’s eventually-persistent model offers the system operator to fine-tune a fine balance flexibly between the number of servers they’d like use to support the operations and the amount of time a worst-case scenario of data loss may be tolerated.

Moreover, Phở takes advantage of the latest paradigms in networking, e.g. event-driven non-blocking I/O, and renders responses faster than anything you’ve seen before.

Based on the Graph Model

MVC is a frequently used pattern architected with serving static or slightly dynamic content on the internet; for example, blogs and news web sites fall into this category.

However, social networks are completely different. While the number of variables in a blog or news web site is one (1) and that is “time” (because new comments may be added, or the recommended articles may change), the social network pages come with an additional variable, which is “viewer”. That's because, in a social app, pages may look different based on the page’s author’s relationship level with the viewer. For example, if they are friends, certain information may be visible, or if they are part of the same network, the same page may look restricted; if they are not friends at all, that very same page may look off-the-grid. This level of variability makes it difficult to develop and scale social apps with the same MVC architecture that’s in use by static or quasi-dynamic web sites.

Phở Networks introduces the “graph” model. Not only the graph model feels natural to the fabric of social apps, which makes the development of such social apps a breeze, but also it makes the description and engineering of complex graph based apps fast, easy and less prone to errors with GraphQL schema. Here’s an example:

# pho-graphql-v1

type Tweet implements ObjectNode 
@edges(in:"User:Post, User:Like, User:Consume", out:"Mention")
@permissions(mod: "0x07555", mask:"0xfffff")
@properties(expires: 0, editable: false, volatile: false, revisionable: false)
    id: ID!,
    content: String! @constraints(maxLength: 140),
    create_time: Date! @now

Once the schema is defined, Phở Networks compile them into interpretable PHP files ready to query via REST or access programmatically.


To date, database sharding and replication have been the de-facto methods of scalability in the social networking world. While they are reliable, database sharding requires an enormous amount of maintenance to make sure the systems function safely and as expected.

Phở Networks does not depend on any of these afore-mentioned methods, and it is horizontally scalable simply by adding new commodity hardware that runs the same piece of software on each machine. This makes scaling super-easy, super-fast.

The technologies in use by Phở Networks have been field-tested by social networking giants such as Twitter. For example, one of the components that’s used for simple round-robin database queries is called Twemproxy by Twitter.

Open Source + Event-based = Unlimited Extensibility

Last but not least, Phở Networks’ event-based design allows you to plug your custom functionality into any part of the system via hooks and signals. Besides, Phở is open source. Which means, you can view and modify the source code too.

Phở Networks stack is not monolithic. Its architecture is based off of microkernel principles which makes each part of the stack stand on its own repository, decoupled from services. This approach makes the Phở Networks source code easier to grasp and play with for programmers.


Any questions/comments? Please say below: