Athanasius
6d9942ece0
Switch bottle to using an 'app' instance.
...
This fixes the problem I was having (on two separate machines, Debian
stretch and Debian buster) with the Gateway not actually sending
messages out port 8500 to the Relay and Monitor.
Something about the '@thing' syntax, or using bare 'run()' must be
interfering with zmq.green. The latter ends up thinking there are no
active/matching sockets to send to[0], despite the sockets definitely
being there (complete with TCP 3-way handshake visible on tcpdump
output).
With the problem:
* no network traffic was observed on port 8500.
* A test sender.send(...) just before the bottle run() call
*did* send the message. A similar test at the start of the
@post('/upload/') function did not succeed.
[0] - I ended up putting debug prints in both python-zmq and the zeromq
'libzmq' libraries, building the Debian packages and installing those
versions. I also ended up using 'gdb' on the process. The end result
of this was to find that the _matching variable (a count of matching
sockets I think) was empty deep in libzmq, when it should be counting
sockets to send to.
This was specifically in zeromq3-4.3.1/src/dist.cpp, in the
void zmq::dist_t::distribute (msg_t *msg_) function. The immediate:
if (_matching == 0) {
test was true. I didn't manage to track down which bit of libzmq code
should have been setting _matching before I 'recursed back up' the call
chain to investigate other things.
2019-10-05 11:23:41 +01:00
AnthorNet
a221ae13c3
Remove uploaderID from public relays to avoid real time tracking of user without consent
2018-01-27 09:37:26 +01:00
AnthorNet
26f0d64745
Small fixes
2018-01-06 12:40:56 +01:00
AnthorNet
32ed86da91
Fix duplicate message not copied
2018-01-05 16:35:57 +01:00
AnthorNet
dd65ba50d1
Temp fix
2018-01-05 15:10:53 +01:00
AnthorNet
313120aa94
Implement tracking stats
2018-01-05 15:06:21 +01:00
AnthorNet
a6546c3628
Ensure CORS available from gateway upload
2017-10-18 15:07:58 +02:00
Jonathan Harris
f9c7eb1d39
Stop rewriting new schemas to old
...
Reverts 04a8f91.
2017-07-03 15:34:39 +01:00
Jonathan Harris
04a8f91b8c
Rewrite schemas during transition period
2017-07-03 12:58:44 +01:00
Jonathan Harris
a959390ff7
Move SSL config to Settings
2017-07-03 12:31:20 +01:00
AnthorNet
e13fffea79
Fix UnicodeDecodeError
2017-06-29 21:18:44 +02:00
AnthorNet
97ed7ad101
Add the new Gateway/Relay and make them act in HTTPS
2017-06-29 14:01:40 +02:00
Jonathan Harris
a925155547
Make gatewayTimestamp strictly conformant.
...
http://json-schema.org/latest/json-schema-validation.html#anchor108
RCF3339: http://tools.ietf.org/html/rfc3339#section-5.6
2016-01-22 17:11:54 +00:00
Jonathan Harris
a70edab1a2
Handle non-ASCII characters in messages, i.e. in the uploaderID field.
2015-12-05 04:39:32 +00:00
James Muscat
802633d3ef
Bind gateway to localhost by default (e.g. and then proxy via nginx)
2015-07-06 16:10:29 +01:00
James Muscat
443882592e
Back out wsgi entry point since it breaks things in complicated ways.
2015-07-01 23:23:47 +01:00
James Muscat
2d6e7d9f38
This just needs to be a list, not a dict.
2015-07-01 22:27:12 +01:00
James Muscat
13a651175d
We still need to configure the gateway when running in wsgi mode!
2015-07-01 22:25:38 +01:00
James Muscat
f591d3a815
Slightly nicer error message.
2015-07-01 21:46:16 +01:00
James Muscat
a2ebb94c7a
Coding standards.
2015-07-01 21:44:42 +01:00
James Muscat
8cdd2b4c84
Add WSGI hook for running gateway through uWSGI.
2015-07-01 21:44:19 +01:00
Jonathan Harris
1f85be3beb
Add reason text to reply for outdated schemas.
2015-06-20 00:28:50 +01:00
AnthorNet
c0d4f4c8b0
Add outdated schema functionnality.
...
Also added shipyard to release.
2015-06-19 22:23:20 +02:00
AnthorNet
ac92ae7076
Removed comment
2015-06-08 10:14:04 +02:00
AnthorNet
6a86ee904f
Make use of pkg_resources to keep egg file zipped
...
Used to keep schemas in egg file
2015-06-08 09:59:20 +02:00
AnthorNet
85ab051b9a
Remove unnecessary stats collector in favor of monitor
2015-06-08 08:20:05 +02:00
AnthorNet
ceaac2be74
Fix PEP8
2015-06-05 16:43:59 +02:00
AnthorNet
2f72fe84fe
Moved _Core/_Conf to core/conf and some UTF8 fixes
2015-06-05 16:08:32 +02:00
James Muscat
6ed5537d71
Merge branch 'master' of https://github.com/jamesremuscat/EDDN
2015-06-05 14:12:22 +01:00
AnthorNet
37fdd5333e
Merge pull request #13 from AnthorNet/Pull-for-James---Release-0.4
...
EDDN Release 0.4
2015-06-05 12:45:25 +02:00
AnthorNet
69f7134a94
Fix wrong argument in gateway
2015-05-07 19:33:59 +02:00
AnthorNet
c7187e90bd
Added topic in Gateway/Relay to allow filtering
2015-05-05 12:37:57 +02:00
AnthorNet
863d5937c7
Remove unnecessary comment
2015-05-04 13:33:58 +02:00
AnthorNet
6639b3a13e
Moved core functions to _Core
2015-05-04 13:21:58 +02:00
AnthorNet
915aee107c
Fix missing schemas in setup
2015-05-04 12:57:40 +02:00
AnthorNet
a80994ae4a
Change conf directory name
2015-05-04 11:41:15 +02:00
James Muscat
c8bba2b880
Tally software+version.
2015-05-01 12:45:08 +01:00
James Muscat
592084973f
Tally each type of message we see, so we can track use of new schemas as
...
they get deployed.
2015-04-28 12:13:33 +01:00
James Muscat
976454c358
Extra stats: uptime and EDDN version.
2015-04-23 09:57:51 +01:00
James Muscat
3fc16cbb0a
Set CORS header to allow status page to read these values.
2015-04-15 15:00:39 +01:00
James Muscat
4c314a9b9b
Keep track of how many messages fail gateway validation.
2015-04-14 17:06:26 +01:00
James Muscat
02f1ebc307
Unused import.
2015-04-14 16:39:09 +01:00
James Muscat
ddd81574ed
Allow configuration of gateway HTTP port rather than hardcoding.
2015-04-14 16:38:56 +01:00
James Muscat
46292e3c30
Don't corrupt the commandline unless we're asked to.
...
The hacky approach caused problems with anything else trying to use
argparse (e.g. nosetests). This approach only tries to parse the
commandline if we need to e.g. within Relay/Gateway's main() function.
2015-04-14 14:30:26 +01:00
James Muscat
da426c1d89
Encapsulate settings as a class. Make a singleton available.
2015-04-14 00:30:22 +01:00
James Muscat
7d7f977cea
Rip out the old method of collecting stats in favour of the generic way.
2015-04-13 18:32:32 +01:00
James Muscat
7c146a14c4
Factor out common code into StatsCollector.
2015-04-13 18:04:33 +01:00
James Muscat
fce10cdaa6
Simple stat collector, to better monitor gateway throughput and health.
2015-04-09 00:35:27 +01:00
James Muscat
639703f8c9
Avoid deprecated access to BaseException.message.
2015-04-04 01:02:18 +01:00
James Muscat
608ff49723
Build an egg, and create an eddn-gateway script.
...
Currently can only be run from a directory where ../schemas exists
and is populated...
2015-04-04 00:31:17 +01:00