41 | Booker is an electronic bookstore powered by WildFly Swarm. 42 |
43 |46 | For more information see the About page 47 |
48 |60 | Booker! is an electronic bookstore that demonstrates 61 | how many WildFly Swarm-based microservices can play together. 62 |
63 | 64 |65 | The services are wired together using WildFly node discovery and 66 | invoked using NetflixOSS Ribbon. 67 |
68 | 69 |70 | You can view the topology to understand 71 | which services are up (and where) at any point in time. 72 |
73 | 74 |
75 |
76 |
82 | Keycloak is an independent authentication and authorization server that 83 | runs apart from any app or microservice. It provides integrations to social-login 84 | and other enterprise backing-stores, such as LDAP and Kerberos. Some of the Booker! 85 | services require authenticated users to operate, some just behave differently if the 86 | user is authenticated or anonymous. 87 |
88 |96 | The web client is implemented as a single-page app, with most 97 | of the logic occurring within the browser. The client is packaged as 98 | a .war file, and then wrapped with WildFly Swarm. The only 99 | server-side component is the Server-Sent Events async servlet which 100 | provides the topology of the microservices to the single-page app running in the browser. 101 |
102 | 103 |105 | The library service is used to track which titles have been purchased 106 | by a user. This service uses JPA and an SQL datasource to track combinations 107 | of user-id and book-id. Since simple identifiers are not very useful, 108 | it subsequently invokes the store service to fill in details about your 109 | library, including the title and author of any book in your library. 110 |
111 |116 | The store service provides the ability to search and query the 117 | inventory of books, which is kept in-memory (using data from Project Gutenberg). 118 |
119 | 120 |122 | The pricing service is used by the store to provide the price of each 123 | book. It uses very simple logic but mostly demonstrates how authentication 124 | information can be propagated from the browser, across another service, and 125 | on to an even further-away service. If authentication information is provided, 126 | the pricing service prices a book at $9, otherwise, it prices it at $10. 127 |
128 |The topology is the layout of the services, 38 | and how they connect together. WildFly node discovery 39 | is used to link up the NetflixOSS Ribbon components. 40 |
41 |42 | This topology is then made available to the web-app, 43 | and kept up-to-date using Server-Sent Events (SSE) 44 | to the browser. 45 |
46 |