Hi all,
I've been working on several high level api concepts for awhile (with Grails being my language of choice) and have been branching out recently to see how well this works with other languages, scalability, adaptability, etc to make sure it could fit a universal model of adaptability for adoption. I'm to a point where I feel I can present this as something I would like the Grails main body to adopt.
To explain, API's exist of two sets of functionality: resource management and I/O for that resource management. When we build API's, we commonly move the I/O to a service but we still have to attach it somehow via a service call or an annotation.
As a result of this I/O binding to the controller/method for API's, I/O becomes an architectural cross cutting concern because once we extend the request/response out to request/response tooling (proxy. api gate, MQ, etc) all I/O functionality and data for API's need to be replicated in the architecture.
Also, internally, if we have forwards, we create a new thread/process that has to go out and come back in rather than using the existing thread.
Node.js uses something called Strongloop and Loopback which are basically the handlerInterceptor to do a handoff between the preHandler/postHandler so forwards, batching, chaining, etc can be internalized.
But BEYOND that, we can create a common apiObject which can be shared across the architecture and all instances, which stores a common set of api data that can be preloaded at runtime, is reloadable on the fly and is shared by all the architecture.
And the best part... this completely separates the controller so you require ZERO annotations!
and it is working in the grails api toolkit. I'd like to go ahead and merge this and was wondering about thoughts and requirements.