Hi, I'm one of the developers of Alamofire. In addition to maintaining version 4, we're currently working on a major update, Alamofire 5. Given that Moya is one of the most popular libraries that consumes Alamofire directly, I thought I'd stop by and ask whether the users and library developers here had any feature requests or other changes they'd like to see in Alamofire.
Additionally, while we aren't too familiar with Moya, there are interesting features that may be suitable for integration into Alamofire itself. For example, Moya's more advanced request and response handling could be integrated in some way. So in addition to any features that may be needed, has anyone given any though about what features of Moya they might feel should be integrated directly into Alamofire?
Hey @jshier, thank you for taking the time to reach out!
Ironically, I was thinking last week that I need to get more familiar with the advanced capabilities of Alamofire and its internals to see if more enhancements can be made to Moya. I have no suggestions at the moment, but I'll tag @Moya/contributors to get some more ears on this topic 馃槂
Hi!
The first thing that popped to my mind was Codable.
I don't know if this already is on the roadmap for Alamofire 5.
I was thinking on an api that accepts a Codable object as parameter, so it will be easier to send json.
Something like this maybe?
struct Post: Codable {聽}
let newPost = Post()
Alamofire.request("https://httpbin.org/post", method: .post, parameters: newPost)
What do you think?? 馃槃
Back from when I was changing how Moya's response queue worked, I thought it would be awesome to be able to specify which queue to run an Alamofire request on; I would have loved to do something like have a serial queue for my network requests, managed by Rx.
I didn't look too far to see whether a client could specify which queue to have the work run on, I think having that control would be really cool 馃槃
I forgot to mention I have a GitHub project board for Alamofire 5, so feel free to take a look and track progress as well as currently intended features.
@AndrewSB I'm currently prototyping a core rewrite of Alamofire that uses a single serial queue for all internal activities, including the URLSessionDelegate and *TaskDelegate. This has made threading much simpler and enabled some extra features (actual per-task errors for pinning failures), and should make Alamofire more scalable, since we wouldn't be creating so many queues all the time. I plan to make it a passable parameter. Once that's done, we'll do some profiling to see where we could benefit from separate queues (like request creation (now async) and response parsing) and go from there.
@kimdv That's something we'd like, but Encodable doesn't really map to request parameters very well. We're open to ideas though.
@jshier that sounds like a great potential perf win. Once you're done making the change, I'd love to see a method to pass in those queues (with a default param so that most users don't need to deal with it), or variables that contain the queue names so clients (if they care about that level of granularity) can reach in and change or prioritize things
Alamofire 5 is now fully released! Sorry it took so long, but there were quite a few architectural questions to answers and APIs to plumb out. And, it turns out, writing documentation up to Mattt's standard is hard!
I still think it would be great to see more suggestions from Moya for new features, as well as any Moya features that might work better in Alamofire.
On a side note, I'll be starting a project at work that uses Moya, so I'll probably be around as we try to upgrade to Moya 14 / Alamofire 5.
Good stuff, Jon. Congrats on the release! 馃挭
hey @jshier, thank you for all the hard work on version 5! I think it goes without saying that when you rewrite the core of your project you need time to both QC and update the docs (especially given how big the Alamofire documentation is). Happy to see the final release!
Most helpful comment
Alamofire 5 is now fully released! Sorry it took so long, but there were quite a few architectural questions to answers and APIs to plumb out. And, it turns out, writing documentation up to Mattt's standard is hard!
I still think it would be great to see more suggestions from Moya for new features, as well as any Moya features that might work better in Alamofire.
On a side note, I'll be starting a project at work that uses Moya, so I'll probably be around as we try to upgrade to Moya 14 / Alamofire 5.