Commit Graph

54 Commits

Author SHA1 Message Date
Thales Macedo Garitezi d72ca84af0 chore: fix ignored dialyzer warnings (part 1) (4.3) 2022-09-12 10:56:35 -03:00
JimMoen 6168745f90 chore: update copyright 2022-04-14 11:23:25 +08:00
Zaiming Shi 92d3e16d43 perf(router): receive-mark optimise for short-lived transaction process 2021-05-05 11:00:00 +02:00
William Yang e122ac5716 perf(broker): speedup trans when broker has a big mqueue 2021-04-29 08:52:42 +02:00
William Yang e7fc75fdf2 perf(broker): Optimization for handling bursty traffic
intro. new lock type: 'spawn' of broker.perf.route_lock_type

mnesia get lock calls are not optimized for selective receive.

hence taking locks would be very expensive while there are tones of
messages in the brokers message queue.

This optimization run the transaction in a separate process to utilize
the selective receive optimization of the compiler.
2021-04-28 15:39:46 +02:00
Zaiming Shi bc6a87946c refactor(emqx_trie): store only prefixes
This commit refactors emqx_trie implementation
with mainly two changes

1. Deleted the edge table.

   In the old implementation, trie consist of nodes and edges.
   e.g. for topic 'a/b/+/d', node 'a' with edge 'b'
   points to node 'a/b' and so on.

   However, edges can be computed at runtime,
   so there is no need to store them in a table.
2021-04-26 14:18:40 +02:00
William Yang 907502fed0
Merge pull request #4645 from qzhuyan/dev/william/fix-issue-2985-c3
fix: issue 2985 attempt 3
2021-04-25 12:39:52 +02:00
Zaiming Shi 6354e75626 chore: update copyrights 2021-04-23 20:43:00 +02:00
William Yang 9b13bab2c9 perf: new perf toggle broker.perf.route_lock_type 2021-04-23 13:51:42 +02:00
William Yang 17870fdb39 perf(router): add route runs in async dirty context 2021-04-21 18:59:46 +02:00
William Yang 3972a6b435 perf(trie): use global lock
Use global lock to reduce remote lock overhead.

So that emqx route trans can run in dirty *sync* context.

