Comments (5)
Hi hailg, thanks for your suggestion!
I agree that most developers will use some async framework to make the api calls, and it would be a good idea if we can provide sample async implementation. I'll put it on working item list.
The reason why we kept the current SDK to be synchronous is that people have different preferences on async frameworks. It is relatively easy to wrap sync calls into async calls, but could be hard to convert from one async framework to another.
from facebook-java-business-sdk.
@JiamingFB It would be really nice if you've supported Asynchronous Jobs (for insights for example https://developers.facebook.com/docs/marketing-api/insights/v2.5 )
If you need to get a huge dataset it's a bit inconvinient to use sync API that is currently provided.
from facebook-java-business-sdk.
@JiamingFB the problem is that the current design precludes patterns like non-blocking IO. Consumers are now forced to use a thread per request if they don't want to block. I would also argue that going from async to sync can be easy. You don't need to make assumptions about what frameworks people will use, but just build a pluggable abstraction that works with sync and async models.
For example, if the IRequestExecutor interface were to instead return Futures/Promises instead of blocking, then all of the other objects can expose their current synchronous APIs simply by blocking on the result of the future. Then consumers can plug in their preferred async framework via a custom IRequestExecutor.
from facebook-java-business-sdk.
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.
from facebook-java-business-sdk.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.
from facebook-java-business-sdk.
Related Issues (20)
- adSet/reach-estimate does not exist in SDK HOT 1
- AdsInsights gives json parse error when fetching breakdown link_url_asset HOT 5
- Application does not have permission for this action, Please retry this action in a few minutes
- Futures.addCallback is deprecated HOT 3
- Create adset failed
- Create adset failed
- Add `depends_on` support for Batch Request HOT 1
- Async Insights - Exception while parsing image_asset field HOT 3
- lead fetch fail
- Missing `targeting_automation` field in Targeting HOT 2
- AdCreative with `asset_feed_spec` is not creating the Ad with Website destination HOT 1
- not compatible with latest guava HOT 1
- Why the `VALUE_MAXIMUM ` has been replaced with `VALUE_LIFETIME` in AdsInsights.EnumDatePreset in v19.0.1? HOT 5
- There is no Summary attribute on Insights and Campaigns
- When can we expect v20 release for java sdk HOT 1
- https://graph.facebook.com/ahmedvedohyperdjtracks/get
- Facebook Java Business SDK v20 jar is not available
- ArrayIndexOutOfBoundsException on invalid postal code
- Not able to get all conversations from instagram
- Accessing Business User Insights for Multiple Users Using the Instagram API
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from facebook-java-business-sdk.