Gemstone/S and 0MQ-Logging

In earlier posting I mentioned, that I enhanced the Gemstone/S database with an event system based on 0MQ. The domain application (written in Gemstone/Smalltalk) are creating events and these are posted on a “pub”-0MQ socket.

Other application subscribe this socket via a “sub”-0MQ socket and when they find a domain event they are interested in, they do something.  0MQ is heavily used in our application to bring programs (written in non-Smalltalk languages) nearer to Gemstone/S.

Our CATI-system is now a bundle of more than 20 processes (including Gemstone/S processes) written in Gemstone/Smalltalk, Python, Java or C#.

The communication is done either via https or 0MQ.

I now reuse this pattern in the area of logging the application information.

I use this 0MQ-pattern to bring all log-information to ONE log server – this time again written in Python.

The log-server (in Python) offers a pull-0MQ-socket and and a pub-0MQ-socket. All applications are sending their info/warning or errors messages to the Python server (the Gemstone/S database is again only a client here). This Python server now writes the data via the very nice Python logging framework to the filesystem.

AND it publishes (after it is written into files) the stuff again on its “pub”-socket – so other processes can subscrive to that socket and do additional stuff with the log messages. An idea could be a 0MQ to WebSocket relay – so that a simple WebApp can be used to get all logging information viewable in a browser in realtime.

The Gemstone/S server writes informations about incoming http requests, if they have done a commit, what the URL was and how long it tool to service the request. Also if an exception has been thrown and if a callstack can be found in the LogEntries of Gemstone/S.

Advertisements
This entry was posted in Smalltalk and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s