At least 10X subscribe/unsubscribe improvments.
2021-04-21 18:59:24 +02:00
JianBo He f2190dd5b5 chore(mnesia): explicitly specify the copy type for table 2021-01-14 15:46:16 +08:00
zhouzb 7ea75f4289 Update copyright 2020-01-03 18:31:08 +08:00
Feng Lee f60f127681 Improve the moudules and fix the bugs found in new test cases
- Fix the bug that emqx_mountpoint:unmount/2 will throw exception
- Add emqx_banned:info/1 for test cases
- Rename macro TRIE in emqx_trie module to TRIE_TAB
- Rename macro TRIE_NODE in emqx_trie module to TRIE_NODE_TAB
- Rename macro ROUTE in emqx_router module to ROUTE_TAB
2019-08-06 09:05:55 +08:00
Feng Lee 3877c4db1a Merge branch 'channel2' into channel3 2019-06-18 16:49:26 +08:00
terry-xiaoyu 7092748266 Improve log messages using logger header 2019-06-18 14:37:32 +08:00
Feng Lee 21162f88b8 Update copyright 2019-06-18 14:27:06 +08:00
周子博 0fbf771543 Readjust log level into error when got unexpected message 2019-03-27 11:07:58 +08:00
周子博 58e1b4d485 Readjust log level and unify log format 2019-03-26 22:18:31 +08:00
HeeeJianBo fc2df9aff5 Adapt to new export style 2019-03-22 14:58:24 +08:00
Feng Lee 7a645dd9cc Add 'include/types.hrl' and introduce some common types 2019-02-19 17:16:11 +08:00
turtled 31e95b56c4 Update Copyright to 2019 2019-01-29 10:43:25 +08:00
Feng Lee e882af9369 Use the new logger macros 2019-01-10 08:53:10 +08:00
Feng Lee 4230a3c535 Optimize the trie match 2019-01-09 11:57:22 +08:00
Feng Lee 0c418581b2 Add emqx_trie:empty/0 and optimize match_routes/1 2019-01-09 11:57:22 +08:00
Feng Lee 721b72b96a Add 'active_n' option to optimize the CPU usage of emqx_connection (#2060)
* Add 'active_n' option to optimize the CPU usage of emqx_connection

* Supports batch processing 'DOWN' events
2018-12-17 19:53:29 +08:00
turtled f54d414825 Fix pick fail 2018-12-15 13:42:07 +08:00
Feng Lee 33830d8120 Improve the design of trie, router and broker modules
1. Add do_add_route/1 do_add_route/2, do_delete_route/1,
do_delete_route/2 APIs in emqx_router module
2. Improve the code of emqx_trie module
3. Update the emqx_broker module to call the new APIs of emqx_router
2018-12-12 13:40:01 +08:00
Feng Lee 36e7d63d66 Implement subscription sharding.
1. Improve the design router, broker and shared_sub
2. New ets tables' design for subscription sharding
2018-12-07 18:20:09 +08:00
Feng Lee 95446ca837 Optimize the route and trie modules.
1. Use mnesia:wread/1 to replace mnesia:read/2
2. Update the router supervisor
2018-12-03 11:10:47 +08:00
Feng Lee d9470f365f Optimize read/write concurrency of mnesia/ets tables 2018-11-30 17:46:15 +08:00
周子博 5c291ff23e Fix the 'route_batch_delete' config 2018-11-28 16:04:04 +08:00
Feng Lee 567aeb274f Define types in emqx_types, emqx_mqtt_types modules 2018-08-29 23:08:55 +08:00
turtled 9711892f73 Fix share_sub disconnect not clear route bug 2018-08-29 10:58:34 +08:00
Feng Lee f80cd2d986 Improve the MQTT over Websocket connection 2018-08-11 17:57:19 +08:00
Feng Lee 7d0cba9427 Add MQTT 5.0 supports for connection, protocol and session modules 2018-08-06 16:33:10 +08:00
Feng Lee 62aa072f2f Upgrade for MQTT Version 5.0 and Erlang/OTP R21 2018-07-18 13:43:17 +08:00
Feng Lee bffdd2ba74 Upgrade esockd and add more test cases 2018-05-22 13:01:19 +08:00
Feng Lee bf253ab9b3 Support batch delete 2018-05-10 22:03:59 +08:00
Feng Lee 31bc091873 Implement MQTT Version 5.0 client 2018-05-06 17:45:18 +08:00
Feng Lee 2a4ffc6645 Add more service modules for MQTT Version 5.0 2018-04-18 16:34:23 +08:00
Feng Lee bbb66ff92e Refactor the broker, router modules 2018-04-10 18:17:07 +08:00
Feng Lee 71acf91ace Replace lager with emqx_log 2018-04-09 12:34:53 +08:00
Feng Lee 39548cc399 Improve the session management 2018-04-04 15:28:01 +08:00
Feng Lee 282e341433 EMQ X R3.0 - Improve the design of pubsub and router 2018-03-21 16:48:52 +08:00
Feng Lee 6a957e1b33 Support MQTT Version 5.0 2018-03-02 20:18:27 +08:00
Feng Lee a8aeb5ac17 Rename the 'mqtt_route' record to 'route' 2018-02-27 09:13:14 +08:00
Feng Lee f4fd6efe16 Merge the emqx-common, emqx-router libraries 2018-02-26 23:29:53 +08:00
Feng Lee b63c34ab14 Merge the latest master branch 2018-02-24 11:27:09 +08:00
Feng Lee 6e5134a8b2 Merge with the enterprise edition 2017-12-07 16:24:48 +08:00