0

We're creating an application to extract images from document where we'd be using MVC dot net for UI and job that extracts images and learn is in python. Here python batch would be on server and we're not sure whether MVC interaction with that batch would be possible directly or no. If not then I was thinking of WCF. But would like to explore other options as well which might be efficient. So, can Python batch have duplex communication with MVC dot net UI? If not which are the options to establish this?

Thanks

1 Answer 1

2

Since your jobs will probably be long running, the best way would probably be to use some form of messaging (eg. RabbitMQ, Apache Kafka). A possible outline

  • add to MVC a tread/process listening to a messaging queue
  • An image is added to MVC (or some other action happens, for which python should be notified)
  • MVC sends a message to the python server.
  • python learning system is notified, and updates its knowledge
  • When done, it sends a message to back MVC, containing whatever results you need

The actual image could be passed from MVC to python

  • either as binary data, inside the message itself
  • or, written to a commonly accessed database, and the message to python contains just a notification (eg, the filename of the added image)

If you go with the shared database, make sure that MVC only writes and python only reads, otherwise you might face inconsistencies.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.