All Questions

Filter by
Sorted by
Tagged with
4 votes
1 answer
418 views

Is this a good design for wrapping asynchronous API calls into a RESTful interface?

I'm working with an API that has many asynchronous calls and handlers. I'd like to extend these with a RESTful interface and endpoints in spring. I'm imagining the usual Controller and Service layers, ...
user avatar
  • 149
12 votes
1 answer
5k views

Is the C# async/Task construct equivalent to Java's Executor/Future?

I'm a long time Java developer, but with so little traffic on SE, I don't limit my viewing to any single tags. I've noticed that C# questions with async/await come up a lot, and as far as I've read it'...
user avatar
  • 1,890
3 votes
1 answer
138 views

Future/Promise objects in Controllers - Best practice - MVC [closed]

I was going through some articles related to Futures and Callables today and was thinking about the best practices when working in an MVC based environment. I was wondering, should one be creating ...
user avatar
-1 votes
2 answers
742 views

Straight line coding - How multithreading simplify asynchronous workflow?

Java author mentions: Threads can simplify the development of complex systems by turning complicated asynchronous code into simpler straight-line code. Again the book says: Threads make it easier to ...
user avatar
3 votes
1 answer
406 views

Composable asynchronous programming in Java without too much GC

Assume I'm writing a library in Java for performing network calls. I want it to be efficient for cases like highly loaded reverse proxies etc (10s to 100s Krps coming in and out; client requests ...
user avatar
  • 179
4 votes
1 answer
134 views

Building objects from multiple async server queries

I'm building a system that uses objects that are built using multiple Async queries to a remote server (Firebase) and queries to a local DB. How should I design a module to generate these objects? ...
user avatar
5 votes
1 answer
3k views

Is there use case for implementing a callback if a future is returned?

If I have function which returns a future, is there any reason to also include a callback where the callback is simply called right before the future completes? The only advantage I can think of ...
user avatar
  • 191
6 votes
1 answer
1k views

Best practice for parameters in asynchronous APIs in Java

Is there a best practice for using Guava's ListenableFuture in parameters in API calls? Compare these two versions of an interface that internally does a compare-and-set (I'm using Guava's ...
user avatar
1 vote
2 answers
330 views

Why would Java app make RPC call to itself?

I am working with a multithreaded homegrown multi-module app in my new job. We use the the Thrift protocol to communicate RPC calls between different stand-alone applications in a distributed system. ...
user avatar
  • 1,561