1,053 karma · joined December 6, 2010
South African temporarily in the Bay Area 2011-2015, Seattle 2016-.
Formerly tech lead and first employees at startups Yola (2007-2010) and KnowledgeTree (2004-2006).
Contacting/following me:
fb.me/nbm @nxsy on twitter Email: HN username at nxsy dot org
In other words, if you can sell an item for $100k if you follow a set of laws (a government's, an organisation's, a community's, or your own), but you could sell the item without doing so for $500k, the item is still really only worth $100k (to you), but the (physical/societal/moral) danger involved in selling the item illegally that goes with it is not worth $400k to you.
Or, put another way, the item may be valued at $500k (to some potential buyer), but the legal buyer of the item is offering not to put you in danger in exchange for $400k.
Some background:
* http://www.slideshare.net/dotCloud/tupperware-containerized-...
If it was anything like experiences in other cases, my suspicion (as I said, not my area) is that switch vendors have relatively few customers like us (certainly few that discover bugs, change configuration, upgrade firmware nearly as often as we do, or who make use of the particular set of features we do at the same time), and so some things we really would want would not really be in their interest to work on relative to things that would be useful to most of their customers.
At some point it probably became worth trying something new like Wedge/FBOSS (which while technically hard at least can build on our experience building hardware and software for servers) in the hopes of improved turn-around time and getting the features we want further down the line.
I'll try remember to track down someone from the team to give a less vague answer after lunch.
Current switches just don't support the deployment, monitoring, and configuration power we have for servers. While we've done a lot (probably close to the most than can be) to bring them somewhat close to par, Wedge should not only leapfrog to equality, but also use the same infrastructure - and gain whenever the server processes improve.
The opportunities opened by being able to quickly canary some new features (without doing a firmware upgrade before turning on and again after turning it off), have detailed logging and monitoring and reusing our existing tools for correlation and comparison, and to do some things we currently are forced to do on separate machines now are fairly large.
Like all Facebook services, they are communicated with over the Thrift RPC system, and may have PHP (or any other language) clients, and may talk to other services using Thrift (or occasionally other protocols), some of which may use PHP.
If you're asking a general question about batching requests in PHP, http://docs.hhvm.com/manual/en/hack.async.php may be informative.
Some background on that system, including the FXL component that Haxl replaces, is here: http://research.microsoft.com/en-us/projects/ldg/a10-stein.p...
It contains a lot more information about the problem it was originally created to solve, and potential other use cases.
Facebook is surprisingly easy to underestimate even as someone using it a fair bit.
Just try find every single interface in the front-end. For your own profile. Feed is front-and-center, as is timeline. Then look at events, groups, &c.. Look at messaging.
Then look at the interfaces for managing your privacy and permissions. The apps that you're using and information about when last they requested information. Security like login approvals. Then think about the flows involved in reporting content as abusive or inappropriate. For verifying your identity if you've forgotten your password. For adding more security if you log in from a new computer or from a new location.
Then look at pages, including insights and scheduled posts and so forth. Then look at advertising - boosting individual posts, creating campaigns, &c.. Then look at the interfaces for developers. For translators. Interest lists.
The backends for most of this are in C++ and Java. There's a large amount of data processing happening to track hidden things like spam and scam prevention. But the front-end surface area is quite clearly an order of magnitude or maybe two larger than Reddit (at least where it was when this happened).
Which language would have been a good technical decision in 2002-2003? It needs to be fast enough in terms of iteration. It needs to not require more resources than PHP. It must be easy to onboard people who don't know it onto. It needs to be easy to operate, and not be costly to deploy on the tens, hundreds, and then thousands of servers necessary. (Spending time learning a new technology that others think is cool or which seems cool, while trying to also build a product, has sunk more than a few startups...)
What was bad about the decision to keep the reasonably well-performing and reasonably suited-to-purpose PHP code for front-end code, and peel off suitable tasks into services like the feed, typeahead, messages, and so forth into languages like C++, Java, and so forth. What was bad with the decision to let hundreds of software engineers continue to build the PHP code-base while a much smaller group of people work on projects to improve the efficiency of both the execution environment but also the tooling and developer efficiency on that code-base? Their contribution there is multiplied out by the improved efficiency of those hundreds of developers and the code they wrote.
Seemingly Facebook survived its growth phase fairly well and didn't need a tiger team from outside to handle it - and without the reliability problems others who chose to use languages other than PHP for their front-end and decided to rewrite their much smaller surface area in other languages.
As much as people may dislike PHP (and I'm one of them), it was definitely "good enough". Many languages may not have been, even if they are nicer languages in some objective way.
(Disclaimer: I actually have to write code in Facebook's PHP code-base every once in a while. But most of the code I work with is Python, Java, or C++.)
HHVM is its own web server (although it supports FastCGI for easier use with existing infrastructure like nginx), and that's how we use it in production. It's hard to compare memory usage, except at scale, where it benefits from not having a whole bunch of interpreters (in different processes) running at the same time and some other benefits by using more appropriate types to store values through type inference.
As you say, Thrift connects this all. You can look into our C++ core library, Folly, and other C++, C, Python, and Java applications and libraries like Rocksdb, Presto, watchman, Buck, flint, scribe, and so forth on github.
Services (things like the feed, the typeahead, graph search, messages, &c.) are written in C++ and other languages - ie, the things it is sensible to write them in...
I believe Perl probably would not have worked. It hasn't grown much as a web development language since then (although it has some great web frameworks). The language itself has languished in both development and community growth, and it fairly esoteric and certainly harder to learn than Python and PHP, and would have been harder to hire for. It seems unlikely that pre-2010 Facebook to meaningfully have changed the trajectory of the language (ie, Perl 6 being a success).
I don't think Java, C++ (or C), Cold Fusion, ASP, Haskell, Ocaml, and many other languages would have worked, for a bunch of reasons. Harder to hire for, harder to iterate with, more costly in terms of infrastructure, harder to teach/learn, and so forth.
PHP isn't a totally insignificant part of Facebook being as successful as it has been. A good-enough language choice was necessary, at least, and PHP it seems was a good-enough choice.
[1] I work there and love it. My contact details on my user page. [2] I'll give you a free lunch either way. No purchase required. Void where prohibited.
There is certainly a lot of infrastructure that this is built on that many small teams don't immediately have access to in other companies. Whether it's self-service hardware provisioning, Scribe logging infrastructure, tailer frameworks with checkpointing and retries (and job systems to schedule them), and large amounts of available space on Hive for experimentation. But most of the software parts are available as open source, so it doesn't need remain unavailable.
This is my first team at Facebook that I've been heavily involved in this scale of data capture and analysis, but it only took a few days to get up to speed through a combination of great tools and good documentation. Being able to drop a Python file in a code repo to ensure that some complex data warehousing task takes place every day after that is pretty powerful.
I'm not sure whether a "refresh" (ie, 304 not modified due to expiration) is counted as a miss in this data.
Agender
Androgyne
Androgynous
Bigender
Cis
Cis Female
Cis Male
Cis Man
Cis Woman
Cisgender
Cisgender Female
Cisgender Male
Cisgender Man
Cisgender Woman
Female to Male
FTM
Gender Fluid
Gender Nonconforming
Gender Questioning
Gender Variant
Genderqueer
Intersex
Male to Female
MTF
Neither
Neutrois
Non-binary
Other
Pangender
Trans
Trans Female
Trans Male
Trans Man
Trans Person
Trans*Female
Trans*Male
Trans*Man
Trans*Person
Trans*Woman
Transexual
Transexual Female
Transexual Male
Transexual Man
Transexual Person
Transexual Woman
Transgender Female
Transgender Person
Transmasculine
Two-spiritAs I understand the use case for this software, it would be talking UDP to a local syslog server, not over the network.
At Facebook, we use scribe, and generally use (in-memory, in-app) batched writes to local scribe, and then batched writes (memory+disk, scribe daemon) from that local scribe to an upstream scribe storage system.
First prize is speaking to them yourself. Let them know that you considered it inappropriate and why - that it might be hurtful to others (or that it was hurtful to you), may lead them to not enjoy working at the company, may lead to them having various troubles, &c. Probably no need to take it further if you believe they've taken your feedback on.
Otherwise, assuming you consider it safe, speak to someone in HR at the very least. Ask them what the policies are and what would likely happen, and feel comfortable you can share the identity of the person without them getting instantly fired, if that's bothering you.
If you can and feel comfortable, speak to their manager. That's what their manager is there to discuss with them. They hopefully have a good rapport and this can be brought up in their next discussion.
If you have a good relationship with your manager, talk to them - but realise that they're obligated to inform the HR department about it.
If your company has an "Employee Resource Group" for LGBT employees, speak to someone in it (if you're in a sufficiently "large tech company in the bay area", it will probably have one).
(If you're at Facebook, firstly, I think you should feel comfortable doing all the above without fear of any downside, but I'd be happy to talk to you about it in person or online and connect you with the right people.)
(Then again, I also am involved in a few constant-time optimisation discussions a year, where cache coherency beats out complexity as useful in an algorithm.)
I don't expect people to know the notation, but I expect that they can explain the underlying values for a particular algorithm.
(I realise that's because this isn't a protocol-related issue, only a documentation one, but my argument is that there's no real impact in the change back.)