java ee - Design Pattern for an modular enterprise application -
we developing java based system , looking best design pattern grow application more modules added in course of time
goals are:
modular there core module , other modules inherit basic functionalities from.
then other modules individual components shares data across other modules
- on admin side modules can assigned user
for example, student assigned, payment, forum, course, if it's general customer payment, shopping, etc. if student wants shop, upgrade account , add shopping module him , in account, update course show bought book, example, "concurreny in java."
- modules can turned on , off without affecting stability of application.
- i thinking of using jackrabbit due management of contents. wrong? references both positive , negative?
which best design pattern work us? advice recommend or materials can at?
how can implement database design perfection? references might have ?
any more advice accepted , welcomed.
a modular pattern i've had success in past message bus. essentially, student (or professor or admin etc) doesn't talk directly payment or forum or course etc. module, instead communication done via message bus (e.g. student sends message bus, sends message forum). message bus can concurrentlinkedqueue or linkedblockingqueue, or piece of third party software such rabbitmq or activemq or amazon sqs; each of these has pros , cons you'll need weigh, you're not locked decision - worked on project switched amazon sqs rabbitmq, , job of rewriting message format wasn't complicated.
nice things messaging:
robustness. if use persistent queue (meaning messages saved database) can withstand program crash minimal loss of data. in addition, client modules (student/professor/admin), service modules (payment, forum, course), , message bus typically operate in separate memory spaces (they each have own thread pools, , data copied between them instead of being directly shared between them), if 1 module crashes won't take other modules down (unless it's message bus crashes, in case other modules still intact they've got spin/sleep until bus comes online).
scalability. concurrent , distributed systems built on messaging model; example, messaging intrinsic part of concurrent languages , libraries erlang , akka. message bus bottleneck if you're not careful, though, if don't trust implement there several third party libraries choose from.
modularity. if want add new module need write interoperate message bus - don't need write separate interfaces talk of other modules. removing module easy - have message bus route messages dead letter storage. , things access controls easy implement via message bus - if student doesn't have access admin module, message bus routs erroneous messages dead letter storage or exception queue.
the primary disadvantage of messaging efficiency - modules communicate copying data instead of granting direct access. however, in long run you'll find make easier implement modules using multi-threading, result in net efficiency gain.
Comments
Post a Comment