-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework S2S incoming connections and further listener unification #4470
base: feature/listeners
Are you sure you want to change the base?
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/listeners #4470 +/- ##
=====================================================
- Coverage 85.55% 85.48% -0.07%
=====================================================
Files 562 558 -4
Lines 34083 33967 -116
=====================================================
- Hits 29159 29038 -121
- Misses 4924 4929 +5 ☔ View full report in Codecov by Sentry. |
This comes from the early 2000s when ejabberd's federation forgot to enforce the version attribute to the stream opening header and other servers had to workout a hack around ejabberd's bug.
2de5b95
to
6392f8e
Compare
This comment was marked as outdated.
This comment was marked as outdated.
6392f8e
to
1e1eaf3
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
0db6508
to
e3dcc31
Compare
This comment was marked as outdated.
This comment was marked as outdated.
e3dcc31
to
06a7d3a
Compare
elasticsearch_and_cassandra_27 / elasticsearch_and_cassandra_mnesia / 06a7d3a small_tests_26 / small_tests / 06a7d3a small_tests_27 / small_tests / 06a7d3a small_tests_27_arm64 / small_tests / 06a7d3a ldap_mnesia_26 / ldap_mnesia / 06a7d3a ldap_mnesia_27 / ldap_mnesia / 06a7d3a dynamic_domains_mysql_redis_27 / mysql_redis / 06a7d3a dynamic_domains_pgsql_mnesia_27 / pgsql_mnesia / 06a7d3a dynamic_domains_pgsql_mnesia_26 / pgsql_mnesia / 06a7d3a internal_mnesia_27 / internal_mnesia / 06a7d3a pgsql_cets_27 / pgsql_cets / 06a7d3a pgsql_mnesia_26 / pgsql_mnesia / 06a7d3a dynamic_domains_mssql_mnesia_27 / odbc_mssql_mnesia / 06a7d3a mysql_redis_27 / mysql_redis / 06a7d3a pgsql_mnesia_27 / pgsql_mnesia / 06a7d3a cockroachdb_cets_27 / cockroachdb_cets / 06a7d3a mssql_mnesia_27 / odbc_mssql_mnesia / 06a7d3a |
With this transformation, now all three pure XMPP listeners, that is, c2s, s2s, and components, are very very similar. So given their only difference is now the state machine transformations, all other things like sockets or instrumentation can be unified.
So this, instead of creating
mongoose_s2s_in
+mongoose_s2s_in_socket
+mongoose_s2s_in_ranch
, like it was analogous for c2s or components, actually removesmongoose_(c2s|s2s|components)_(socket|ranch)
and unifies all those six modules into a singlemongoose_xmpp_socket
, that is actually little over 250LOC of very predictable code, that can be used by all three c2s|s2s|component gen_statems.This also unifies some instrumentation, as we had
(c2s|s2s|components)_(tcp|tls)_data_(in|out)
, now we'll have just(tcp|tls)_data_(in|out)
, where the connection type will actually be a label (multi-dimensional metrics 😉).Note: documentation needs a lot of verification later on, for example for the instrumentation renamings. This will be done in an upcoming PR once the whole feature branch is more or less ready.