Web Application Architecture

Mulgara is designed to work as an embedded component. The standard distribution includes a variety of build configurations, including a web services application.

See this message for info on how the default app is structured.

The basic idea is that EmbeddedMulgaraServer is the ringmaster, glue code that creates and launches service providers.

In directory src/jar/server/java/org/mulgara/server:

  • org.mulgara.server.EmbeddedMulgaraServer
    • "main" - entry point for default server?
      • sets up configuration, options parsing, etc.
      • creates instance of EmbeddedMulgaraServer, whose constuctor
        • creates a Mulgara Server instance (a "ServerMBean", which is an RMI server)
        • creates an HttpServices intance, passing itself, hostname, and MulgaraConfig as args
      • launches its services (i.e. Mulgara and webserver) via "startServices", which
        ** implements [[SessionFactoryProvider]] (in src/jar/query/java/org/mulgara/server/?)
        ** reads config parms using [[MulgaraConfig]] object
        * org.mulgara.server.HttpServices
        ** no inheritance
        ** retains reference to Mulgara Server instance
        ** creates two Jetty "Http Servlet server" instances
        ** adds services using getContextServices
        *** this is what creates the servlets (e.g. [[SparqlServlet]]), using 
        **** addWebServicesWebAppContext
        **** addServletContext
        **** addWebQueryContext
        * org.mulgara.server.AbstractServer implements [[ServerMBean]] (?)
        In directory src/jar/querylang/java/org/mulgara/protocol/http:
        * javax.servlet.http.HttpServlet
        ** org.mulgara.protocol.http.MulgaraServlet
        *** org.mulgara.protocol.http.ProtocolServlet
        **** org.mulgara.protocol.http.SparqlServlet
        **** org.mulgara.protocol.http.TqlServlet
        h4. Interaction of servlet and database
        How does a servlet talk to a database?
        In src/jar/server/java/org/mulgara/server/:
        * [[ServerMBean]] - handrolled mgmt interface for org.mulgara.server.SessionFactory
        ** init, start, stop, config stuff, etc.
        * [[AbstractServer]] implements [[ServerMBean]]

Updated by Gregg - almost 15 years ago ยท 7 revisions