d23baeeae1db20a68c6078b3670d16e0d11cdd62
java/com.sap.sailing.server/src/com/sap/sailing/server/impl/RacingEventServiceImpl.java
| ... | ... | @@ -3291,21 +3291,18 @@ implements RacingEventService, ClearStateTestSupport, RegattaListener, Leaderboa |
| 3291 | 3291 | @Override |
| 3292 | 3292 | public void serializeForInitialReplicationInternal(ObjectOutputStream oos) throws IOException { |
| 3293 | 3293 | StringBuffer logoutput = new StringBuffer(); |
| 3294 | - |
|
| 3295 | 3294 | logger.info("Serializing regattas..."); |
| 3296 | 3295 | oos.writeObject(regattasByName); |
| 3297 | 3296 | logoutput.append("Serialized " + regattasByName.size() + " regattas\n"); |
| 3298 | 3297 | for (Regatta regatta : regattasByName.values()) { |
| 3299 | 3298 | logoutput.append(String.format("%3s\n", regatta.toString())); |
| 3300 | 3299 | } |
| 3301 | - |
|
| 3302 | 3300 | logger.info("Serializing events..."); |
| 3303 | 3301 | oos.writeObject(eventsById); |
| 3304 | 3302 | logoutput.append("\nSerialized " + eventsById.size() + " events\n"); |
| 3305 | 3303 | for (Event event : eventsById.values()) { |
| 3306 | 3304 | logoutput.append(String.format("%3s\n", event.toString())); |
| 3307 | 3305 | } |
| 3308 | - |
|
| 3309 | 3306 | logger.info("Serializing regattas observed..."); |
| 3310 | 3307 | oos.writeObject(regattasObservedWithRaceAdditionListener); |
| 3311 | 3308 | logger.info("Serializing regatta tracking cache..."); |
| ... | ... | @@ -3330,37 +3327,31 @@ implements RacingEventService, ClearStateTestSupport, RegattaListener, Leaderboa |
| 3330 | 3327 | logger.info("Serializing persisted competitors..."); |
| 3331 | 3328 | oos.writeObject(competitorAndBoatStore); |
| 3332 | 3329 | logoutput.append("Serialized " + competitorAndBoatStore.getCompetitorsCount() + " persisted competitors\n"); |
| 3333 | - |
|
| 3334 | 3330 | logger.info("Serializing configuration map..."); |
| 3335 | 3331 | oos.writeObject(raceManagerDeviceConfigurationsById); |
| 3336 | 3332 | logoutput.append("Serialized " + raceManagerDeviceConfigurationsById.size() + " device configuration entries\n"); |
| 3337 | 3333 | for (DeviceConfiguration config : raceManagerDeviceConfigurationsById.values()) { |
| 3338 | 3334 | logoutput.append(String.format("%3s\n", config.getName())); |
| 3339 | 3335 | } |
| 3340 | - |
|
| 3341 | 3336 | logger.info("Serializing anniversary races..."); |
| 3342 | 3337 | final Map<Integer, Pair<DetailedRaceInfo, AnniversaryType>> knownAnniversaries = anniversaryRaceDeterminator |
| 3343 | 3338 | .getKnownAnniversaries(); |
| 3344 | 3339 | oos.writeObject(knownAnniversaries); |
| 3345 | 3340 | logoutput.append("Serialized " + knownAnniversaries.size() + " anniversary races\n"); |
| 3346 | - |
|
| 3347 | 3341 | logger.info("Serializing next anniversary..."); |
| 3348 | 3342 | final Pair<Integer, AnniversaryType> nextAnniversary = anniversaryRaceDeterminator |
| 3349 | 3343 | .getNextAnniversary(); |
| 3350 | 3344 | oos.writeObject(nextAnniversary); |
| 3351 | 3345 | logoutput.append("Serialized next anniversary " + nextAnniversary + "\n"); |
| 3352 | - |
|
| 3353 | 3346 | logger.info("Serializing race count for anniversaries..."); |
| 3354 | 3347 | final int currentRaceCount = anniversaryRaceDeterminator.getCurrentRaceCount(); |
| 3355 | 3348 | oos.writeInt(currentRaceCount); |
| 3356 | 3349 | logoutput.append("Serialized race count for anniversaries " + currentRaceCount + "\n"); |
| 3357 | - |
|
| 3358 | 3350 | logger.info("Serializing remote sailing server references..."); |
| 3359 | 3351 | final ArrayList<RemoteSailingServerReference> remoteServerReferences = new ArrayList<>(remoteSailingServerSet |
| 3360 | 3352 | .getCachedEventsForRemoteSailingServers().keySet()); |
| 3361 | 3353 | oos.writeObject(remoteServerReferences); |
| 3362 | 3354 | logoutput.append("Serialized " + remoteServerReferences.size() + " remote sailing server references\n"); |
| 3363 | - |
|
| 3364 | 3355 | logger.info(logoutput.toString()); |
| 3365 | 3356 | } |
| 3366 | 3357 |
wiki/info/landscape/olympic-setup.md
| ... | ... | @@ -341,10 +341,12 @@ ADDITIONAL_JAVA_ARGS="${ADDITIONAL_JAVA_ARGS} -Dcom.sap.sse.debranding=true" |
| 341 | 341 | |
| 342 | 342 | ### Application Servers |
| 343 | 343 | |
| 344 | -``sap-p1-1`` normally is the master for the ``tokyo2020`` replica set. It shall replicate the shared services, in particular ``SecurityServiceImpl``, from ``security-service.sapsailing.com``, like any normal server in our landscape, only that here we have to make sure we can target the default RabbitMQ in eu-west-1 and can see the ``security-service.sapsailing.com`` master directly or even better the load balancer. |
|
| 344 | +``sap-p1-1`` normally is the master for the ``tokyo2020`` replica set. The application server directory is found under ``/home/sailing/servers/master``, and the master's HTTP port is 8888. It shall replicate the shared services, in particular ``SecurityServiceImpl``, from ``security-service.sapsailing.com``, like any normal server in our landscape, only that here we have to make sure we can target the default RabbitMQ in eu-west-1 and can see the ``security-service.sapsailing.com`` master directly or even better the load balancer. |
|
| 345 | 345 | |
| 346 | 346 | SSH local port forwards (configured with the ``-L`` option) that use hostnames instead of IP addresses for the remote host specification are resolved each time a new connection is established through this forward. If the DNS entry resolves to multiple IPs or if the DNS entry changes over time, later connection requests through the port forward will honor the new host name's DNS resolution. |
| 347 | 347 | |
| 348 | +Furthermore, there is a configuration under ``/home/sailing/servers/security_service`` which can be fired up with port 8889, using the local ``security_service`` database that a script ``/usr/local/bin/clone-security-service-db`` on the jump host ``tokyo-ssh.sapsailing.com`` updates on an hourly basis as long as an Internet connection is available. This can be used as a replacement of the official ``security-service.sapsailing.com`` service. Both laptops have an ``/etc/hosts`` entry mapping ``security-service.sapsailing.com`` to ``127.0.0.1`` and work with flexible SSH port forwards to decide whether the official Internet-based or the local copy of the security service shall be used. |
|
| 349 | + |
|
| 348 | 350 | ``sap-p1-2`` normally is a replica for the ``tokyo2020`` replica set, using the local RabbitMQ running on ``sap-p1-1``. Its outbound ``REPLICATION_CHANNEL`` will be ``tokyo2020-replica`` and uses the RabbitMQ running in ap-northeast-1, using an SSH port forward with local port 5673 for the ap-northeast-1 RabbitMQ (15673 for the web administration UI). A reverse port forward from ap-northeast-1 to the application port 8888 on ``sap-p1-2`` has to be established which replicas running in ap-northeast-1 will use to reach their master through HTTP. This way, adding more replicas on the AWS side in the cloud will not require any additional bandwidth between cloud and on-site network, except that the reverse HTTP channel, which uses only little traffic, will see additional traffic per replica whereas all outbound replication goes to the single exchange in the RabbitMQ node running in ap-northeast-1. |
| 349 | 351 | |
| 350 | 352 | ## User Groups and Permissions |