OkHttp
Netty
OkHttp | Netty | |
---|---|---|
52 | 55 | |
46,351 | 34,098 | |
0.2% | 0.5% | |
9.3 | 9.9 | |
8 days ago | 3 days ago | |
Kotlin | Java | |
Apache License 2.0 | 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.
OkHttp
-
What is OkHttp? Exploring Open Source Funding, Licensing, and Community Engagement
This post dives into the evolution of OkHttp––a widely used Java HTTP client––focusing on its open source business model, funding strategies, licensing under Apache 2.0, and strong community engagement. We discuss key concepts and features, explore practical applications, analyze challenges, and forecast future trends in open source sustainability. In doing so, we compare OkHttp’s model with emerging tokenized and decentralized funding approaches. Along the way, we include references to authoritative resources (such as Square’s OkHttp GitHub repository and the official OkHttp website), as well as insightful discussions from various developer communities.
- 안드로이드 앱의 API 응답 캐싱
-
OkHttp: The HTTP Client That Will Blow Your Mind!
View the Project on GitHub
-
Unveiling Open Source Success: The Inspiring Story of OkHttp
OkHttp shines not only as a tool but also as a case study in sustainable open source practices. By combining consistent funding with a culture of open collaboration, Square has created an environment where rapid innovation meets robust quality assurance. With extensive documentation available on the official OkHttp website, developers worldwide can learn best practices and integrate OkHttp into their projects with ease. Furthermore, the thriving community around OkHttp has provided a rich repository of tutorials, performance benchmarks, and case studies. This collaborative approach not only accelerates problem-solving but also ensures that the tool evolves in tandem with emerging industry trends. As alternative funding models, including tokenized systems, gain traction in the open source arena, OkHttp continues to stand as a testament to the efficacy of conventional corporate-backed contributions.
-
Comprehensive Guide to OkHttp for Java and Kotlin
When building applications that communicate over the web, a reliable and efficient HTTP client is essential. OkHttp, one of the most popular HTTP clients for Java and Android development, stands out as a powerful tool for handling network operations.
-
Tutorial: Build a Java SDK based on OpenAPI Spec
Your SDK will need a reliable HTTP client to interact with APIs. For Java, consider HttpClient from the standard library or popular libraries like OkHttp if you need more flexibility.
-
OpenSSL bug exposed up to 255 bytes of server heap and existed since 2011
> Issue summary: Calling the OpenSSL API function SSL_select_next_proto with an empty supported client protocols buffer may cause a crash or memory contents to be sent to the peer.
BoringSSL fix: https://boringssl.googlesource.com/boringssl/+/c1d9ac02514a1...
The heap leak was independently observed in 2014 in the Android okhttp library: https://github.com/square/okhttp/issues/437#issuecomment-358...
-
Consuming and Testing third party API's using Spring Webclient
We will use Square’s Mock Webserver to spin up a mock server which we can use to simulate real api's request to the get coffee endpoint.
-
Chat with any GPT right through your favorite text editor
OkHttp Documentation
-
Is there a server simulator available for testing API endpoints with low code or no code configuration?
mockwebserver -> https://github.com/square/okhttp/tree/master/mockwebserver
Netty
-
I Use Zip Bombs to Protect My Server
These days, almost all browsers accept zstd and brotli, so these bombs can be even more effective today! [This](https://news.ycombinator.com/item?id=23496794) old comment showed an impressive 1.2M:1 compression ratio and [zstd seems to be doing even better](https://github.com/netty/netty/issues/14004).
Though, bots may not support modern compression standards. Then again, that may be a good way to block bots: every modern browser supports zstd, so just force that on non-whitelisted browser agents and you automatically confuse scrapers.
-
How TBMQ Uses Redis for Reliable P2P MQTT Messaging
To overcome this limitation, we migrated to Lettuce, an asynchronous Redis client built on top of Netty. With Lettuce, our throughput increased to 60k msg/s, demonstrating the benefits of non-blocking operations and improved parallelism.
-
Reactor Netty: UDP DNS client example
Code of netty is here and using following library
- Netty: Asynchronous event-driven network application framework
-
New scalable, fault-tolerant, and efficient open-source MQTT broker
We use Netty (https://netty.io/) as the source of the MQTT communication, and we build the MQTT features the MQTT broker should support ourselves on top of that.
-
Modern Async Primitives on iOS, Android, and the Web
In this space, we also have the somewhat related term blocking. Java's NIO library is one well-known non-blocking tool used for managing multiple tasks on a single Java thread. When listening to sockets, most of the time a thread is just blocked, doing nothing until it receives some data. So, it's efficient to use a single thread for monitoring many sockets, to increase the likelihood of the thread having some actual work to do. The Selector API does this but is notoriously challenging to program well. Instead, developers use frameworks like Netty which abstract some of NIO's complexity and layer on some best practices.
-
An investigative journey through concurrent data structures
DirectByteBuffer exhibits an intriguing behavior: it deallocates its backing memory during the finalization process, which occurs after garbage collection (GC) cycles. This poses an issue if your system is conservative with on-heap allocations, leading to infrequent GC cycles. In such cases, there could be a significant delay between the time the memory becomes unreferenced and when it is actually deallocated. This behavior could, in some respects, mimic a memory leak.
This is why some libraries hacks into DirectByteBuffer to deallocate memory explicitly, bypassing the finalizer altogether. For instance, the Netty library has implemented such a workaround, see Netty as an [example](https://github.com/netty/netty/blob/795db4a866401aa172757b95...).
-
Scaling to ~15K requests per second with Java – Part 1
Apologies replying to myself, but Netty, which underpins many of the popular Java backend frameworks, see backward compatibility as more important than supporting green threads.
https://github.com/netty/netty/issues/12816
It'll be interesting to see who (if anyone) picks up Netty's mantle in the Project Loom world.
-
Netty VS java-http - a user suggested alternative
2 projects | 25 May 2023
-
Is jre17 the problem? How do I get an old eclipse? Error: Could not find or load main class netty.DiscardServer Caused by: java.lang.ClassNotFoundException: netty.DiscardServer
Looks fairly recent so I'm glad I had a pre oct22 build https://github.com/netty/netty/issues/12737
What are some alternatives?
unirest-java - Unirest in Java: Simplified, lightweight HTTP client library.
Grizzly
Async Http Client - Asynchronous Http and WebSocket Client library for Java
gRPC - The Java gRPC implementation. HTTP/2 based RPC
Retrofit - A type-safe HTTP client for Android and the JVM
Undertow - High performance non-blocking webserver