简体   繁体   中英

Java jar(API) or microservices - for java and python projects

I have a requirement to create pdf and word documents from the database. This utility to create documents should be accessible from java webapp. I can create a library to expose APIs to create these documents. But some of our projects are Python based, they may wants to use this utility. In this case they may not be able to consume java APIs. What is the best way to handle it? We do not use docker yet. If I have to create it as microservice, how do we do that?

Create web application either in Java or Python and expose REST API to interact with documents. There are several frameworks from which you can choose:

Python:

Java:

You can of course find more web api frameworks and choose the most suitable.

There are also several libraries to interact with Microsoft Word:

Python:

Java:

And here you can also find more solutions.

REST API will be the easiest one to implement, but here are many more way to handle communication between application such as gRPC, EventBus eg AMQP or GraphQL.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM