baseplate.py
Apache Thrift
baseplate.py | Apache Thrift | |
---|---|---|
11 | 10 | |
529 | 10,153 | |
0.0% | 0.4% | |
8.5 | 9.0 | |
5 days ago | 2 days ago | |
Python | C++ | |
BSD 3-clause "New" or "Revised" License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
baseplate.py
-
The .zip TLD sucks and it needs to be immediately revoked.
Almost any download link on the internet (for example an attachment to any Wordpress blog post) could serve as an example. Since we are on a programming subreddit let's use Github as an example. When you open a repository and click the "Download ZIP" button it's a link straight to an URL like this one: https://github.com/reddit/baseplate.py/archive/refs/heads/develop.zip (this particular one is for Reddit's Python library).
-
Python use by SWEs
Even Reddit has python backends https://github.com/reddit/baseplate.py based on Pyramid. They also have a go one. https://github.com/reddit/baseplate.go
-
Reddit System Design/Architecture
there's a multitude of services in reddit's architecture. as far as i can tell, they mostly using reddit's baseplate framework (which has implementations in both python and go).
-
Reddit Recap Series: Backend Performance Tuning
Finally, the problem that we didn’t experience directly, but it was mentioned during consultations with another team that had experience with pgBouncer: the Baseplate.py framework that both of us are using sometimes leaked the connections, leaving them open after the request, but not returning them back into the pool.
- What is an example of a fully finished python software product on github?
-
Is the Pyramid framework dead?
Also reddit team using pyramid for services https://github.com/reddit/baseplate.py
-
is flask only for "smaller" projects or it can also be used for large scalable projects ?
Reddit is built on neither Flask nor Django. The old monolith predates Flask and Django and is built on its own framework. Our new microservices are built on our Baseplate.py framework.
-
Evolving Reddit’s ML Model Deployment and Serving Architecture
Minsky is an internal baseplate.py (Reddit’s python web services framework) thrift service owned by Reddit’s Machine Learning team that serves data or derivations of data related to content relevance heuristics — such as similarity between subreddits, a subreddits topic or a users propensity for a given subreddit — from various data stores such as Cassandra or in process caches. Clients of Minsky use this data to improve Redditor’s experiences with the most relevant content. Over the last few years a set of new ML capabilities, referred to as Gazette, were built into Minsky. Gazette is responsible for serving ML model inferences for personalization tasks along with configuration based schema resolution and feature fetching / transformation.
-
Deadline Budget Propagation for Baseplate.py
Baseplate is implemented in Python and Go, and although they share the same main functionality, smaller features differ between the two. One such feature that was previously on the Go implementation but not Python was deadline budget propagation, which passes on the remaining timeout available from the initial client request all the way through the server and any other requests that may follow. The lack of this feature in Baseplate.py meant that many resources were being wasted by servers doing unnecessary work, despite clients no longer awaiting their response due to timeout.
-
Solving The Three Stooges Problem
In order to make this solution work, you’ll need a web stack that can handle many concurrent requests. Reddit’s stack for most microservices is Python 3, Baseplate, and gevent. Django/Flask also work well when run with gevent. gevent is a Python library that transparently enables your microservice to handle high concurrency and I/O without requiring changes to your code. It is the secret sauce that allows you to run tens of thousands of pseudo-threads called greenlets (one per concurrent request) on a small number of instances. It allows for threads handling concurrent duplicate requests to be enqueued while waiting to acquire the lock, and then for those queues to be drained as threads acquire the lock and execute serially, all without exhausting the thread pool.
Apache Thrift
-
Symfony in microservice architecture - Episode I : Symfony and Golang communication through gRPC
There are various notable implementations of RPC like Apache Thrift and gRPC.
- What is gRPC popularity? I believe not very popular. And subreddit is small. Why is that?
-
Fresh – The next-gen web framework
> That's just your choice of how to build your app, right? You could've avoided this by rendering templates on the server and sending static HTML to the client, keeping the business logic on the server.
No, that's a requirement on most business cases, my comment stated 'complex and dynamic web apps'. Re-rendering the whole page everytime the user checks a box or clicks a button is (a) terrible UX, (b) hard to track the state between page refresh, (c) wrong practice and (d) bad performance.
> Here's just one of ten-thousand other battle-tested options you can use: https://github.com/apache/thrift/
Sure, I should setup a complex and huge dependency for just one of the many problems I highlighted. What a great idea
- Ask HN: Who Wants to Collaborate?
-
Deadline Budget Propagation for Baseplate.py
Thus, we released Baseplate.py v2.1 with deadline propagation. Each request between Baseplate services has an associated THeader, which includes relevant information for Baseplate to fulfill its functionality, such as tracing request timings. We added a “Deadline-Budget” field to this header that propagates the remaining timeout so that information is available to the following request, and this timeout continues to get updated with every new request made. With this update, we save production costs by allowing resources to work on requests awaiting a response, and gain overall improved latency.
-
If someone ever asks you why you use Apollo, show them this screenshot.
Here’s an example of the Thrift changelog. Knock yourself out. Or you can get your sense of productivity by actually doing something of value.
-
parquet2 0.3.0, with native support to read async
The biggest addition is native async reading via futures::AsyncRead and futures::AsyncSeek, which required a lot of (to be merged) changes upstream (changes to thrift rust compiler and parquet-format-rs). I placed those changes on a temporary crate until things are released there.
- proposal: expression to create pointer to simple types #45624
-
Can you share your experience with race conditions in production?
We were sharing instances of a Thrift TDeserializer across threads. We knew TProtocol was not thread-safe, but the TDeserializer constructor accepts a TProtocolFactory, so we naively assumed the deserialize method would use that to create a new instance of TProtocol for each invocation, but unfortunately, the TDeserializer constructor immediately creates TProtocol and stores it in a member variable, so TDeserializer is not actually thread-safe.
What are some alternatives?
xhtml2pdf - A library for converting HTML into PDFs using ReportLab
gRPC - The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)
Pyramid - Pyramid - A Python web framework
ZeroMQ - ZeroMQ core engine in C++, implements ZMTP/3.1
rtv - Browse Reddit from your terminal
Cap'n Proto - Cap'n Proto serialization/RPC system - core tools and C++ library
pottery - Redis for humans. 🌎🌍🌏
Protobuf - Protocol Buffers - Google's data interchange format
redsync - Distributed mutual exclusion lock using Redis for Go
Apache Avro - Apache Avro is a data serialization system.
cornice - Build Web Services with Pyramid.
Apache Parquet - Apache Parquet