Application Server for Go (ASG)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc
tests
.gitignore
LICENSE
README.adoc
VERSION
atmi.go
atmisrv.go
tplog.go
typed_carray.go
typed_json.go
typed_string.go
typed_ubf.go
typed_ubf_tag.go
typed_view.go

README.adoc

Application Server for GO (ASG)

Version: 2.0.0 - Using Object-mode API.

ASG is application server for Golang, which makes it possible to process distributed transactions in Golang. It is possible to reload the application components without service interruption. Basically system is service oriented where server components advertises services (service is just a literal name like "GETBALANCE", "TRXREQ", etc.), then later these services are called by client binaries. Clients and servers can be located on different physical machines and they can call each other with out knowledge of their psychical location. As these server binaries are stateless, they can be started in multiple copies. This ensures fault tolerant processing. Clients and Server Services comunicate via middleware which supports three kind of buffers for request/response data: 1) Arbitrary string 2) Byte array 3) Unified Buffer Format (UBF) 4) JSON buffer.

Documentation

Enduro/X documentation is located here: http://www.endurox.org/dokuwiki

Basic ASG application layouts can be checked out from this repository "tests" folder.

Foundation

ASG is built on Enduro/X middleware framework, which by itself implements extended XATMI specification. For distributed transaction processing XA API is used. XA must be supported by underlaying SQL (or any other resource) driver. The platform is build on GNU/Linux technology and it utilizes Posix kernel queues for gaining high IPC throughput.

Before try to build ASG, you need to install Enduro/X Middleware Platform, https://github.com/endurox-dev/endurox Binary packages for Enduro/X are available here: http://www.endurox.org/projects/endurox/files

Persistent message queue

Enduro/X provides a queuing subsystem called TMQ (Transactional Message Queue). This facility provides persistent queues that allows applications to explicitly enqueue and dequeue messages from named queues. Queues can be ordered by message en-queue time in LIFO or FIFO order. Queues are managed by an XA compliant resource manager allowing queue operations to participate in distributed transactions. An automated queue forwarding feature is provided that will remove entries from a queue and invoke an associated Enduro/X ATMI services, placing the reply message on an associated reply queue and failed messages to failure queue. The basic usage of persistent queues can be checked in tests/07_basic_durable_queue folder. TMQ API consists of TpEnqueue() and TpDequeue() calls or automated dequeue and message forwarding to destination service.

Buffer Types

String buffer

It is possible to send to services arbitrary strings. These could be JSON, XML or whatever data. The service might respond with the same buffer format, with changed contents.

Byte array (Carray)

It is possible to send to services byte arrays. The data could include binary zeros.

Unified Buffer Format buffer

UBF buffer basically is hash-list where for each value there could be array of elements (e.g. one or more). The buffer is typed. Fields are predefined in field definition tables, later with Enduro/X’s 'mkfldhdr -m1' can be generated field constant tables which provides go format.

JSON buffer

JSON Text format buffer is supported. This can be used to call Enduro/X server or receive JSON format calls from the system.

XA SQL Drivers

Currently Enduro/X supports Oracle DB OCI driver. The patched version for XA processing is available here: https://github.com/endurox-dev/go-oci8. When doing processing in XA mode, the connection string must be empty ("").