How to design an enterprise application with many independent processes?

stav

How should I design an application comprised of numerous (but identical) independent processes that need to communicate data to an enterprise application and be monitored and accessible by a web interface?

Here's a more concrete example in Java:

  1. The independent processes are multiple instances of a standalone J2SE application that receives on initialization data about a "user" entity and then starts doing stuff regarding this "user" (this is an infinite process and so any batch sort of design would be wrong here and also similarly, the starting time of these processes is irrelevant)

  2. The enterprise application is a set of J2EE beans and web-services that implement business logic, DB access etc.. and that are (for example) hosted on GlassFish.

  3. The web front is a set of JSPs (perhaps also on GlassFish) that work with the beans.

Now ideally, I want a way for the processes in (1) to be able to invoke methods from the beans in (2), but also for the beans in (2) to be able and update the processes (1) about things.

So these are the required flows of executions, assuming there are 10 independent process of (1) running for 10 different users (consider a "user" something easily identifiable by, say, a number):

  • Something happens in one of the processes of (1) and they invoke a method from the enterprise application (2) with some data.
  • One of the real, human, users (which was already identified by the web app) clicks something on a web-page of (3), this invokes a method in (2), and then some "magical" entity (which I have no idea how to name) finds the independent process from (1) that is responsible for this particular user and updates the process with some new data.

My best approach so far is to expose these J2SE apps by JMX and go from there, but I have one thing I don't understand - who or what should be holding a key-pair list of the sort "the process at URI X is responsible for user Y" and then directing the calls accordingly.

BTW, please feel free to give any advice outside of the Java platform (!), as long as it is a platform that can be scaled easily.

EDIT: Also, is there a way to "host" such independent processes on some app-server? Something that will re-spawn processes if they fail, allow for deployment and monitoring of such processes on remote machines etc.?

c.s.

There has been some time since I have used Java Message Service in the past so I am afraid I am not up-to-date with the technical details, but from your description it seems like it would suit your case, to handle communication between the adminstration GUI and the client processes.

There are various options (I believe you are interested for asynchronous communication) so you should take a look on the latest developments to examine yourself if it fits your case or not.

Regarding the data size that the server would exchange with the processes I believe this is a different topic and I must say that the answer depends. Would it be better to send all data in the message? Or would the message be just a notification so the client to be notified and then connect to some enterprise bean to check some new state? I would prefer the latter case but this is something you should decide based on your requirements. I wouldn't blindly exclude the first option unless I had some apparent evidence that this wouldn't work.

Regarding the scaling I don't think it can be much worse then the scaling of your rest of your beans. As much the server is concerned they processes are all clients that need to be served.

Please take the above advice with a grain of salt: I don't know specifics of your problem/design. I am speaking more about in a general way.

I hope that helps

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

How many Nginx processes should there be?

分類Dev

How many processes does TensorFlow open?

分類Dev

How to enable Design View in jsp file in Web application project in Netbeans?

分類Dev

How to run corda enterprise

分類Dev

Flask/uWSGI - too many processes after some time

分類Dev

Why does a system apper to "hang" when there are many processes in 'D' state?

分類Dev

How to stop heroku db processes

分類Dev

How to select specific processes with 'top'?

分類Dev

OpenGL - How to create Order Independent transparency?

分類Dev

How to chain independent C# tasks?

分類Dev

How to execute independent tasks sequentially using Celery?

分類Dev

How to write generic compiler-independent code?

分類Dev

How to make Unity independent of every workspace?

分類Dev

How to keep two separate and independent Firefox executables

分類Dev

How to split screen into two independent areas?

分類Dev

How can I create an architecture independent snap?

分類Dev

How many httphandlers and httpmodules we can have in one asp.net application?

分類Dev

How many coroutines is too many?

分類Dev

C++ application does not kill all processes on exit

分類Dev

Give permissions to graph api in enterprise application Azure AD

分類Dev

Coredll not found error in Windows 10 mobile enterprise application

分類Dev

How do I kill processes in Ubuntu?

分類Dev

How to avoid defunct python processes in Linux?

分類Dev

How to get number of processes and threads in a C program?

分類Dev

How to track newly created processes in Linux?

分類Dev

How can I see what processes are running?

分類Dev

How does processes synchronization using signals work?

分類Dev

How to get CPU usage from related processes?

分類Dev

How to best manage the run of several processes?

Related 関連記事

  1. 1

    How many Nginx processes should there be?

  2. 2

    How many processes does TensorFlow open?

  3. 3

    How to enable Design View in jsp file in Web application project in Netbeans?

  4. 4

    How to run corda enterprise

  5. 5

    Flask/uWSGI - too many processes after some time

  6. 6

    Why does a system apper to "hang" when there are many processes in 'D' state?

  7. 7

    How to stop heroku db processes

  8. 8

    How to select specific processes with 'top'?

  9. 9

    OpenGL - How to create Order Independent transparency?

  10. 10

    How to chain independent C# tasks?

  11. 11

    How to execute independent tasks sequentially using Celery?

  12. 12

    How to write generic compiler-independent code?

  13. 13

    How to make Unity independent of every workspace?

  14. 14

    How to keep two separate and independent Firefox executables

  15. 15

    How to split screen into two independent areas?

  16. 16

    How can I create an architecture independent snap?

  17. 17

    How many httphandlers and httpmodules we can have in one asp.net application?

  18. 18

    How many coroutines is too many?

  19. 19

    C++ application does not kill all processes on exit

  20. 20

    Give permissions to graph api in enterprise application Azure AD

  21. 21

    Coredll not found error in Windows 10 mobile enterprise application

  22. 22

    How do I kill processes in Ubuntu?

  23. 23

    How to avoid defunct python processes in Linux?

  24. 24

    How to get number of processes and threads in a C program?

  25. 25

    How to track newly created processes in Linux?

  26. 26

    How can I see what processes are running?

  27. 27

    How does processes synchronization using signals work?

  28. 28

    How to get CPU usage from related processes?

  29. 29

    How to best manage the run of several processes?

ホットタグ

アーカイブ