Josh Long Profile picture
Jun 26, 2021 7 tweets 4 min read Read on X
the proxy design pattern is a super useful one in @Java.
The idea behind a proxy is to make it more transparent to work with remote resources. They're all over the place in @Java and enterprise Java, in particular. I'm going to look at some of my favorite examples in this thread
Spring Integration supports messaging gateways through proxies: inject a reference to Cafe, invoke that method and a Message<T> with the payload Order gets sent on the orders MessageChannel (and then to anywhere ya like)
@SpringCloud has a popular integration with #OpenFeign. Invoke methods on an injected instance of ApiClient to send (and receive) HTTP payloads to the configured HTTP service.
@SpringData supports the concept of repositories, itself also a design pattern, using proxies. Here, clients can invoke methods on CustomerRepository to reactively persist, update, or read data in a SQL/NoSQL database.
@SpringCloud also supports some of the popular @Square OSS projects, including #Retrofit, which is a bit like #OpenFeign, except that it also supports asynchronous/reactive HTTP requests/responses:
And of course, we musn't forget the now decades old support in core Spring for remote service invocation using protocols like Hessian, Burlap, HTTP-Invoker, RMI, etc. Clients can inject a reference to CabBookingService to invoke methods on the remote endpoint.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Josh Long

Josh Long Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @starbuxman

Jan 24, 2023
It's almost impossible to keep up with the @SpringBoot and @java ecosystems. Here are five trends I find super exciting:
@graalvm: build highly optimized, operating system and architecture-specific native images that run in small fractions of a similar JRE application. Use @SpringBoot 3 AOT to take your applications further than ever #iot #edge #Kubernetes
@GraphQL is a great way to connect rich clients to services and the Spring for GraphQL project is a first-class experience for developers
Read 6 tweets
Sep 14, 2020
I spent the weekend working on my little side project which I hope will benefit others: it's a much-improved version of the publication pipeline I used to build @ReactiveSpring

bootiful-asciidoctor.github.io
the ideal is that you point the pipeline to the Git repo with you @asciidoctor docs, and point it to the Git repos (zero or more) containing code you'd like to include, and it'll clone 'em all, then generate your book.
* screen PDF
* prepress PDF
* ePub
* Mobi
* HTML
You can take that prepress ready book to @AmazonPub KDP for print. You can take the ePub or Mobi to @leanpub for everything else. Preview the screen PDF or HTML for yourself.
Read 6 tweets
Jul 8, 2020
Cryptography takes time on the CPU. It’s one of those things that blocks threads in a reactive application. You need to move that into an isolated thread pool (a Scheduler, in @ProjectReactor). 1/N
Token-based security schemes like OAuth help here because they reduce the frequency of cryptography. You only need to do encryption when you exchange long term credentials (username, password) for short term credentials (token). 2/n
Token-based authentication schemes like OAuth also give you a better security posture because they reduce the surface area for password exposure. Ideally, your app will only exchange the username and password once for a given user session. 3/n
Read 4 tweets
Jul 7, 2020
I love reactive programming. Reactive libraries offer me several tentpole benefits

1. Consistency
2. Smarter, safer concurrency
3. Robustness
4. Resource efficiency

I’ll expand on those points here:
1. : one API no matter what the application (SSE, WS, HTTP, Kafka, whatever) etc are all easily represented as Reactive Stream types. This greatly simplifies integration and composition of disparate services and data
2. Reactive APIs give me declarative, concise, deterministic ways to express complex, multithreaded algorithms. Remember: only one person TRULY understands how to write safe, concise multithreaded Java code... and it’s NOT you! Let the abstraction do the work
Read 5 tweets
May 20, 2020
I love the new @SpringBoot 2.3 release. It's hard to pick any single thing or theme, but I love the features that make my software even more relevant on @kubernetesio and in the cloud.

Here's a list of some of the features I love...
Reactive SQL data access with @r2dbc is now supported out-of-the-box with @SpringBoot 2.3.

Read 13 tweets
Aug 26, 2018
one of the frustrating things about public IaaS like AWS and evergreen SaaS (even on-prem) like @pivotalcf is that you can't constrain the 'version' of the dependency. that is, AWS is going to evolve and it MIGHT break assumptions into your code from yesteryear. 1/N
This is fine when there's a robust CI/CD practice to continuously (daily, at worst?) confirm that things haven't broken and an on-call team able to respond to such changes. It gets complicated when you want to ramp down the team and reprioritize their efforts 2/N
The result is that organizations can't completely wash their hands of software anymore. Obviously, a mature discussion of operational responsibilities in 2018 includes ongoing security maintenance, and so I'm fine with the idea that there's a long tail for maintenance. 3/N
Read 9 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(