It is a bad idea?
No, but it is a big general question to be able to give very specific advice.
I would like to divide this into 3 areas:
- An approach
- Design
- Technology
Work in the opposite direction Technology is the final and most specific part and completely depends on what your current environment (platforms, skills) is and (I hope) it will be reasonable obvious for you to do other things sometime.
The design you described above seems like a good end state - with several specific, oriented APIs, each of which bears its own responsibility. Again, the design details will depend on the skills of you and your organization, as well as the existing platforms that you have. For example. if you already use TIBCO (for example) and invest a lot (licenses, platforms, tools, people), then using some of their published templates / templates / templates makes sense; but (possibly) not if you do not already have TIBCO exposure.
In the abstract, the REST API services seem to be a good starting point - at all levels of the system there are many tools and platforms for ensuring security, deployment, monitoring, scalability, etc. If you are NGINX users, they have many (platform-independent) thoughts on how to do this, the NGINX blog , including smart thinking about scalability and performance. If you are more adventurous and have a smart, impatient team, look at the event-driven architecture - see this
An approach (or process) is a keyword . Ultimately, this is refactoring, although your description of the βbig refactorβ is a little scary to me - so it seems you are talking about changes with big changes and call it refactoring. Perhaps this is just a language, but, in my opinion, this is the "evolution" of one huge API "into several specific, oriented APIs (by reorganizing the architecture)." One place to start is Martin Fowler , while this book is dedicated to software refactoring, the principles and approach are the same, just at a higher level. Indeed, he talks about it here
IBM will talk about refactoring for microservices and make it easy to do in one step, but it never happens (outside the lab).
You have an existing API serving several internal and external clients. I suggest you keep this interface for these clients - separate implementation refactoring from additional problems associated with linking and coordinating external systems / groups. My high-level starting approach:
- define a small (3-7) number of related methods in the API
- ideally, if in any case with these methods a significant change is required with limited coverage, which is good - business value with a code change.
- design / specify a new standalone API specifically for these methods
- first clone an existing model / name / style
- enter a new service only for these
- with proper automated testing and deployment methods for CI / CD.
- with appropriate monitoring
- modify the existing API so that calls to these methods are redirected to call the new service
- there may be a runtime switch for changing between the old implementation and the new implementation.
- remove the old implementation from the code base
- capture problems, assumptions and problems along the way
- The first pass will include a lot of knowledge about what works and doesn't work.
- then repeat the process over and over again each time adding improvements.
At some point in the future, when it is necessary due to other business-oriented needs, the API published for internal, external and / or public clients may change, but this is a completely different project.
As you can see, if the API is huge (1000 methods => 140 releases), this is a multi-month process, and it is important to have a very frequent release schedule. And there can be no value-enhancing code that works reliably and will never change, so (potentially) most of the existing API can remain just wrapped in a new API.
Other considerations:
- open API? Perhaps a new version (significant changes) will be needed earlier than the internal API
- focus on the methods / services he uses
- which parts / services are changing the most (most upgrade requests approved)
- these are the bits that are likely to change, and can benefit the most from the best process / architecture
- what are the future plans for change and where will the API affect
- eg. changes in user management, change in payment processors, change in execution systems.
- eg. new business plans (new products / services)
- consider the affected methods in the API
- See also:
Probably the biggest 4 tips I can give:
- think about refactoring: small changes that do not affect the function
- think of flexibility: small increments that are valuable, verifiable, achievable
- think continuously: have a vision of where you will be (in the end), and then continuously work on the process
- script and automate processes from code, documentation, testing, deployment, monitoring ...
- improving it every time!
- You have an application / API that works - keep it operational!
- This is always the first priority (you just need to work to reduce the time / budget for maintenance)